@dxos/protocols 0.8.4-main.84f28bd → 0.8.4-main.ae835ea

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 (291) hide show
  1. package/dist/src/automerge.d.ts +8 -0
  2. package/dist/src/automerge.d.ts.map +1 -1
  3. package/dist/src/automerge.js.map +1 -1
  4. package/dist/src/buf/proto/gen/dxos/agent/dashboard_pb.d.ts +1 -1
  5. package/dist/src/buf/proto/gen/dxos/agent/dashboard_pb.js +1 -1
  6. package/dist/src/buf/proto/gen/dxos/agent/echo-proxy_pb.d.ts +1 -1
  7. package/dist/src/buf/proto/gen/dxos/agent/echo-proxy_pb.js +1 -1
  8. package/dist/src/buf/proto/gen/dxos/agent/epoch_pb.d.ts +1 -1
  9. package/dist/src/buf/proto/gen/dxos/agent/epoch_pb.js +1 -1
  10. package/dist/src/buf/proto/gen/dxos/agent/functions_pb.d.ts +1 -1
  11. package/dist/src/buf/proto/gen/dxos/agent/functions_pb.js +1 -1
  12. package/dist/src/buf/proto/gen/dxos/bot_pb.d.ts +1 -1
  13. package/dist/src/buf/proto/gen/dxos/bot_pb.js +1 -1
  14. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.d.ts +1 -1
  15. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.js +1 -1
  16. package/dist/src/buf/proto/gen/dxos/client/logging_pb.d.ts +1 -1
  17. package/dist/src/buf/proto/gen/dxos/client/logging_pb.js +1 -1
  18. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +65 -19
  19. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  20. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +28 -23
  21. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  22. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +36 -7
  23. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  24. package/dist/src/buf/proto/gen/dxos/config_pb.js +7 -2
  25. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  26. package/dist/src/buf/proto/gen/dxos/devtools/diagnostics_pb.d.ts +1 -1
  27. package/dist/src/buf/proto/gen/dxos/devtools/diagnostics_pb.js +1 -1
  28. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.d.ts +1 -1
  29. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.js +1 -1
  30. package/dist/src/buf/proto/gen/dxos/devtools/swarm_pb.d.ts +1 -1
  31. package/dist/src/buf/proto/gen/dxos/devtools/swarm_pb.js +1 -1
  32. package/dist/src/buf/proto/gen/dxos/echo/blob_pb.d.ts +1 -1
  33. package/dist/src/buf/proto/gen/dxos/echo/blob_pb.js +1 -1
  34. package/dist/src/buf/proto/gen/dxos/echo/feed_pb.d.ts +1 -1
  35. package/dist/src/buf/proto/gen/dxos/echo/feed_pb.js +1 -1
  36. package/dist/src/buf/proto/gen/dxos/echo/filter_pb.d.ts +1 -1
  37. package/dist/src/buf/proto/gen/dxos/echo/filter_pb.js +1 -1
  38. package/dist/src/buf/proto/gen/dxos/echo/indexing_pb.d.ts +1 -1
  39. package/dist/src/buf/proto/gen/dxos/echo/indexing_pb.js +1 -1
  40. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +1 -1
  41. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
  42. package/dist/src/buf/proto/gen/dxos/echo/model/document_pb.d.ts +1 -1
  43. package/dist/src/buf/proto/gen/dxos/echo/model/document_pb.js +1 -1
  44. package/dist/src/buf/proto/gen/dxos/echo/model/messenger_pb.d.ts +1 -1
  45. package/dist/src/buf/proto/gen/dxos/echo/model/messenger_pb.js +1 -1
  46. package/dist/src/buf/proto/gen/dxos/echo/model/text_pb.d.ts +1 -1
  47. package/dist/src/buf/proto/gen/dxos/echo/model/text_pb.js +1 -1
  48. package/dist/src/buf/proto/gen/dxos/echo/object_pb.d.ts +1 -1
  49. package/dist/src/buf/proto/gen/dxos/echo/object_pb.js +1 -1
  50. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +1 -1
  51. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  52. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +16 -1
  53. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  54. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +2 -2
  55. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  56. package/dist/src/buf/proto/gen/dxos/echo/snapshot_pb.d.ts +1 -1
  57. package/dist/src/buf/proto/gen/dxos/echo/snapshot_pb.js +1 -1
  58. package/dist/src/buf/proto/gen/dxos/echo/timeframe_pb.d.ts +1 -1
  59. package/dist/src/buf/proto/gen/dxos/echo/timeframe_pb.js +1 -1
  60. package/dist/src/buf/proto/gen/dxos/edge/calls_pb.d.ts +1 -1
  61. package/dist/src/buf/proto/gen/dxos/edge/calls_pb.js +1 -1
  62. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +1 -1
  63. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +1 -1
  64. package/dist/src/buf/proto/gen/dxos/edge/signal_pb.d.ts +1 -1
  65. package/dist/src/buf/proto/gen/dxos/edge/signal_pb.js +1 -1
  66. package/dist/src/buf/proto/gen/dxos/error_pb.d.ts +1 -1
  67. package/dist/src/buf/proto/gen/dxos/error_pb.js +1 -1
  68. package/dist/src/buf/proto/gen/dxos/field_options_pb.d.ts +1 -1
  69. package/dist/src/buf/proto/gen/dxos/field_options_pb.js +1 -1
  70. package/dist/src/buf/proto/gen/dxos/google_pb.d.ts +1 -1
  71. package/dist/src/buf/proto/gen/dxos/google_pb.js +2 -2
  72. package/dist/src/buf/proto/gen/dxos/gravity_pb.d.ts +1 -1
  73. package/dist/src/buf/proto/gen/dxos/gravity_pb.js +1 -1
  74. package/dist/src/buf/proto/gen/dxos/halo/credentials/auth_pb.d.ts +1 -1
  75. package/dist/src/buf/proto/gen/dxos/halo/credentials/auth_pb.js +1 -1
  76. package/dist/src/buf/proto/gen/dxos/halo/credentials/greet_pb.d.ts +1 -1
  77. package/dist/src/buf/proto/gen/dxos/halo/credentials/greet_pb.js +1 -1
  78. package/dist/src/buf/proto/gen/dxos/halo/credentials/identity_pb.d.ts +1 -1
  79. package/dist/src/buf/proto/gen/dxos/halo/credentials/identity_pb.js +1 -1
  80. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +1 -1
  81. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +1 -1
  82. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.d.ts +1 -1
  83. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.js +1 -1
  84. package/dist/src/buf/proto/gen/dxos/halo/keyring_pb.d.ts +1 -1
  85. package/dist/src/buf/proto/gen/dxos/halo/keyring_pb.js +1 -1
  86. package/dist/src/buf/proto/gen/dxos/halo/keys_pb.d.ts +1 -1
  87. package/dist/src/buf/proto/gen/dxos/halo/keys_pb.js +1 -1
  88. package/dist/src/buf/proto/gen/dxos/halo/signed_pb.d.ts +1 -1
  89. package/dist/src/buf/proto/gen/dxos/halo/signed_pb.js +1 -1
  90. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -1
  91. package/dist/src/buf/proto/gen/dxos/iframe_pb.js +1 -1
  92. package/dist/src/buf/proto/gen/dxos/keys_pb.d.ts +1 -1
  93. package/dist/src/buf/proto/gen/dxos/keys_pb.js +1 -1
  94. package/dist/src/buf/proto/gen/dxos/mesh/bridge_pb.d.ts +1 -1
  95. package/dist/src/buf/proto/gen/dxos/mesh/bridge_pb.js +1 -1
  96. package/dist/src/buf/proto/gen/dxos/mesh/broadcast_pb.d.ts +1 -1
  97. package/dist/src/buf/proto/gen/dxos/mesh/broadcast_pb.js +1 -1
  98. package/dist/src/buf/proto/gen/dxos/mesh/messaging_pb.d.ts +1 -1
  99. package/dist/src/buf/proto/gen/dxos/mesh/messaging_pb.js +1 -1
  100. package/dist/src/buf/proto/gen/dxos/mesh/muxer_pb.d.ts +1 -1
  101. package/dist/src/buf/proto/gen/dxos/mesh/muxer_pb.js +1 -1
  102. package/dist/src/buf/proto/gen/dxos/mesh/presence_pb.d.ts +1 -1
  103. package/dist/src/buf/proto/gen/dxos/mesh/presence_pb.js +1 -1
  104. package/dist/src/buf/proto/gen/dxos/mesh/protocol_pb.d.ts +1 -1
  105. package/dist/src/buf/proto/gen/dxos/mesh/protocol_pb.js +1 -1
  106. package/dist/src/buf/proto/gen/dxos/mesh/replicator_pb.d.ts +1 -1
  107. package/dist/src/buf/proto/gen/dxos/mesh/replicator_pb.js +1 -1
  108. package/dist/src/buf/proto/gen/dxos/mesh/signal_pb.d.ts +1 -1
  109. package/dist/src/buf/proto/gen/dxos/mesh/signal_pb.js +1 -1
  110. package/dist/src/buf/proto/gen/dxos/mesh/swarm_pb.d.ts +1 -1
  111. package/dist/src/buf/proto/gen/dxos/mesh/swarm_pb.js +1 -1
  112. package/dist/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.d.ts +1 -1
  113. package/dist/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.js +1 -1
  114. package/dist/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.d.ts +1 -1
  115. package/dist/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.js +1 -1
  116. package/dist/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.d.ts +1 -1
  117. package/dist/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.js +1 -1
  118. package/dist/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.d.ts +1 -1
  119. package/dist/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.js +1 -1
  120. package/dist/src/buf/proto/gen/dxos/mesh/teleport/control_pb.d.ts +1 -1
  121. package/dist/src/buf/proto/gen/dxos/mesh/teleport/control_pb.js +1 -1
  122. package/dist/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.d.ts +1 -1
  123. package/dist/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.js +1 -1
  124. package/dist/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.d.ts +1 -1
  125. package/dist/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.js +1 -1
  126. package/dist/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.d.ts +1 -1
  127. package/dist/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.js +1 -1
  128. package/dist/src/buf/proto/gen/dxos/registry_pb.d.ts +1 -1
  129. package/dist/src/buf/proto/gen/dxos/registry_pb.js +1 -1
  130. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +1 -1
  131. package/dist/src/buf/proto/gen/dxos/rpc_pb.js +1 -1
  132. package/dist/src/buf/proto/gen/dxos/service/agentmanager_pb.d.ts +1 -1
  133. package/dist/src/buf/proto/gen/dxos/service/agentmanager_pb.js +1 -1
  134. package/dist/src/buf/proto/gen/dxos/service/publisher_pb.d.ts +1 -1
  135. package/dist/src/buf/proto/gen/dxos/service/publisher_pb.js +1 -1
  136. package/dist/src/buf/proto/gen/dxos/service/supervisor_pb.d.ts +1 -1
  137. package/dist/src/buf/proto/gen/dxos/service/supervisor_pb.js +1 -1
  138. package/dist/src/buf/proto/gen/dxos/service/tunnel_pb.d.ts +1 -1
  139. package/dist/src/buf/proto/gen/dxos/service/tunnel_pb.js +1 -1
  140. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -1
  141. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +2 -2
  142. package/dist/src/buf/proto/gen/dxos/type_pb.d.ts +1 -1
  143. package/dist/src/buf/proto/gen/dxos/type_pb.js +1 -1
  144. package/dist/src/buf/proto/gen/dxos/value_pb.d.ts +1 -1
  145. package/dist/src/buf/proto/gen/dxos/value_pb.js +1 -1
  146. package/dist/src/buf/proto/gen/example/testing/data_pb.d.ts +1 -1
  147. package/dist/src/buf/proto/gen/example/testing/data_pb.js +1 -1
  148. package/dist/src/buf/proto/gen/example/testing/rpc_pb.d.ts +1 -1
  149. package/dist/src/buf/proto/gen/example/testing/rpc_pb.js +1 -1
  150. package/dist/src/edge-error.d.ts +11 -7
  151. package/dist/src/edge-error.d.ts.map +1 -1
  152. package/dist/src/edge-error.js +24 -16
  153. package/dist/src/edge-error.js.map +1 -1
  154. package/dist/src/edge.d.ts +128 -7
  155. package/dist/src/edge.d.ts.map +1 -1
  156. package/dist/src/edge.js +102 -2
  157. package/dist/src/edge.js.map +1 -1
  158. package/dist/src/errors/base-errors.d.ts.map +1 -1
  159. package/dist/src/errors/base-errors.js +1 -0
  160. package/dist/src/errors/base-errors.js.map +1 -1
  161. package/dist/src/errors/encoding.d.ts.map +1 -1
  162. package/dist/src/errors/encoding.js.map +1 -1
  163. package/dist/src/errors/errors.d.ts +1 -1
  164. package/dist/src/errors/errors.d.ts.map +1 -1
  165. package/dist/src/errors/errors.js.map +1 -1
  166. package/dist/src/errors/helpers.d.ts.map +1 -1
  167. package/dist/src/errors/helpers.js.map +1 -1
  168. package/dist/src/index.d.ts +7 -7
  169. package/dist/src/index.d.ts.map +1 -1
  170. package/dist/src/index.js +6 -7
  171. package/dist/src/index.js.map +1 -1
  172. package/dist/src/indexing.d.ts +1 -1
  173. package/dist/src/indexing.d.ts.map +1 -1
  174. package/dist/src/indexing.js +1 -1
  175. package/dist/src/indexing.js.map +1 -1
  176. package/dist/src/invitation.d.ts +1 -1
  177. package/dist/src/invitation.d.ts.map +1 -1
  178. package/dist/src/invitation.js +1 -1
  179. package/dist/src/invitation.js.map +1 -1
  180. package/dist/src/proto/gen/dxos/client/services.d.ts +30 -3
  181. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  182. package/dist/src/proto/gen/dxos/client/services.js +9 -6
  183. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  184. package/dist/src/proto/gen/dxos/config.d.ts +28 -2
  185. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  186. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  187. package/dist/src/proto/gen/dxos/echo/service.d.ts +9 -0
  188. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  189. package/dist/src/proto/gen/index.d.ts +2 -0
  190. package/dist/src/proto/gen/index.d.ts.map +1 -1
  191. package/dist/src/proto/gen/index.js +1 -1
  192. package/dist/src/proto/gen/index.js.map +1 -1
  193. package/dist/src/proto/index.d.ts +1 -1
  194. package/dist/src/proto/index.d.ts.map +1 -1
  195. package/dist/src/proto/index.js +0 -1
  196. package/dist/src/proto/index.js.map +1 -1
  197. package/dist/src/queue.d.ts +4 -0
  198. package/dist/src/queue.d.ts.map +1 -1
  199. package/dist/src/queue.js +4 -0
  200. package/dist/src/queue.js.map +1 -1
  201. package/dist/tsconfig.tsbuildinfo +1 -1
  202. package/package.json +13 -15
  203. package/src/automerge.ts +8 -0
  204. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +3 -3
  205. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +3 -3
  206. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +3 -3
  207. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +3 -3
  208. package/src/buf/proto/gen/dxos/bot_pb.ts +3 -3
  209. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +3 -3
  210. package/src/buf/proto/gen/dxos/client/logging_pb.ts +3 -3
  211. package/src/buf/proto/gen/dxos/client/services_pb.ts +84 -29
  212. package/src/buf/proto/gen/dxos/config_pb.ts +43 -10
  213. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +3 -3
  214. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +3 -3
  215. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +3 -3
  216. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +3 -3
  217. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +3 -3
  218. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +3 -3
  219. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +3 -3
  220. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +3 -3
  221. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +3 -3
  222. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +3 -3
  223. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +3 -3
  224. package/src/buf/proto/gen/dxos/echo/object_pb.ts +3 -3
  225. package/src/buf/proto/gen/dxos/echo/query_pb.ts +3 -3
  226. package/src/buf/proto/gen/dxos/echo/service_pb.ts +21 -4
  227. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +3 -3
  228. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +3 -3
  229. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +3 -3
  230. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +3 -3
  231. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +3 -3
  232. package/src/buf/proto/gen/dxos/error_pb.ts +3 -3
  233. package/src/buf/proto/gen/dxos/field_options_pb.ts +3 -3
  234. package/src/buf/proto/gen/dxos/google_pb.ts +3 -3
  235. package/src/buf/proto/gen/dxos/gravity_pb.ts +3 -3
  236. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +3 -3
  237. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +3 -3
  238. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +3 -3
  239. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +3 -3
  240. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +3 -3
  241. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +3 -3
  242. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +3 -3
  243. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +3 -3
  244. package/src/buf/proto/gen/dxos/iframe_pb.ts +3 -3
  245. package/src/buf/proto/gen/dxos/keys_pb.ts +3 -3
  246. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +3 -3
  247. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +3 -3
  248. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +3 -3
  249. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +3 -3
  250. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +3 -3
  251. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +3 -3
  252. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +3 -3
  253. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +3 -3
  254. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +3 -3
  255. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +3 -3
  256. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +3 -3
  257. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +3 -3
  258. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +3 -3
  259. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +3 -3
  260. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +3 -3
  261. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +3 -3
  262. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +3 -3
  263. package/src/buf/proto/gen/dxos/registry_pb.ts +3 -3
  264. package/src/buf/proto/gen/dxos/rpc_pb.ts +3 -3
  265. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +3 -3
  266. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +3 -3
  267. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +3 -3
  268. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +3 -3
  269. package/src/buf/proto/gen/dxos/tracing_pb.ts +3 -3
  270. package/src/buf/proto/gen/dxos/type_pb.ts +3 -3
  271. package/src/buf/proto/gen/dxos/value_pb.ts +3 -3
  272. package/src/buf/proto/gen/example/testing/data_pb.ts +3 -3
  273. package/src/buf/proto/gen/example/testing/rpc_pb.ts +3 -3
  274. package/src/edge-error.ts +25 -18
  275. package/src/edge.ts +240 -8
  276. package/src/errors/base-errors.ts +2 -0
  277. package/src/errors/encoding.ts +2 -1
  278. package/src/errors/errors.ts +2 -1
  279. package/src/errors/helpers.ts +2 -1
  280. package/src/index.ts +7 -7
  281. package/src/indexing.ts +1 -1
  282. package/src/invitation.ts +1 -1
  283. package/src/proto/dxos/client/services.proto +20 -3
  284. package/src/proto/dxos/config.proto +36 -40
  285. package/src/proto/dxos/echo/service.proto +11 -0
  286. package/src/proto/gen/dxos/client/services.ts +30 -3
  287. package/src/proto/gen/dxos/config.ts +28 -2
  288. package/src/proto/gen/dxos/echo/service.ts +9 -0
  289. package/src/proto/gen/index.ts +3 -1
  290. package/src/proto/index.ts +1 -1
  291. package/src/queue.ts +5 -0
@@ -2,14 +2,14 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- // @generated by protoc-gen-es v2.1.0 with parameter "target=ts,import_extension=js"
5
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts,import_extension=js"
6
6
  // @generated from file dxos/type.proto (package dxos.type, syntax proto3)
7
7
  /* eslint-disable */
8
8
 
9
9
  // TODO(burdon): Rename `dxos.registry.type`.
10
10
 
11
- import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
12
- import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
11
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
12
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
13
13
  import { file_google_protobuf_struct } from "@bufbuild/protobuf/wkt";
14
14
  import type { Record_Extension } from "./registry_pb.js";
15
15
  import { file_dxos_registry } from "./registry_pb.js";
@@ -2,12 +2,12 @@
2
2
  // Copyright 2021 DXOS.org
3
3
  //
4
4
 
5
- // @generated by protoc-gen-es v2.1.0 with parameter "target=ts,import_extension=js"
5
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts,import_extension=js"
6
6
  // @generated from file dxos/value.proto (package dxos.value, syntax proto3)
7
7
  /* eslint-disable */
8
8
 
9
- import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
10
- import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
9
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
10
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
11
11
  import type { Message } from "@bufbuild/protobuf";
12
12
 
13
13
  /**
@@ -2,12 +2,12 @@
2
2
  // Copyright 2020 DXOS.org
3
3
  //
4
4
 
5
- // @generated by protoc-gen-es v2.1.0 with parameter "target=ts,import_extension=js"
5
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts,import_extension=js"
6
6
  // @generated from file example/testing/data.proto (package example.testing.data, syntax proto3)
7
7
  /* eslint-disable */
8
8
 
9
- import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
10
- import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
9
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
10
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
11
11
  import type { Message } from "@bufbuild/protobuf";
12
12
 
13
13
  /**
@@ -2,12 +2,12 @@
2
2
  // Copyright 2020 DXOS.org
3
3
  //
4
4
 
5
- // @generated by protoc-gen-es v2.1.0 with parameter "target=ts,import_extension=js"
5
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts,import_extension=js"
6
6
  // @generated from file example/testing/rpc.proto (package example.testing.rpc, syntax proto3)
7
7
  /* eslint-disable */
8
8
 
9
- import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
10
- import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
9
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
10
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
11
11
  import type { Any, EmptySchema } from "@bufbuild/protobuf/wkt";
12
12
  import { file_google_protobuf_any, file_google_protobuf_empty } from "@bufbuild/protobuf/wkt";
13
13
  import type { Message } from "@bufbuild/protobuf";
package/src/edge-error.ts CHANGED
@@ -2,31 +2,44 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type EdgeErrorData, type EdgeHttpFailure } from './edge';
5
+ import { type EdgeErrorData, type EdgeFailure, EdgeHttpErrorCodec, ErrorCodec } from './edge.js';
6
6
 
7
+ // TODO(burdon): Reconcile with @dxos/errors.
8
+ /**
9
+ * Error thrown when a call to the Edge service fails.
10
+ * There 3 possible sources of failure:
11
+ * 1. EdgeFailure (JSON body with { success: false }) -> Processing the request failed and was gracefully handled by EDGE service.
12
+ * 2. Http failure (non-ok code) -> The HTTP request failed (e.g. timeout, network error).
13
+ * -> Unhandled exception on EDGE side, EDGE would provide serialized error in the response body.
14
+ * 3. Processing failure -> Unhandled exception on client side while processing the response.
15
+ */
7
16
  export class EdgeCallFailedError extends Error {
8
- public static fromProcessingFailureCause(cause: Error): EdgeCallFailedError {
9
- return new EdgeCallFailedError({
10
- reason: 'Error processing request.',
11
- isRetryable: true,
12
- cause,
17
+ public static fromUnsuccessfulResponse(response: Response, body: EdgeFailure): EdgeCallFailedError {
18
+ const error = new EdgeCallFailedError({
19
+ reason: body.reason,
20
+ errorData: body.errorData,
21
+ isRetryable: body.errorData == null && response.headers.has('Retry-After'),
22
+ retryAfterMs: getRetryAfterMillis(response),
23
+ cause: body.cause ? ErrorCodec.decode(body.cause) : undefined,
13
24
  });
25
+
26
+ return error;
14
27
  }
15
28
 
16
- public static fromHttpFailure(response: Response): EdgeCallFailedError {
29
+ public static async fromHttpFailure(response: Response): Promise<EdgeCallFailedError> {
17
30
  return new EdgeCallFailedError({
18
31
  reason: `HTTP code ${response.status}: ${response.statusText}.`,
19
32
  isRetryable: isRetryableCode(response.status),
20
33
  retryAfterMs: getRetryAfterMillis(response),
34
+ cause: await EdgeHttpErrorCodec.decode(response),
21
35
  });
22
36
  }
23
37
 
24
- public static fromUnsuccessfulResponse(response: Response, body: EdgeHttpFailure): EdgeCallFailedError {
38
+ public static fromProcessingFailureCause(cause: Error): EdgeCallFailedError {
25
39
  return new EdgeCallFailedError({
26
- reason: body.reason,
27
- errorData: body.errorData,
28
- isRetryable: body.errorData == null && response.headers.has('Retry-After'),
29
- retryAfterMs: getRetryAfterMillis(response),
40
+ reason: 'Error processing request.',
41
+ isRetryable: true,
42
+ cause,
30
43
  });
31
44
  }
32
45
 
@@ -64,12 +77,6 @@ const getRetryAfterMillis = (response: Response) => {
64
77
  return Number.isNaN(retryAfter) || retryAfter === 0 ? undefined : retryAfter * 1000;
65
78
  };
66
79
 
67
- export const createRetryableHttpFailure = (args: { reason: any; retryAfterSeconds: number }) => {
68
- return new Response(JSON.stringify({ success: false, reason: args.reason }), {
69
- headers: { 'Retry-After': String(args.retryAfterSeconds) },
70
- });
71
- };
72
-
73
80
  const isRetryableCode = (status: number) => {
74
81
  if (status === 501) {
75
82
  // Not Implemented
package/src/edge.ts CHANGED
@@ -2,32 +2,54 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
+ import { BaseError } from '@dxos/errors';
8
+ import { invariant } from '@dxos/invariant';
7
9
  import { SpaceId } from '@dxos/keys';
8
10
 
9
- // TODO(burdon): Rename EdgerRouterEndpoint?
11
+ // TODO(burdon): Rename EdgerRouterEndpoint.
12
+ // If we would rename it, we need to be careful to not break composer production.
10
13
  export enum EdgeService {
11
14
  AUTOMERGE_REPLICATOR = 'automerge-replicator',
12
15
  FEED_REPLICATOR = 'feed-replicator',
13
16
  SWARM = 'swarm',
14
17
  SIGNAL = 'signal',
18
+ STATUS = 'status',
15
19
  }
16
20
 
17
- export type EdgeHttpSuccess<T> = {
21
+ export type EdgeSuccess<T> = {
18
22
  success: true;
19
23
  data: T;
20
24
  };
21
25
 
26
+ export type SerializedError = {
27
+ code?: string;
28
+ message?: string;
29
+ context?: Record<string, unknown>;
30
+ stack?: string;
31
+ cause?: SerializedError;
32
+ };
33
+
22
34
  export type EdgeErrorData = { type: string } & Record<string, any>;
23
35
 
24
- export type EdgeHttpFailure = {
25
- // TODO(burdon): Why is this required?
36
+ /**
37
+ * This is the shape of the error response from the Edge service,
38
+ * when the error is gracefully handled, the Response will be an object with this shape and have status code 200.
39
+ */
40
+ export type EdgeFailure = {
41
+ /**
42
+ * Branded Type.
43
+ */
26
44
  success: false;
27
45
  /**
28
46
  * An explanation of why the call failed. Used mostly for logging and monitoring.
29
47
  */
30
48
  reason: string;
49
+ /**
50
+ * Cause Error captured on the EDGE service to aid debugging on the client.
51
+ */
52
+ cause?: SerializedError;
31
53
  /**
32
54
  * Information that can be used to retry the request such that it will succeed, for example:
33
55
  * 1. { type: 'auth_required', challenge: string }
@@ -41,7 +63,87 @@ export type EdgeHttpFailure = {
41
63
  errorData?: EdgeErrorData;
42
64
  };
43
65
 
44
- export type EdgeHttpResponse<T> = EdgeHttpSuccess<T> | EdgeHttpFailure;
66
+ /**
67
+ * Represents a body response from the Edge service.
68
+ */
69
+ export type EdgeBody<T> = EdgeSuccess<T> | EdgeFailure;
70
+
71
+ /**
72
+ * Use this to create a response from the Edge service.
73
+ */
74
+ export const EdgeResponse = Object.freeze({
75
+ success: <T>(data: T, status: number = 200): Response => {
76
+ invariant(status >= 200 && status < 300, 'Status code must be in the 2xx range');
77
+ const headers = new Headers({ 'Content-Type': 'application/json' });
78
+ return new Response(
79
+ JSON.stringify({
80
+ success: true,
81
+ data,
82
+ } satisfies EdgeSuccess<T>),
83
+ {
84
+ status,
85
+ headers,
86
+ },
87
+ );
88
+ },
89
+ failure: ({
90
+ reason,
91
+ cause,
92
+ errorData,
93
+ shouldRetryAfter,
94
+ status = 500,
95
+ }: {
96
+ /**
97
+ * An explanation of why the call failed. Used mostly for logging and monitoring.
98
+ */
99
+ reason: string;
100
+ /**
101
+ * Error that caused the failure.
102
+ * Useful for debugging.
103
+ */
104
+ cause?: Error;
105
+ /**
106
+ * Information that can be used to retry the request such that it will succeed, for example:
107
+ * 1. { type: 'auth_required', challenge: string }
108
+ * Requires retrying the request with challenge signature included.
109
+ * 2. { type: 'user_confirmation_required', dialog: { title: string, message: string, confirmation_payload: string } }
110
+ * Requires showing a confirmation dialog to a user and retrying the request with confirmation_payload included
111
+ * if the user confirms.
112
+ * When errorData is returned simply retrying the request won't have any effect.
113
+ * EdgeHttpClient should parse well-known errorData into Error types and throw.
114
+ */
115
+ errorData?: EdgeErrorData;
116
+ /**
117
+ * If provided, this request will be marked as retryable and the client will wait for the specified number of milliseconds before retrying.
118
+ * If not provided, the client will not retry the request.
119
+ */
120
+ shouldRetryAfter?: number;
121
+
122
+ /**
123
+ * Status code of the response.
124
+ * @default 500
125
+ */
126
+ status?: number;
127
+ }): Response => {
128
+ const headers = new Headers({ 'Content-Type': 'application/json' });
129
+ if (shouldRetryAfter) {
130
+ headers.set('Retry-After', String(shouldRetryAfter));
131
+ }
132
+
133
+ return new Response(
134
+ JSON.stringify({
135
+ success: false,
136
+ reason,
137
+ errorData,
138
+ cause: cause ? ErrorCodec.encode(cause) : undefined,
139
+ } satisfies EdgeFailure),
140
+ {
141
+ status,
142
+ headers,
143
+ },
144
+ );
145
+ },
146
+ });
45
147
 
46
148
  export type GetNotarizationResponseBody = {
47
149
  awaitingNotarization: { credentials: string[] };
@@ -116,15 +218,18 @@ export type GetAgentStatusResponseBody = {
116
218
 
117
219
  export type UploadFunctionRequest = {
118
220
  name?: string;
119
- script: string;
120
221
  version: string;
121
222
  ownerPublicKey: string;
223
+ entryPoint: string;
224
+ assets: Record<string, Uint8Array>;
122
225
  };
123
226
 
124
227
  export type UploadFunctionResponseBody = {
125
228
  functionId: string;
126
229
  version: string;
127
230
  meta: {
231
+ key?: string;
232
+ name?: string;
128
233
  description?: string;
129
234
  /**
130
235
  * JSON Schema for the input of the function.
@@ -138,12 +243,18 @@ export type UploadFunctionResponseBody = {
138
243
  };
139
244
 
140
245
  export type CreateSpaceRequest = {
246
+ /**
247
+ * HEX encoded public key of the agent.
248
+ */
141
249
  agentKey: string;
142
250
  };
143
251
 
144
252
  export type CreateSpaceResponseBody = {
253
+ /**
254
+ * HEX encoded public key of the space.
255
+ */
145
256
  spaceKey: string;
146
- spaceId: string; // TODO(burdon): Use SpaceId.
257
+ spaceId: SpaceId;
147
258
  automergeRoot: string;
148
259
  };
149
260
 
@@ -220,3 +331,124 @@ export type EdgeStatus = {
220
331
  fetchError?: string;
221
332
  };
222
333
  };
334
+
335
+ //
336
+ // Space import/export.
337
+ //
338
+
339
+ export type ImportBundleRequest = {
340
+ bundle: {
341
+ /**
342
+ * DocumentId.
343
+ */
344
+ documentId: string;
345
+ /**
346
+ * Encoded mutation.
347
+ */
348
+ mutation: string;
349
+ /**
350
+ * Heads of the document.
351
+ */
352
+ heads: string[];
353
+ }[];
354
+ };
355
+
356
+ export type ExportBundleRequest = {
357
+ /**
358
+ * DocumentId -> Heads (decoded heads since which we want to export).
359
+ */
360
+ docHeads: Record<string, string[]>;
361
+ };
362
+
363
+ export type ExportBundleResponse = {
364
+ bundle: {
365
+ /**
366
+ * DocumentId.
367
+ */
368
+ documentId: string;
369
+ /**
370
+ * Encoded mutation.
371
+ */
372
+ mutation: string;
373
+ }[];
374
+ };
375
+
376
+ export const DocumentCodec = Object.freeze({
377
+ encode: (doc: Uint8Array) => Buffer.from(doc).toString('base64'),
378
+ decode: (doc: string) => new Uint8Array(Buffer.from(doc, 'base64')),
379
+ });
380
+
381
+ const MAX_ERROR_DEPTH = 3;
382
+
383
+ /**
384
+ * Codec for serializing and deserializing Edge Errors.
385
+ */
386
+ export const ErrorCodec = Object.freeze({
387
+ encode: (err: Error, depth: number = 0): SerializedError => ({
388
+ code: 'code' in err ? (err as any).code : undefined,
389
+ message: err.message,
390
+ stack: err.stack,
391
+ cause: err.cause instanceof Error && depth < MAX_ERROR_DEPTH ? ErrorCodec.encode(err.cause, depth + 1) : undefined,
392
+ }),
393
+ decode: (serializedError: SerializedError, depth: number = 0): Error => {
394
+ let err: Error;
395
+ if (typeof serializedError.code === 'string') {
396
+ err = new BaseError(serializedError.code, {
397
+ message: serializedError.message ?? 'Unknown error',
398
+ cause:
399
+ serializedError.cause && depth < MAX_ERROR_DEPTH
400
+ ? ErrorCodec.decode(serializedError.cause, depth + 1)
401
+ : undefined,
402
+ context: serializedError.context,
403
+ });
404
+
405
+ if (serializedError.stack) {
406
+ Object.defineProperty(err, 'stack', {
407
+ value: serializedError.stack,
408
+ });
409
+ }
410
+ } else {
411
+ err = new Error(serializedError.message ?? 'Unknown error', {
412
+ cause:
413
+ serializedError.cause && depth < MAX_ERROR_DEPTH
414
+ ? ErrorCodec.decode(serializedError.cause, depth + 1)
415
+ : undefined,
416
+ });
417
+
418
+ if (serializedError.stack) {
419
+ Object.defineProperty(err, 'stack', {
420
+ value: serializedError.stack,
421
+ });
422
+ }
423
+ }
424
+
425
+ return err;
426
+ },
427
+ });
428
+
429
+ /**
430
+ * Codec for serializing and deserializing Edge unhandled HTTP errors.
431
+ */
432
+ export const EdgeHttpErrorCodec = Object.freeze({
433
+ encode: (err: Error): Response =>
434
+ new Response(
435
+ JSON.stringify({
436
+ error: ErrorCodec.encode(err),
437
+ }),
438
+ { status: 500 },
439
+ ),
440
+
441
+ decode: async (response: Response): Promise<Error | undefined> => {
442
+ if (response.headers.get('Content-Type') !== 'application/json') {
443
+ const body = await response.clone().text();
444
+ return new Error(body.slice(0, 256));
445
+ }
446
+
447
+ const body = await response.clone().json();
448
+ if (!('error' in body)) {
449
+ return undefined;
450
+ }
451
+
452
+ return ErrorCodec.decode(body.error);
453
+ },
454
+ });
@@ -2,6 +2,8 @@
2
2
  // Copyright 2021 DXOS.org
3
3
  //
4
4
 
5
+ // TODO(dmaretskyi): Reconcile with @dxos/errors
6
+
5
7
  /**
6
8
  * NOTE: Messages should be sentences (Start with a capital letter and end with a period).
7
9
  * Errors can optionally include a JSON context object.
@@ -2,9 +2,10 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { reconstructError } from './helpers.js';
6
5
  import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.js';
7
6
 
7
+ import { reconstructError } from './helpers.js';
8
+
8
9
  export const encodeError = (err: any): SerializedErrorProto => {
9
10
  if (typeof err === 'object' && err?.message) {
10
11
  return {
@@ -4,9 +4,10 @@
4
4
 
5
5
  import { PublicKey } from '@dxos/keys';
6
6
 
7
+ import type { ObjectId } from '../types.js';
8
+
7
9
  import { ApiError, BaseError, DatabaseError, SystemError } from './base-errors.js';
8
10
  import { registerError, registerErrorMessageContext, registerErrorNoArgs } from './helpers.js';
9
- import type { ObjectId } from '../types.js';
10
11
 
11
12
  /**
12
13
  * Thrown when request was terminated because the RPC endpoint has been closed.
@@ -4,9 +4,10 @@
4
4
 
5
5
  import { invariant } from '@dxos/invariant';
6
6
 
7
- import { SystemError } from './base-errors.js';
8
7
  import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.js';
9
8
 
9
+ import { SystemError } from './base-errors.js';
10
+
10
11
  export const reconstructError = (error: SerializedErrorProto) => {
11
12
  const { name, message, context } = error;
12
13
  return errorFromCode(name, message, context);
package/src/index.ts CHANGED
@@ -2,15 +2,15 @@
2
2
  // Copyright 2021 DXOS.org
3
3
  //
4
4
 
5
+ export * from './automerge.js';
6
+ export * from './edge-error.js';
7
+ export * from './edge.js';
5
8
  export * from './errors/index.js';
6
9
  export * from './indexing.js';
7
- export * from './storage.js';
8
- export * from './tracing.js';
9
- export * from './types.js';
10
- export * from './query.js';
11
10
  export * from './profile-archive.js';
12
- export * from './automerge.js';
13
- export * from './edge.js';
11
+ export * from './query.js';
14
12
  export * from './queue.js';
15
13
  export * from './space-archive.js';
16
- export * from './edge-error.js';
14
+ export * from './storage.js';
15
+ export * from './tracing.js';
16
+ export type * from './types.js';
package/src/indexing.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
7
  export type ObjectPointerDecoded = {
8
8
  spaceKey: string | undefined;
package/src/invitation.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
7
  import { ParamKeyAnnotation } from '@dxos/effect';
8
8
 
@@ -596,9 +596,26 @@ service EdgeAgentService {
596
596
  rpc QueryAgentStatus(google.protobuf.Empty) returns (stream QueryAgentStatusResponse);
597
597
  }
598
598
 
599
- enum EdgeStatus {
600
- NOT_CONNECTED = 0;
601
- CONNECTED = 1;
599
+ message EdgeStatus {
600
+ enum ConnectionState {
601
+ NOT_CONNECTED = 0;
602
+ CONNECTED = 1;
603
+ }
604
+
605
+ ConnectionState state = 1;
606
+ /** Latency in ms */
607
+ int32 rtt = 2;
608
+
609
+ /** How long the connection has been up */
610
+ int32 uptime = 3;
611
+
612
+ /** Upload rate in bytes per second */
613
+ int32 rate_bytes_up = 4;
614
+ /** Download rate in bytes per second */
615
+ int32 rate_bytes_down = 5;
616
+
617
+ int32 messages_sent = 6;
618
+ int32 messages_received = 7;
602
619
  }
603
620
 
604
621
  message QueryEdgeStatusResponse {