@dxos/protocols 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5

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 (429) 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/automerge.d.ts +8 -0
  11. package/dist/src/automerge.d.ts.map +1 -1
  12. package/dist/src/automerge.js.map +1 -1
  13. package/dist/src/buf/proto/gen/dxos/agent/dashboard_pb.d.ts +1 -1
  14. package/dist/src/buf/proto/gen/dxos/agent/dashboard_pb.js +1 -1
  15. package/dist/src/buf/proto/gen/dxos/agent/echo-proxy_pb.d.ts +1 -1
  16. package/dist/src/buf/proto/gen/dxos/agent/echo-proxy_pb.js +1 -1
  17. package/dist/src/buf/proto/gen/dxos/agent/epoch_pb.d.ts +1 -1
  18. package/dist/src/buf/proto/gen/dxos/agent/epoch_pb.js +1 -1
  19. package/dist/src/buf/proto/gen/dxos/agent/functions_pb.d.ts +1 -1
  20. package/dist/src/buf/proto/gen/dxos/agent/functions_pb.js +1 -1
  21. package/dist/src/buf/proto/gen/dxos/bot_pb.d.ts +1 -1
  22. package/dist/src/buf/proto/gen/dxos/bot_pb.js +1 -1
  23. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.d.ts +1 -1
  24. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.js +1 -1
  25. package/dist/src/buf/proto/gen/dxos/client/logging_pb.d.ts +1 -1
  26. package/dist/src/buf/proto/gen/dxos/client/logging_pb.js +1 -1
  27. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +231 -0
  28. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
  29. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +44 -0
  30. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
  31. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +129 -22
  32. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  33. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +90 -54
  34. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  35. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +142 -7
  36. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  37. package/dist/src/buf/proto/gen/dxos/config_pb.js +78 -2
  38. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  39. package/dist/src/buf/proto/gen/dxos/devtools/diagnostics_pb.d.ts +1 -1
  40. package/dist/src/buf/proto/gen/dxos/devtools/diagnostics_pb.js +1 -1
  41. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.d.ts +1 -1
  42. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.js +1 -1
  43. package/dist/src/buf/proto/gen/dxos/devtools/swarm_pb.d.ts +1 -1
  44. package/dist/src/buf/proto/gen/dxos/devtools/swarm_pb.js +1 -1
  45. package/dist/src/buf/proto/gen/dxos/echo/blob_pb.d.ts +1 -1
  46. package/dist/src/buf/proto/gen/dxos/echo/blob_pb.js +1 -1
  47. package/dist/src/buf/proto/gen/dxos/echo/feed_pb.d.ts +1 -1
  48. package/dist/src/buf/proto/gen/dxos/echo/feed_pb.js +1 -1
  49. package/dist/src/buf/proto/gen/dxos/echo/filter_pb.d.ts +1 -1
  50. package/dist/src/buf/proto/gen/dxos/echo/filter_pb.js +1 -1
  51. package/dist/src/buf/proto/gen/dxos/echo/indexing_pb.d.ts +1 -1
  52. package/dist/src/buf/proto/gen/dxos/echo/indexing_pb.js +1 -1
  53. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +7 -1
  54. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
  55. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +2 -2
  56. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
  57. package/dist/src/buf/proto/gen/dxos/echo/model/document_pb.d.ts +1 -1
  58. package/dist/src/buf/proto/gen/dxos/echo/model/document_pb.js +1 -1
  59. package/dist/src/buf/proto/gen/dxos/echo/model/messenger_pb.d.ts +1 -1
  60. package/dist/src/buf/proto/gen/dxos/echo/model/messenger_pb.js +1 -1
  61. package/dist/src/buf/proto/gen/dxos/echo/model/text_pb.d.ts +1 -1
  62. package/dist/src/buf/proto/gen/dxos/echo/model/text_pb.js +1 -1
  63. package/dist/src/buf/proto/gen/dxos/echo/object_pb.d.ts +1 -1
  64. package/dist/src/buf/proto/gen/dxos/echo/object_pb.js +1 -1
  65. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +13 -3
  66. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  67. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +2 -2
  68. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  69. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +71 -10
  70. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  71. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +16 -6
  72. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  73. package/dist/src/buf/proto/gen/dxos/echo/snapshot_pb.d.ts +1 -1
  74. package/dist/src/buf/proto/gen/dxos/echo/snapshot_pb.js +1 -1
  75. package/dist/src/buf/proto/gen/dxos/echo/timeframe_pb.d.ts +1 -1
  76. package/dist/src/buf/proto/gen/dxos/echo/timeframe_pb.js +1 -1
  77. package/dist/src/buf/proto/gen/dxos/edge/calls_pb.d.ts +1 -1
  78. package/dist/src/buf/proto/gen/dxos/edge/calls_pb.js +1 -1
  79. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +29 -1
  80. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts.map +1 -1
  81. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +11 -6
  82. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
  83. package/dist/src/buf/proto/gen/dxos/edge/signal_pb.d.ts +1 -1
  84. package/dist/src/buf/proto/gen/dxos/edge/signal_pb.js +1 -1
  85. package/dist/src/buf/proto/gen/dxos/error_pb.d.ts +1 -1
  86. package/dist/src/buf/proto/gen/dxos/error_pb.js +1 -1
  87. package/dist/src/buf/proto/gen/dxos/field_options_pb.d.ts +1 -1
  88. package/dist/src/buf/proto/gen/dxos/field_options_pb.js +1 -1
  89. package/dist/src/buf/proto/gen/dxos/google_pb.d.ts +1 -1
  90. package/dist/src/buf/proto/gen/dxos/google_pb.js +2 -2
  91. package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
  92. package/dist/src/buf/proto/gen/dxos/gravity_pb.d.ts +1 -1
  93. package/dist/src/buf/proto/gen/dxos/gravity_pb.js +1 -1
  94. package/dist/src/buf/proto/gen/dxos/halo/credentials/auth_pb.d.ts +1 -1
  95. package/dist/src/buf/proto/gen/dxos/halo/credentials/auth_pb.js +1 -1
  96. package/dist/src/buf/proto/gen/dxos/halo/credentials/greet_pb.d.ts +1 -1
  97. package/dist/src/buf/proto/gen/dxos/halo/credentials/greet_pb.js +1 -1
  98. package/dist/src/buf/proto/gen/dxos/halo/credentials/identity_pb.d.ts +1 -1
  99. package/dist/src/buf/proto/gen/dxos/halo/credentials/identity_pb.js +1 -1
  100. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +40 -1
  101. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts.map +1 -1
  102. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +28 -3
  103. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
  104. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.d.ts +1 -1
  105. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.js +1 -1
  106. package/dist/src/buf/proto/gen/dxos/halo/keyring_pb.d.ts +1 -1
  107. package/dist/src/buf/proto/gen/dxos/halo/keyring_pb.js +1 -1
  108. package/dist/src/buf/proto/gen/dxos/halo/keys_pb.d.ts +1 -1
  109. package/dist/src/buf/proto/gen/dxos/halo/keys_pb.js +1 -1
  110. package/dist/src/buf/proto/gen/dxos/halo/signed_pb.d.ts +1 -1
  111. package/dist/src/buf/proto/gen/dxos/halo/signed_pb.js +1 -1
  112. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +2 -11
  113. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
  114. package/dist/src/buf/proto/gen/dxos/iframe_pb.js +2 -2
  115. package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
  116. package/dist/src/buf/proto/gen/dxos/keys_pb.d.ts +1 -1
  117. package/dist/src/buf/proto/gen/dxos/keys_pb.js +1 -1
  118. package/dist/src/buf/proto/gen/dxos/mesh/bridge_pb.d.ts +1 -1
  119. package/dist/src/buf/proto/gen/dxos/mesh/bridge_pb.js +1 -1
  120. package/dist/src/buf/proto/gen/dxos/mesh/broadcast_pb.d.ts +1 -1
  121. package/dist/src/buf/proto/gen/dxos/mesh/broadcast_pb.js +1 -1
  122. package/dist/src/buf/proto/gen/dxos/mesh/messaging_pb.d.ts +1 -1
  123. package/dist/src/buf/proto/gen/dxos/mesh/messaging_pb.js +1 -1
  124. package/dist/src/buf/proto/gen/dxos/mesh/muxer_pb.d.ts +1 -1
  125. package/dist/src/buf/proto/gen/dxos/mesh/muxer_pb.js +1 -1
  126. package/dist/src/buf/proto/gen/dxos/mesh/presence_pb.d.ts +1 -1
  127. package/dist/src/buf/proto/gen/dxos/mesh/presence_pb.js +1 -1
  128. package/dist/src/buf/proto/gen/dxos/mesh/protocol_pb.d.ts +1 -1
  129. package/dist/src/buf/proto/gen/dxos/mesh/protocol_pb.js +1 -1
  130. package/dist/src/buf/proto/gen/dxos/mesh/replicator_pb.d.ts +1 -1
  131. package/dist/src/buf/proto/gen/dxos/mesh/replicator_pb.js +1 -1
  132. package/dist/src/buf/proto/gen/dxos/mesh/signal_pb.d.ts +1 -1
  133. package/dist/src/buf/proto/gen/dxos/mesh/signal_pb.js +1 -1
  134. package/dist/src/buf/proto/gen/dxos/mesh/swarm_pb.d.ts +1 -1
  135. package/dist/src/buf/proto/gen/dxos/mesh/swarm_pb.js +1 -1
  136. package/dist/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.d.ts +1 -1
  137. package/dist/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.js +1 -1
  138. package/dist/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.d.ts +1 -1
  139. package/dist/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.js +1 -1
  140. package/dist/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.d.ts +1 -1
  141. package/dist/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.js +1 -1
  142. package/dist/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.d.ts +1 -1
  143. package/dist/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.js +1 -1
  144. package/dist/src/buf/proto/gen/dxos/mesh/teleport/control_pb.d.ts +1 -1
  145. package/dist/src/buf/proto/gen/dxos/mesh/teleport/control_pb.js +1 -1
  146. package/dist/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.d.ts +1 -1
  147. package/dist/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.js +1 -1
  148. package/dist/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.d.ts +1 -1
  149. package/dist/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.js +1 -1
  150. package/dist/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.d.ts +1 -1
  151. package/dist/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.js +1 -1
  152. package/dist/src/buf/proto/gen/dxos/registry_pb.d.ts +1 -1
  153. package/dist/src/buf/proto/gen/dxos/registry_pb.js +1 -1
  154. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +25 -1
  155. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts.map +1 -1
  156. package/dist/src/buf/proto/gen/dxos/rpc_pb.js +13 -8
  157. package/dist/src/buf/proto/gen/dxos/rpc_pb.js.map +1 -1
  158. package/dist/src/buf/proto/gen/dxos/service/agentmanager_pb.d.ts +1 -1
  159. package/dist/src/buf/proto/gen/dxos/service/agentmanager_pb.js +1 -1
  160. package/dist/src/buf/proto/gen/dxos/service/publisher_pb.d.ts +1 -1
  161. package/dist/src/buf/proto/gen/dxos/service/publisher_pb.js +1 -1
  162. package/dist/src/buf/proto/gen/dxos/service/supervisor_pb.d.ts +1 -1
  163. package/dist/src/buf/proto/gen/dxos/service/supervisor_pb.js +1 -1
  164. package/dist/src/buf/proto/gen/dxos/service/tunnel_pb.d.ts +1 -1
  165. package/dist/src/buf/proto/gen/dxos/service/tunnel_pb.js +1 -1
  166. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -139
  167. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts.map +1 -1
  168. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +11 -45
  169. package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
  170. package/dist/src/buf/proto/gen/dxos/type_pb.d.ts +1 -1
  171. package/dist/src/buf/proto/gen/dxos/type_pb.js +1 -1
  172. package/dist/src/buf/proto/gen/dxos/value_pb.d.ts +1 -1
  173. package/dist/src/buf/proto/gen/dxos/value_pb.js +1 -1
  174. package/dist/src/buf/proto/gen/example/testing/data_pb.d.ts +1 -1
  175. package/dist/src/buf/proto/gen/example/testing/data_pb.js +1 -1
  176. package/dist/src/buf/proto/gen/example/testing/rpc_pb.d.ts +1 -1
  177. package/dist/src/buf/proto/gen/example/testing/rpc_pb.js +1 -1
  178. package/dist/src/codec.test.js +1 -1
  179. package/dist/src/edge/EdgeFunctionEnv.d.ts +108 -0
  180. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
  181. package/dist/src/edge/EdgeFunctionEnv.js +4 -0
  182. package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
  183. package/dist/src/edge/edge.d.ts +511 -0
  184. package/dist/src/edge/edge.d.ts.map +1 -0
  185. package/dist/src/edge/edge.js +173 -0
  186. package/dist/src/edge/edge.js.map +1 -0
  187. package/dist/src/edge/errors.d.ts +29 -0
  188. package/dist/src/edge/errors.d.ts.map +1 -0
  189. package/dist/src/edge/errors.js +69 -0
  190. package/dist/src/edge/errors.js.map +1 -0
  191. package/dist/src/edge/index.d.ts +5 -0
  192. package/dist/src/edge/index.d.ts.map +1 -0
  193. package/dist/src/edge/index.js +8 -0
  194. package/dist/src/edge/index.js.map +1 -0
  195. package/dist/src/edge/registry.d.ts +127 -0
  196. package/dist/src/edge/registry.d.ts.map +1 -0
  197. package/dist/src/edge/registry.js +79 -0
  198. package/dist/src/edge/registry.js.map +1 -0
  199. package/dist/src/errors/base-errors.d.ts +86 -8
  200. package/dist/src/errors/base-errors.d.ts.map +1 -1
  201. package/dist/src/errors/base-errors.js +4 -19
  202. package/dist/src/errors/base-errors.js.map +1 -1
  203. package/dist/src/errors/encoding.d.ts +2 -2
  204. package/dist/src/errors/encoding.d.ts.map +1 -1
  205. package/dist/src/errors/encoding.js +1 -1
  206. package/dist/src/errors/encoding.js.map +1 -1
  207. package/dist/src/errors/errors.d.ts +619 -42
  208. package/dist/src/errors/errors.d.ts.map +1 -1
  209. package/dist/src/errors/errors.js +50 -104
  210. package/dist/src/errors/errors.js.map +1 -1
  211. package/dist/src/errors/errors.test.js +2 -2
  212. package/dist/src/errors/errors.test.js.map +1 -1
  213. package/dist/src/errors/helpers.d.ts +9 -5
  214. package/dist/src/errors/helpers.d.ts.map +1 -1
  215. package/dist/src/errors/helpers.js +3 -3
  216. package/dist/src/errors/helpers.js.map +1 -1
  217. package/dist/src/errors/index.d.ts +5 -5
  218. package/dist/src/errors/index.js +5 -5
  219. package/dist/src/feed-replication.d.ts.map +1 -1
  220. package/dist/src/index.d.ts +12 -12
  221. package/dist/src/index.d.ts.map +1 -1
  222. package/dist/src/index.js +11 -12
  223. package/dist/src/index.js.map +1 -1
  224. package/dist/src/indexing.d.ts +1 -1
  225. package/dist/src/indexing.d.ts.map +1 -1
  226. package/dist/src/indexing.js +1 -1
  227. package/dist/src/indexing.js.map +1 -1
  228. package/dist/src/indexing.test.js +1 -1
  229. package/dist/src/invitation.d.ts +1 -1
  230. package/dist/src/invitation.d.ts.map +1 -1
  231. package/dist/src/invitation.js +1 -1
  232. package/dist/src/invitation.js.map +1 -1
  233. package/dist/src/messenger.d.ts +16 -0
  234. package/dist/src/messenger.d.ts.map +1 -0
  235. package/dist/src/messenger.js +4 -0
  236. package/dist/src/messenger.js.map +1 -0
  237. package/dist/src/proto/gen/dxos/client/services.d.ts +190 -5
  238. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  239. package/dist/src/proto/gen/dxos/client/services.js +22 -6
  240. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  241. package/dist/src/proto/gen/dxos/config.d.ts +87 -2
  242. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  243. package/dist/src/proto/gen/dxos/config.js +26 -0
  244. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  245. package/dist/src/proto/gen/dxos/devtools/host.d.ts +31 -31
  246. package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  247. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +4 -0
  248. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
  249. package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -1
  250. package/dist/src/proto/gen/dxos/echo/query.d.ts +17 -1
  251. package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  252. package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
  253. package/dist/src/proto/gen/dxos/echo/service.d.ts +43 -8
  254. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  255. package/dist/src/proto/gen/dxos/edge/messenger.d.ts +24 -0
  256. package/dist/src/proto/gen/dxos/edge/messenger.d.ts.map +1 -1
  257. package/dist/src/proto/gen/dxos/edge/messenger.js.map +1 -1
  258. package/dist/src/proto/gen/dxos/halo/credentials.d.ts +15 -1
  259. package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
  260. package/dist/src/proto/gen/dxos/halo/credentials.js +9 -0
  261. package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -1
  262. package/dist/src/proto/gen/dxos/iframe.d.ts +0 -10
  263. package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -1
  264. package/dist/src/proto/gen/dxos/iframe.js.map +1 -1
  265. package/dist/src/proto/gen/dxos/rpc.d.ts +19 -0
  266. package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -1
  267. package/dist/src/proto/gen/dxos/rpc.js.map +1 -1
  268. package/dist/src/proto/gen/dxos/tracing.d.ts +0 -79
  269. package/dist/src/proto/gen/dxos/tracing.d.ts.map +1 -1
  270. package/dist/src/proto/gen/google/protobuf.d.ts +326 -40
  271. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  272. package/dist/src/proto/gen/google/protobuf.js +127 -1
  273. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  274. package/dist/src/proto/gen/index.d.ts +42 -7
  275. package/dist/src/proto/gen/index.d.ts.map +1 -1
  276. package/dist/src/proto/gen/index.js +1 -1
  277. package/dist/src/proto/gen/index.js.map +1 -1
  278. package/dist/src/proto/index.d.ts +2 -2
  279. package/dist/src/proto/index.d.ts.map +1 -1
  280. package/dist/src/proto/index.js +1 -2
  281. package/dist/src/proto/index.js.map +1 -1
  282. package/dist/src/proto/types.d.ts +1 -1
  283. package/dist/src/space-archive.d.ts +60 -1
  284. package/dist/src/space-archive.d.ts.map +1 -1
  285. package/dist/src/space-archive.js +13 -1
  286. package/dist/src/space-archive.js.map +1 -1
  287. package/dist/src/types.d.ts +2 -2
  288. package/dist/tsconfig.tsbuildinfo +1 -1
  289. package/package.json +19 -17
  290. package/src/FeedProtocol.ts +320 -0
  291. package/src/FunctionProtocol.ts +102 -0
  292. package/src/automerge.ts +8 -0
  293. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +3 -3
  294. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +3 -3
  295. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +3 -3
  296. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +3 -3
  297. package/src/buf/proto/gen/dxos/bot_pb.ts +3 -3
  298. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +3 -3
  299. package/src/buf/proto/gen/dxos/client/logging_pb.ts +3 -3
  300. package/src/buf/proto/gen/dxos/client/queue_pb.ts +280 -0
  301. package/src/buf/proto/gen/dxos/client/services_pb.ts +191 -62
  302. package/src/buf/proto/gen/dxos/config_pb.ts +166 -10
  303. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +3 -3
  304. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +3 -3
  305. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +3 -3
  306. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +3 -3
  307. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +3 -3
  308. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +3 -3
  309. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +3 -3
  310. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +11 -4
  311. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +3 -3
  312. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +3 -3
  313. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +3 -3
  314. package/src/buf/proto/gen/dxos/echo/object_pb.ts +3 -3
  315. package/src/buf/proto/gen/dxos/echo/query_pb.ts +18 -6
  316. package/src/buf/proto/gen/dxos/echo/service_pb.ts +87 -18
  317. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +3 -3
  318. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +3 -3
  319. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +3 -3
  320. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +41 -8
  321. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +3 -3
  322. package/src/buf/proto/gen/dxos/error_pb.ts +3 -3
  323. package/src/buf/proto/gen/dxos/field_options_pb.ts +3 -3
  324. package/src/buf/proto/gen/dxos/google_pb.ts +3 -3
  325. package/src/buf/proto/gen/dxos/gravity_pb.ts +3 -3
  326. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +3 -3
  327. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +3 -3
  328. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +3 -3
  329. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +51 -5
  330. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +3 -3
  331. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +3 -3
  332. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +3 -3
  333. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +3 -3
  334. package/src/buf/proto/gen/dxos/iframe_pb.ts +5 -16
  335. package/src/buf/proto/gen/dxos/keys_pb.ts +3 -3
  336. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +3 -3
  337. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +3 -3
  338. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +3 -3
  339. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +3 -3
  340. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +3 -3
  341. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +3 -3
  342. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +3 -3
  343. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +3 -3
  344. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +3 -3
  345. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +3 -3
  346. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +3 -3
  347. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +3 -3
  348. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +3 -3
  349. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +3 -3
  350. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +3 -3
  351. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +3 -3
  352. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +3 -3
  353. package/src/buf/proto/gen/dxos/registry_pb.ts +3 -3
  354. package/src/buf/proto/gen/dxos/rpc_pb.ts +39 -10
  355. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +3 -3
  356. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +3 -3
  357. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +3 -3
  358. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +3 -3
  359. package/src/buf/proto/gen/dxos/tracing_pb.ts +12 -179
  360. package/src/buf/proto/gen/dxos/type_pb.ts +3 -3
  361. package/src/buf/proto/gen/dxos/value_pb.ts +3 -3
  362. package/src/buf/proto/gen/example/testing/data_pb.ts +3 -3
  363. package/src/buf/proto/gen/example/testing/rpc_pb.ts +3 -3
  364. package/src/codec.test.ts +1 -1
  365. package/src/edge/EdgeFunctionEnv.ts +191 -0
  366. package/src/edge/edge.ts +604 -0
  367. package/src/edge/errors.ts +85 -0
  368. package/src/edge/index.ts +8 -0
  369. package/src/edge/registry.ts +96 -0
  370. package/src/errors/base-errors.ts +4 -20
  371. package/src/errors/encoding.ts +2 -2
  372. package/src/errors/errors.test.ts +2 -2
  373. package/src/errors/errors.ts +57 -123
  374. package/src/errors/helpers.ts +6 -6
  375. package/src/errors/index.ts +5 -5
  376. package/src/feed-replication.ts +1 -0
  377. package/src/index.ts +12 -12
  378. package/src/indexing.test.ts +1 -1
  379. package/src/indexing.ts +1 -1
  380. package/src/invitation.ts +1 -1
  381. package/src/messenger.ts +22 -0
  382. package/src/proto/dxos/client/queue.proto +78 -0
  383. package/src/proto/dxos/client/services.proto +39 -4
  384. package/src/proto/dxos/config.proto +83 -40
  385. package/src/proto/dxos/echo/metadata.proto +3 -0
  386. package/src/proto/dxos/echo/query.proto +4 -1
  387. package/src/proto/dxos/echo/service.proto +38 -6
  388. package/src/proto/dxos/edge/messenger.proto +10 -0
  389. package/src/proto/dxos/halo/credentials.proto +15 -0
  390. package/src/proto/dxos/iframe.proto +1 -3
  391. package/src/proto/dxos/rpc.proto +7 -0
  392. package/src/proto/dxos/tracing.proto +0 -40
  393. package/src/proto/gen/dxos/client/services.ts +190 -5
  394. package/src/proto/gen/dxos/config.ts +87 -2
  395. package/src/proto/gen/dxos/devtools/host.ts +31 -31
  396. package/src/proto/gen/dxos/echo/metadata.ts +4 -0
  397. package/src/proto/gen/dxos/echo/query.ts +17 -1
  398. package/src/proto/gen/dxos/echo/service.ts +42 -8
  399. package/src/proto/gen/dxos/edge/messenger.ts +24 -0
  400. package/src/proto/gen/dxos/halo/credentials.ts +15 -1
  401. package/src/proto/gen/dxos/iframe.ts +0 -10
  402. package/src/proto/gen/dxos/rpc.ts +19 -0
  403. package/src/proto/gen/dxos/tracing.ts +0 -76
  404. package/src/proto/gen/google/protobuf.ts +326 -40
  405. package/src/proto/gen/index.ts +43 -8
  406. package/src/proto/index.ts +2 -2
  407. package/src/proto/types.ts +1 -1
  408. package/src/space-archive.ts +70 -1
  409. package/src/types.ts +2 -2
  410. package/dist/src/edge-error.d.ts +0 -26
  411. package/dist/src/edge-error.d.ts.map +0 -1
  412. package/dist/src/edge-error.js +0 -62
  413. package/dist/src/edge-error.js.map +0 -1
  414. package/dist/src/edge.d.ts +0 -198
  415. package/dist/src/edge.d.ts.map +0 -1
  416. package/dist/src/edge.js +0 -43
  417. package/dist/src/edge.js.map +0 -1
  418. package/dist/src/query.d.ts +0 -5
  419. package/dist/src/query.d.ts.map +0 -1
  420. package/dist/src/query.js +0 -8
  421. package/dist/src/query.js.map +0 -1
  422. package/dist/src/queue.d.ts +0 -24
  423. package/dist/src/queue.d.ts.map +0 -1
  424. package/dist/src/queue.js +0 -4
  425. package/dist/src/queue.js.map +0 -1
  426. package/src/edge-error.ts +0 -79
  427. package/src/edge.ts +0 -222
  428. package/src/query.ts +0 -8
  429. package/src/queue.ts +0 -33
@@ -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,WAAY,WAAW;IACrB,4DAA6C,CAAA;IAC7C;;OAEG;IACH,sEAAsE;IACtE,kDAAmC,CAAA;IACnC;;OAEG;IACH,yFAAyF;IACzF,oDAAqC,CAAA;IACrC,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AACnB,CAAC,EAfW,WAAW,KAAX,WAAW,QAetB;AAOD,MAAM,gBAAgB,GAAG,MAAM,CAAC,M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G,MAAM,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,CAAC,GAAU,EAAY,EAAE,CAC/B,IAAI,QAAQ,CACV,IAAI,CAAC,SAAS,CAAC;QACb,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;KAC9B,CAAC,EACF,EAAE,MAAM,EAAE,GAAG,EAAE,CAChB;IAEH,MAAM,EAAE,KAAK,EAAE,QAAkB,EAA8B,EAAE;QAC/D,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,kBAAkB,EAAE,CAAC;YAChE,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;YAC3C,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACvC,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC;YACvB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { type EdgeErrorData, 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,CAAC,aAAa,CAAC;YACrE,YAAY,EAAE,mBAAmB,CAAC,QAAQ,CAAC;YAC3C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;SAC9D,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,QAAkB;QACpD,OAAO,IAAI,mBAAmB,CAAC;YAC7B,OAAO,EAAE,aAAa,QAAQ,CAAC,MAAM,KAAK,QA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C,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,127 @@
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
+ homePage: Schema.optional<typeof Schema.String>;
14
+ source: Schema.optional<typeof Schema.String>;
15
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
16
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
17
+ icon: Schema.optional<typeof Schema.String>;
18
+ iconHue: Schema.optional<typeof Schema.String>;
19
+ }>;
20
+ export type PluginMeta = Schema.Schema.Type<typeof PluginMetaSchema>;
21
+ /**
22
+ * Health signal the registry service attaches to a hydrated entry when a refresh fails.
23
+ * Clients surface the appropriate badge or filter entries based on this field.
24
+ */
25
+ export declare const PluginHealthSchema: Schema.Literal<["ok", "release-missing", "manifest-invalid", "repo-unavailable"]>;
26
+ export type PluginHealth = Schema.Schema.Type<typeof PluginHealthSchema>;
27
+ /**
28
+ * Shape of the manifest-asset JSON the registry service fetches from each plugin's latest release.
29
+ * Extends {@link PluginMetaSchema} with an optional override for the module bundle filename
30
+ * (defaults to `plugin.mjs`).
31
+ */
32
+ export declare const PluginManifestSchema: Schema.Struct<{
33
+ moduleFile: Schema.optional<typeof Schema.String>;
34
+ id: Schema.filter<typeof Schema.String>;
35
+ name: Schema.filter<typeof Schema.String>;
36
+ description: Schema.optional<typeof Schema.String>;
37
+ homePage: Schema.optional<typeof Schema.String>;
38
+ source: Schema.optional<typeof Schema.String>;
39
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
40
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
41
+ icon: Schema.optional<typeof Schema.String>;
42
+ iconHue: Schema.optional<typeof Schema.String>;
43
+ }>;
44
+ export type PluginManifest = Schema.Schema.Type<typeof PluginManifestSchema>;
45
+ /**
46
+ * Single hydrated plugin entry returned by the registry service.
47
+ */
48
+ export declare const PluginEntrySchema: Schema.Struct<{
49
+ /** GitHub repository in `owner/name` form. */
50
+ repo: Schema.filter<typeof Schema.String>;
51
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
52
+ meta: Schema.Struct<{
53
+ id: Schema.filter<typeof Schema.String>;
54
+ name: Schema.filter<typeof Schema.String>;
55
+ description: Schema.optional<typeof Schema.String>;
56
+ homePage: Schema.optional<typeof Schema.String>;
57
+ source: Schema.optional<typeof Schema.String>;
58
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
59
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
60
+ icon: Schema.optional<typeof Schema.String>;
61
+ iconHue: Schema.optional<typeof Schema.String>;
62
+ }>;
63
+ /**
64
+ * URL from which Composer can dynamic-import the plugin module. The registry service is
65
+ * responsible for returning a URL that is CORS-safe for browser `import()` (e.g. served or
66
+ * proxied by the service itself); clients pass this value directly to the URL loader.
67
+ */
68
+ moduleUrl: typeof Schema.String;
69
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). */
70
+ releaseTag: typeof Schema.String;
71
+ /** Health signal set by the service when an entry fails to refresh. */
72
+ health: Schema.Literal<["ok", "release-missing", "manifest-invalid", "repo-unavailable"]>;
73
+ /** Unix ms when this entry was last successfully hydrated. */
74
+ hydratedAt: typeof Schema.Number;
75
+ }>;
76
+ export type PluginEntry = Schema.Schema.Type<typeof PluginEntrySchema>;
77
+ /**
78
+ * Response body of `GET /registry/plugins`.
79
+ */
80
+ export declare const GetPluginsResponseBodySchema: Schema.Struct<{
81
+ /** Wire-format schema version, pinned to 1. */
82
+ version: Schema.Literal<[1]>;
83
+ /** Hydrated entries. Order matches the order in the upstream catalog manifest. */
84
+ plugins: Schema.Array$<Schema.Struct<{
85
+ /** GitHub repository in `owner/name` form. */
86
+ repo: Schema.filter<typeof Schema.String>;
87
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
88
+ meta: Schema.Struct<{
89
+ id: Schema.filter<typeof Schema.String>;
90
+ name: Schema.filter<typeof Schema.String>;
91
+ description: Schema.optional<typeof Schema.String>;
92
+ homePage: Schema.optional<typeof Schema.String>;
93
+ source: Schema.optional<typeof Schema.String>;
94
+ screenshots: Schema.optional<Schema.Array$<typeof Schema.String>>;
95
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
96
+ icon: Schema.optional<typeof Schema.String>;
97
+ iconHue: Schema.optional<typeof Schema.String>;
98
+ }>;
99
+ /**
100
+ * URL from which Composer can dynamic-import the plugin module. The registry service is
101
+ * responsible for returning a URL that is CORS-safe for browser `import()` (e.g. served or
102
+ * proxied by the service itself); clients pass this value directly to the URL loader.
103
+ */
104
+ moduleUrl: typeof Schema.String;
105
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). */
106
+ releaseTag: typeof Schema.String;
107
+ /** Health signal set by the service when an entry fails to refresh. */
108
+ health: Schema.Literal<["ok", "release-missing", "manifest-invalid", "repo-unavailable"]>;
109
+ /** Unix ms when this entry was last successfully hydrated. */
110
+ hydratedAt: typeof Schema.Number;
111
+ }>>;
112
+ /** Unix ms timestamp of the most recent successful refresh cycle. */
113
+ refreshedAt: typeof Schema.Number;
114
+ }>;
115
+ export type GetPluginsResponseBody = Schema.Schema.Type<typeof GetPluginsResponseBodySchema>;
116
+ /**
117
+ * Shape of the catalog manifest published in the upstream community-plugins repo.
118
+ * Extra keys (e.g. `$schema`) are permitted.
119
+ */
120
+ export declare const RegistryManifestSchema: Schema.TypeLiteral<{
121
+ version: Schema.Literal<[1]>;
122
+ plugins: Schema.Array$<Schema.Struct<{
123
+ repo: typeof Schema.String;
124
+ }>>;
125
+ }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>;
126
+ export type RegistryManifest = Schema.Schema.Type<typeof RegistryManifestSchema>;
127
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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AC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,79 @@
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
+ homePage: Schema.optional(Schema.String),
17
+ source: Schema.optional(Schema.String),
18
+ screenshots: Schema.optional(Schema.Array(Schema.String)),
19
+ tags: Schema.optional(Schema.Array(Schema.String)),
20
+ icon: Schema.optional(Schema.String),
21
+ iconHue: Schema.optional(Schema.String),
22
+ });
23
+ /**
24
+ * Health signal the registry service attaches to a hydrated entry when a refresh fails.
25
+ * Clients surface the appropriate badge or filter entries based on this field.
26
+ */
27
+ export const PluginHealthSchema = Schema.Literal('ok', 'release-missing', 'manifest-invalid', 'repo-unavailable');
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 const PluginManifestSchema = Schema.Struct({
34
+ ...PluginMetaSchema.fields,
35
+ moduleFile: Schema.optional(Schema.String),
36
+ });
37
+ /**
38
+ * Single hydrated plugin entry returned by the registry service.
39
+ */
40
+ export const PluginEntrySchema = Schema.Struct({
41
+ /** GitHub repository in `owner/name` form. */
42
+ repo: Schema.String.pipe(Schema.nonEmptyString()),
43
+ /** Plugin metadata from the repo's latest-release `manifest.json`. */
44
+ meta: PluginMetaSchema,
45
+ /**
46
+ * URL from which Composer can dynamic-import the plugin module. The registry service is
47
+ * responsible for returning a URL that is CORS-safe for browser `import()` (e.g. served or
48
+ * proxied by the service itself); clients pass this value directly to the URL loader.
49
+ */
50
+ moduleUrl: Schema.String,
51
+ /** Release tag the entry was resolved from (e.g. `v0.1.0`). */
52
+ releaseTag: Schema.String,
53
+ /** Health signal set by the service when an entry fails to refresh. */
54
+ health: PluginHealthSchema,
55
+ /** Unix ms when this entry was last successfully hydrated. */
56
+ hydratedAt: Schema.Number,
57
+ });
58
+ /**
59
+ * Response body of `GET /registry/plugins`.
60
+ */
61
+ export const GetPluginsResponseBodySchema = Schema.Struct({
62
+ /** Wire-format schema version, pinned to 1. */
63
+ version: Schema.Literal(1),
64
+ /** Hydrated entries. Order matches the order in the upstream catalog manifest. */
65
+ plugins: Schema.Array(PluginEntrySchema),
66
+ /** Unix ms timestamp of the most recent successful refresh cycle. */
67
+ refreshedAt: Schema.Number,
68
+ });
69
+ /**
70
+ * Shape of the catalog manifest published in the upstream community-plugins repo.
71
+ * Extra keys (e.g. `$schema`) are permitted.
72
+ */
73
+ export const RegistryManifestSchema = Schema.Struct({
74
+ version: Schema.Literal(1),
75
+ plugins: Schema.Array(Schema.Struct({
76
+ repo: Schema.String,
77
+ })),
78
+ }, Schema.Record({ key: Schema.String, value: Schema.Unknown }));
79
+ //# 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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E;IACvE,MAAM,EAAE,kBAAkB;IAC1B,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC,MAAM;CAC1B,CAAC,CAAC;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CAAC;IACxD,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1B,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC;IACxC,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC,MAAM;CAC3B,CAAC,CAAC;AAGH;;;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,CACnB,MAAM,CAAC,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC,MAAM;KACpB,CAAC,CACH;CACF,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
+ name: "ApiError";
9
+ context: Record<string, unknown>;
10
+ readonly message: string;
11
+ readonly _tag: "ApiError";
12
+ stack?: string;
13
+ cause?: unknown;
14
+ };
15
+ name: "ApiError";
16
+ is(error: unknown): error is BaseError;
17
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
18
+ ifTypeDiffers?: boolean;
19
+ }): (error: unknown) => {
20
+ name: "ApiError";
21
+ context: Record<string, unknown>;
22
+ readonly message: string;
23
+ readonly _tag: "ApiError";
24
+ stack?: string;
25
+ cause?: unknown;
26
+ };
27
+ extend<Name extends string = string>(name: Name, message?: string): any;
28
+ isError(error: unknown): error is Error;
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
+ name: "SystemError";
42
+ context: Record<string, unknown>;
43
+ readonly message: string;
44
+ readonly _tag: "SystemError";
45
+ stack?: string;
46
+ cause?: unknown;
47
+ };
48
+ name: "SystemError";
49
+ is(error: unknown): error is BaseError;
50
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
51
+ ifTypeDiffers?: boolean;
52
+ }): (error: unknown) => {
53
+ name: "SystemError";
54
+ context: Record<string, unknown>;
55
+ readonly message: string;
56
+ readonly _tag: "SystemError";
57
+ stack?: string;
58
+ cause?: unknown;
59
+ };
60
+ extend<Name extends string = string>(name: Name, message?: string): any;
61
+ isError(error: unknown): error is Error;
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
+ name: "DatabaseError";
75
+ context: Record<string, unknown>;
76
+ readonly message: string;
77
+ readonly _tag: "DatabaseError";
78
+ stack?: string;
79
+ cause?: unknown;
80
+ };
81
+ name: "DatabaseError";
82
+ is(error: unknown): error is BaseError;
83
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
84
+ ifTypeDiffers?: boolean;
85
+ }): (error: unknown) => {
86
+ name: "DatabaseError";
87
+ context: Record<string, unknown>;
88
+ readonly message: string;
89
+ readonly _tag: "DatabaseError";
90
+ stack?: string;
91
+ cause?: unknown;
92
+ };
93
+ extend<Name extends string = string>(name: Name, message?: string): any;
94
+ isError(error: unknown): error is Error;
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":"AAIA;;;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;;;;;;;;;;;;;qBAkB6c,CAAC;;;;;;;;;;;;;;;AAhBvf;;;GAGG;AACH,qBAAa,QAAS,SAAQ,aAA4B;CAAG;;;;;;;;;;;;;qBAYyb,CAAC;;;;;;;;;;;;;;;AAVvf;;;GAGG;AACH,qBAAa,WAAY,SAAQ,gBAA+B;CAAG;;;;;;;;;;;;;qBAMmb,CAAC;;;;;;;;;;;;;;;AAJvf;;GAEG;AACH,qBAAa,aAAc,SAAQ,kBAAiC;CAAG"}
@@ -5,37 +5,22 @@
5
5
  * NOTE: Messages should be sentences (Start with a capital letter and end with a period).
6
6
  * Errors can optionally include a JSON context object.
7
7
  */
8
- export class BaseError extends Error {
9
- code;
10
- context;
11
- constructor(code, message, context) {
12
- // TODO(dmaretskyi): Error.cause.
13
- super(message ?? code);
14
- this.code = code;
15
- this.context = context;
16
- this.name = code;
17
- // NOTE: Restores prototype chain (https://stackoverflow.com/a/48342359).
18
- Object.setPrototypeOf(this, new.target.prototype);
19
- }
20
- }
21
- // TODO(dmaretskyi): Consider common error classes with error codes:
22
- // throw new SystemError(ERROR_CODE_OUT_OF_MEMORY, 'Out of memory', { a: 1, b: 2 });
8
+ import { BaseError } from '@dxos/errors';
23
9
  /**
24
10
  * User facing API Errors.
25
11
  * E.g., something was misconfigured.
26
12
  */
27
- export class ApiError extends BaseError {
13
+ export class ApiError extends BaseError.extend('ApiError') {
28
14
  }
29
15
  /**
30
16
  * Internal system errors.
31
17
  * E.g., unexpected/unrecoverable runtime error.
32
18
  */
33
- export class SystemError extends BaseError {
19
+ export class SystemError extends BaseError.extend('SystemError') {
34
20
  }
35
21
  /**
36
22
  * Database errors.
37
23
  */
38
- // TODO(wittjosiah): Same as ApiError?
39
- export class DatabaseError extends BaseError {
24
+ export class DatabaseError extends BaseError.extend('DatabaseError') {
40
25
  }
41
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;;;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) => Error | import("@dxos/errors").BaseError<string>;
7
7
  //# sourceMappingURL=encoding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/errors/encoding.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,KAAK,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEhF,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,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,qDASzF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  //
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
- import { reconstructError } from './helpers.js';
4
+ import { reconstructError } from "./helpers.js";
5
5
  export const encodeError = (err) => {
6
6
  if (typeof err === 'object' && err?.message) {
7
7
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"encoding.js","sourceRoot":"","sources":["../../../src/errors/encoding.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAwB,EAAE;IAC5D,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,EAAE,OAAO,EAAE,CAAC;QAC5C,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,KAAK,EAAE,GAAG,CAAC,KAAK;SACjB,CAAC;IACJ,CAAC;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACnC,OAAO;YACL,OAAO,EAAE,GAAG;SACb,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;SAC7B,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAyB,EAAE,EAAE,WAAW,KAAoB,EAAE,EAAE,EAAE;IAC5F,MAAM,KAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,KAAK,CAAC,OAAO,IAAI,CAAC,GAAG,WAAW,CAAC;IAClE,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
1
+ {"version":3,"file":"enco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