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

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 (296) hide show
  1. package/dist/src/FunctionProtocol.d.ts +76 -0
  2. package/dist/src/FunctionProtocol.d.ts.map +1 -0
  3. package/dist/src/FunctionProtocol.js +4 -0
  4. package/dist/src/FunctionProtocol.js.map +1 -0
  5. package/dist/src/automerge.d.ts +8 -0
  6. package/dist/src/automerge.d.ts.map +1 -1
  7. package/dist/src/automerge.js.map +1 -1
  8. package/dist/src/buf/proto/gen/dxos/agent/dashboard_pb.d.ts +1 -1
  9. package/dist/src/buf/proto/gen/dxos/agent/dashboard_pb.js +1 -1
  10. package/dist/src/buf/proto/gen/dxos/agent/echo-proxy_pb.d.ts +1 -1
  11. package/dist/src/buf/proto/gen/dxos/agent/echo-proxy_pb.js +1 -1
  12. package/dist/src/buf/proto/gen/dxos/agent/epoch_pb.d.ts +1 -1
  13. package/dist/src/buf/proto/gen/dxos/agent/epoch_pb.js +1 -1
  14. package/dist/src/buf/proto/gen/dxos/agent/functions_pb.d.ts +1 -1
  15. package/dist/src/buf/proto/gen/dxos/agent/functions_pb.js +1 -1
  16. package/dist/src/buf/proto/gen/dxos/bot_pb.d.ts +1 -1
  17. package/dist/src/buf/proto/gen/dxos/bot_pb.js +1 -1
  18. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.d.ts +1 -1
  19. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.js +1 -1
  20. package/dist/src/buf/proto/gen/dxos/client/logging_pb.d.ts +1 -1
  21. package/dist/src/buf/proto/gen/dxos/client/logging_pb.js +1 -1
  22. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +65 -19
  23. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  24. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +28 -23
  25. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  26. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +36 -7
  27. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  28. package/dist/src/buf/proto/gen/dxos/config_pb.js +7 -2
  29. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  30. package/dist/src/buf/proto/gen/dxos/devtools/diagnostics_pb.d.ts +1 -1
  31. package/dist/src/buf/proto/gen/dxos/devtools/diagnostics_pb.js +1 -1
  32. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.d.ts +1 -1
  33. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.js +1 -1
  34. package/dist/src/buf/proto/gen/dxos/devtools/swarm_pb.d.ts +1 -1
  35. package/dist/src/buf/proto/gen/dxos/devtools/swarm_pb.js +1 -1
  36. package/dist/src/buf/proto/gen/dxos/echo/blob_pb.d.ts +1 -1
  37. package/dist/src/buf/proto/gen/dxos/echo/blob_pb.js +1 -1
  38. package/dist/src/buf/proto/gen/dxos/echo/feed_pb.d.ts +1 -1
  39. package/dist/src/buf/proto/gen/dxos/echo/feed_pb.js +1 -1
  40. package/dist/src/buf/proto/gen/dxos/echo/filter_pb.d.ts +1 -1
  41. package/dist/src/buf/proto/gen/dxos/echo/filter_pb.js +1 -1
  42. package/dist/src/buf/proto/gen/dxos/echo/indexing_pb.d.ts +1 -1
  43. package/dist/src/buf/proto/gen/dxos/echo/indexing_pb.js +1 -1
  44. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +1 -1
  45. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
  46. package/dist/src/buf/proto/gen/dxos/echo/model/document_pb.d.ts +1 -1
  47. package/dist/src/buf/proto/gen/dxos/echo/model/document_pb.js +1 -1
  48. package/dist/src/buf/proto/gen/dxos/echo/model/messenger_pb.d.ts +1 -1
  49. package/dist/src/buf/proto/gen/dxos/echo/model/messenger_pb.js +1 -1
  50. package/dist/src/buf/proto/gen/dxos/echo/model/text_pb.d.ts +1 -1
  51. package/dist/src/buf/proto/gen/dxos/echo/model/text_pb.js +1 -1
  52. package/dist/src/buf/proto/gen/dxos/echo/object_pb.d.ts +1 -1
  53. package/dist/src/buf/proto/gen/dxos/echo/object_pb.js +1 -1
  54. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +1 -1
  55. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  56. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +16 -1
  57. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  58. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +2 -2
  59. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  60. package/dist/src/buf/proto/gen/dxos/echo/snapshot_pb.d.ts +1 -1
  61. package/dist/src/buf/proto/gen/dxos/echo/snapshot_pb.js +1 -1
  62. package/dist/src/buf/proto/gen/dxos/echo/timeframe_pb.d.ts +1 -1
  63. package/dist/src/buf/proto/gen/dxos/echo/timeframe_pb.js +1 -1
  64. package/dist/src/buf/proto/gen/dxos/edge/calls_pb.d.ts +1 -1
  65. package/dist/src/buf/proto/gen/dxos/edge/calls_pb.js +1 -1
  66. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +1 -1
  67. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +1 -1
  68. package/dist/src/buf/proto/gen/dxos/edge/signal_pb.d.ts +1 -1
  69. package/dist/src/buf/proto/gen/dxos/edge/signal_pb.js +1 -1
  70. package/dist/src/buf/proto/gen/dxos/error_pb.d.ts +1 -1
  71. package/dist/src/buf/proto/gen/dxos/error_pb.js +1 -1
  72. package/dist/src/buf/proto/gen/dxos/field_options_pb.d.ts +1 -1
  73. package/dist/src/buf/proto/gen/dxos/field_options_pb.js +1 -1
  74. package/dist/src/buf/proto/gen/dxos/google_pb.d.ts +1 -1
  75. package/dist/src/buf/proto/gen/dxos/google_pb.js +2 -2
  76. package/dist/src/buf/proto/gen/dxos/gravity_pb.d.ts +1 -1
  77. package/dist/src/buf/proto/gen/dxos/gravity_pb.js +1 -1
  78. package/dist/src/buf/proto/gen/dxos/halo/credentials/auth_pb.d.ts +1 -1
  79. package/dist/src/buf/proto/gen/dxos/halo/credentials/auth_pb.js +1 -1
  80. package/dist/src/buf/proto/gen/dxos/halo/credentials/greet_pb.d.ts +1 -1
  81. package/dist/src/buf/proto/gen/dxos/halo/credentials/greet_pb.js +1 -1
  82. package/dist/src/buf/proto/gen/dxos/halo/credentials/identity_pb.d.ts +1 -1
  83. package/dist/src/buf/proto/gen/dxos/halo/credentials/identity_pb.js +1 -1
  84. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +1 -1
  85. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +1 -1
  86. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.d.ts +1 -1
  87. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.js +1 -1
  88. package/dist/src/buf/proto/gen/dxos/halo/keyring_pb.d.ts +1 -1
  89. package/dist/src/buf/proto/gen/dxos/halo/keyring_pb.js +1 -1
  90. package/dist/src/buf/proto/gen/dxos/halo/keys_pb.d.ts +1 -1
  91. package/dist/src/buf/proto/gen/dxos/halo/keys_pb.js +1 -1
  92. package/dist/src/buf/proto/gen/dxos/halo/signed_pb.d.ts +1 -1
  93. package/dist/src/buf/proto/gen/dxos/halo/signed_pb.js +1 -1
  94. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -1
  95. package/dist/src/buf/proto/gen/dxos/iframe_pb.js +1 -1
  96. package/dist/src/buf/proto/gen/dxos/keys_pb.d.ts +1 -1
  97. package/dist/src/buf/proto/gen/dxos/keys_pb.js +1 -1
  98. package/dist/src/buf/proto/gen/dxos/mesh/bridge_pb.d.ts +1 -1
  99. package/dist/src/buf/proto/gen/dxos/mesh/bridge_pb.js +1 -1
  100. package/dist/src/buf/proto/gen/dxos/mesh/broadcast_pb.d.ts +1 -1
  101. package/dist/src/buf/proto/gen/dxos/mesh/broadcast_pb.js +1 -1
  102. package/dist/src/buf/proto/gen/dxos/mesh/messaging_pb.d.ts +1 -1
  103. package/dist/src/buf/proto/gen/dxos/mesh/messaging_pb.js +1 -1
  104. package/dist/src/buf/proto/gen/dxos/mesh/muxer_pb.d.ts +1 -1
  105. package/dist/src/buf/proto/gen/dxos/mesh/muxer_pb.js +1 -1
  106. package/dist/src/buf/proto/gen/dxos/mesh/presence_pb.d.ts +1 -1
  107. package/dist/src/buf/proto/gen/dxos/mesh/presence_pb.js +1 -1
  108. package/dist/src/buf/proto/gen/dxos/mesh/protocol_pb.d.ts +1 -1
  109. package/dist/src/buf/proto/gen/dxos/mesh/protocol_pb.js +1 -1
  110. package/dist/src/buf/proto/gen/dxos/mesh/replicator_pb.d.ts +1 -1
  111. package/dist/src/buf/proto/gen/dxos/mesh/replicator_pb.js +1 -1
  112. package/dist/src/buf/proto/gen/dxos/mesh/signal_pb.d.ts +1 -1
  113. package/dist/src/buf/proto/gen/dxos/mesh/signal_pb.js +1 -1
  114. package/dist/src/buf/proto/gen/dxos/mesh/swarm_pb.d.ts +1 -1
  115. package/dist/src/buf/proto/gen/dxos/mesh/swarm_pb.js +1 -1
  116. package/dist/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.d.ts +1 -1
  117. package/dist/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.js +1 -1
  118. package/dist/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.d.ts +1 -1
  119. package/dist/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.js +1 -1
  120. package/dist/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.d.ts +1 -1
  121. package/dist/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.js +1 -1
  122. package/dist/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.d.ts +1 -1
  123. package/dist/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.js +1 -1
  124. package/dist/src/buf/proto/gen/dxos/mesh/teleport/control_pb.d.ts +1 -1
  125. package/dist/src/buf/proto/gen/dxos/mesh/teleport/control_pb.js +1 -1
  126. package/dist/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.d.ts +1 -1
  127. package/dist/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.js +1 -1
  128. package/dist/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.d.ts +1 -1
  129. package/dist/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.js +1 -1
  130. package/dist/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.d.ts +1 -1
  131. package/dist/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.js +1 -1
  132. package/dist/src/buf/proto/gen/dxos/registry_pb.d.ts +1 -1
  133. package/dist/src/buf/proto/gen/dxos/registry_pb.js +1 -1
  134. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +1 -1
  135. package/dist/src/buf/proto/gen/dxos/rpc_pb.js +1 -1
  136. package/dist/src/buf/proto/gen/dxos/service/agentmanager_pb.d.ts +1 -1
  137. package/dist/src/buf/proto/gen/dxos/service/agentmanager_pb.js +1 -1
  138. package/dist/src/buf/proto/gen/dxos/service/publisher_pb.d.ts +1 -1
  139. package/dist/src/buf/proto/gen/dxos/service/publisher_pb.js +1 -1
  140. package/dist/src/buf/proto/gen/dxos/service/supervisor_pb.d.ts +1 -1
  141. package/dist/src/buf/proto/gen/dxos/service/supervisor_pb.js +1 -1
  142. package/dist/src/buf/proto/gen/dxos/service/tunnel_pb.d.ts +1 -1
  143. package/dist/src/buf/proto/gen/dxos/service/tunnel_pb.js +1 -1
  144. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -1
  145. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +2 -2
  146. package/dist/src/buf/proto/gen/dxos/type_pb.d.ts +1 -1
  147. package/dist/src/buf/proto/gen/dxos/type_pb.js +1 -1
  148. package/dist/src/buf/proto/gen/dxos/value_pb.d.ts +1 -1
  149. package/dist/src/buf/proto/gen/dxos/value_pb.js +1 -1
  150. package/dist/src/buf/proto/gen/example/testing/data_pb.d.ts +1 -1
  151. package/dist/src/buf/proto/gen/example/testing/data_pb.js +1 -1
  152. package/dist/src/buf/proto/gen/example/testing/rpc_pb.d.ts +1 -1
  153. package/dist/src/buf/proto/gen/example/testing/rpc_pb.js +1 -1
  154. package/dist/src/edge-error.d.ts +11 -7
  155. package/dist/src/edge-error.d.ts.map +1 -1
  156. package/dist/src/edge-error.js +24 -16
  157. package/dist/src/edge-error.js.map +1 -1
  158. package/dist/src/edge.d.ts +142 -7
  159. package/dist/src/edge.d.ts.map +1 -1
  160. package/dist/src/edge.js +114 -2
  161. package/dist/src/edge.js.map +1 -1
  162. package/dist/src/errors/base-errors.d.ts.map +1 -1
  163. package/dist/src/errors/base-errors.js +1 -0
  164. package/dist/src/errors/base-errors.js.map +1 -1
  165. package/dist/src/errors/encoding.d.ts.map +1 -1
  166. package/dist/src/errors/encoding.js.map +1 -1
  167. package/dist/src/errors/errors.d.ts +1 -1
  168. package/dist/src/errors/errors.d.ts.map +1 -1
  169. package/dist/src/errors/errors.js.map +1 -1
  170. package/dist/src/errors/helpers.d.ts.map +1 -1
  171. package/dist/src/errors/helpers.js.map +1 -1
  172. package/dist/src/index.d.ts +8 -7
  173. package/dist/src/index.d.ts.map +1 -1
  174. package/dist/src/index.js +7 -7
  175. package/dist/src/index.js.map +1 -1
  176. package/dist/src/indexing.d.ts +1 -1
  177. package/dist/src/indexing.d.ts.map +1 -1
  178. package/dist/src/indexing.js +1 -1
  179. package/dist/src/indexing.js.map +1 -1
  180. package/dist/src/invitation.d.ts +1 -1
  181. package/dist/src/invitation.d.ts.map +1 -1
  182. package/dist/src/invitation.js +1 -1
  183. package/dist/src/invitation.js.map +1 -1
  184. package/dist/src/proto/gen/dxos/client/services.d.ts +793 -766
  185. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  186. package/dist/src/proto/gen/dxos/client/services.js +103 -100
  187. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  188. package/dist/src/proto/gen/dxos/config.d.ts +28 -2
  189. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  190. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  191. package/dist/src/proto/gen/dxos/echo/service.d.ts +9 -0
  192. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  193. package/dist/src/proto/gen/index.d.ts +2 -0
  194. package/dist/src/proto/gen/index.d.ts.map +1 -1
  195. package/dist/src/proto/gen/index.js +1 -1
  196. package/dist/src/proto/gen/index.js.map +1 -1
  197. package/dist/src/proto/index.d.ts +1 -1
  198. package/dist/src/proto/index.d.ts.map +1 -1
  199. package/dist/src/proto/index.js +0 -1
  200. package/dist/src/proto/index.js.map +1 -1
  201. package/dist/src/queue.d.ts +13 -0
  202. package/dist/src/queue.d.ts.map +1 -1
  203. package/dist/src/queue.js +4 -0
  204. package/dist/src/queue.js.map +1 -1
  205. package/dist/tsconfig.tsbuildinfo +1 -1
  206. package/package.json +13 -15
  207. package/src/FunctionProtocol.ts +100 -0
  208. package/src/automerge.ts +8 -0
  209. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +3 -3
  210. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +3 -3
  211. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +3 -3
  212. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +3 -3
  213. package/src/buf/proto/gen/dxos/bot_pb.ts +3 -3
  214. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +3 -3
  215. package/src/buf/proto/gen/dxos/client/logging_pb.ts +3 -3
  216. package/src/buf/proto/gen/dxos/client/services_pb.ts +84 -29
  217. package/src/buf/proto/gen/dxos/config_pb.ts +43 -10
  218. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +3 -3
  219. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +3 -3
  220. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +3 -3
  221. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +3 -3
  222. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +3 -3
  223. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +3 -3
  224. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +3 -3
  225. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +3 -3
  226. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +3 -3
  227. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +3 -3
  228. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +3 -3
  229. package/src/buf/proto/gen/dxos/echo/object_pb.ts +3 -3
  230. package/src/buf/proto/gen/dxos/echo/query_pb.ts +3 -3
  231. package/src/buf/proto/gen/dxos/echo/service_pb.ts +21 -4
  232. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +3 -3
  233. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +3 -3
  234. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +3 -3
  235. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +3 -3
  236. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +3 -3
  237. package/src/buf/proto/gen/dxos/error_pb.ts +3 -3
  238. package/src/buf/proto/gen/dxos/field_options_pb.ts +3 -3
  239. package/src/buf/proto/gen/dxos/google_pb.ts +3 -3
  240. package/src/buf/proto/gen/dxos/gravity_pb.ts +3 -3
  241. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +3 -3
  242. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +3 -3
  243. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +3 -3
  244. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +3 -3
  245. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +3 -3
  246. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +3 -3
  247. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +3 -3
  248. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +3 -3
  249. package/src/buf/proto/gen/dxos/iframe_pb.ts +3 -3
  250. package/src/buf/proto/gen/dxos/keys_pb.ts +3 -3
  251. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +3 -3
  252. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +3 -3
  253. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +3 -3
  254. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +3 -3
  255. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +3 -3
  256. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +3 -3
  257. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +3 -3
  258. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +3 -3
  259. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +3 -3
  260. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +3 -3
  261. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +3 -3
  262. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +3 -3
  263. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +3 -3
  264. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +3 -3
  265. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +3 -3
  266. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +3 -3
  267. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +3 -3
  268. package/src/buf/proto/gen/dxos/registry_pb.ts +3 -3
  269. package/src/buf/proto/gen/dxos/rpc_pb.ts +3 -3
  270. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +3 -3
  271. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +3 -3
  272. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +3 -3
  273. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +3 -3
  274. package/src/buf/proto/gen/dxos/tracing_pb.ts +3 -3
  275. package/src/buf/proto/gen/dxos/type_pb.ts +3 -3
  276. package/src/buf/proto/gen/dxos/value_pb.ts +3 -3
  277. package/src/buf/proto/gen/example/testing/data_pb.ts +3 -3
  278. package/src/buf/proto/gen/example/testing/rpc_pb.ts +3 -3
  279. package/src/edge-error.ts +25 -18
  280. package/src/edge.ts +263 -8
  281. package/src/errors/base-errors.ts +2 -0
  282. package/src/errors/encoding.ts +2 -1
  283. package/src/errors/errors.ts +2 -1
  284. package/src/errors/helpers.ts +2 -1
  285. package/src/index.ts +8 -7
  286. package/src/indexing.ts +1 -1
  287. package/src/invitation.ts +1 -1
  288. package/src/proto/dxos/client/services.proto +20 -3
  289. package/src/proto/dxos/config.proto +36 -40
  290. package/src/proto/dxos/echo/service.proto +11 -0
  291. package/src/proto/gen/dxos/client/services.ts +793 -766
  292. package/src/proto/gen/dxos/config.ts +28 -2
  293. package/src/proto/gen/dxos/echo/service.ts +9 -0
  294. package/src/proto/gen/index.ts +3 -1
  295. package/src/proto/index.ts +1 -1
  296. package/src/queue.ts +18 -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,59 @@
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
+ // TODO(dmaretskyi): Refactor this type to just be { success: false, error: SerializedError }
41
+ // reason -> error.message
42
+ // cause -> error.cause
43
+ // errorData.type -> error.code
44
+ // ...errorData -> error.context
45
+ export type EdgeFailure = {
46
+ /**
47
+ * Branded Type.
48
+ */
26
49
  success: false;
27
50
  /**
28
51
  * An explanation of why the call failed. Used mostly for logging and monitoring.
29
52
  */
30
53
  reason: string;
54
+ /**
55
+ * Cause Error captured on the EDGE service to aid debugging on the client.
56
+ */
57
+ cause?: SerializedError;
31
58
  /**
32
59
  * Information that can be used to retry the request such that it will succeed, for example:
33
60
  * 1. { type: 'auth_required', challenge: string }
@@ -41,7 +68,87 @@ export type EdgeHttpFailure = {
41
68
  errorData?: EdgeErrorData;
42
69
  };
43
70
 
44
- export type EdgeHttpResponse<T> = EdgeHttpSuccess<T> | EdgeHttpFailure;
71
+ /**
72
+ * Represents a body response from the Edge service.
73
+ */
74
+ export type EdgeBody<T> = EdgeSuccess<T> | EdgeFailure;
75
+
76
+ /**
77
+ * Use this to create a response from the Edge service.
78
+ */
79
+ export const EdgeResponse = Object.freeze({
80
+ success: <T>(data: T, status: number = 200): Response => {
81
+ invariant(status >= 200 && status < 300, 'Status code must be in the 2xx range');
82
+ const headers = new Headers({ 'Content-Type': 'application/json' });
83
+ return new Response(
84
+ JSON.stringify({
85
+ success: true,
86
+ data,
87
+ } satisfies EdgeSuccess<T>),
88
+ {
89
+ status,
90
+ headers,
91
+ },
92
+ );
93
+ },
94
+ failure: ({
95
+ reason,
96
+ cause,
97
+ errorData,
98
+ shouldRetryAfter,
99
+ status = 500,
100
+ }: {
101
+ /**
102
+ * An explanation of why the call failed. Used mostly for logging and monitoring.
103
+ */
104
+ reason: string;
105
+ /**
106
+ * Error that caused the failure.
107
+ * Useful for debugging.
108
+ */
109
+ cause?: Error;
110
+ /**
111
+ * Information that can be used to retry the request such that it will succeed, for example:
112
+ * 1. { type: 'auth_required', challenge: string }
113
+ * Requires retrying the request with challenge signature included.
114
+ * 2. { type: 'user_confirmation_required', dialog: { title: string, message: string, confirmation_payload: string } }
115
+ * Requires showing a confirmation dialog to a user and retrying the request with confirmation_payload included
116
+ * if the user confirms.
117
+ * When errorData is returned simply retrying the request won't have any effect.
118
+ * EdgeHttpClient should parse well-known errorData into Error types and throw.
119
+ */
120
+ errorData?: EdgeErrorData;
121
+ /**
122
+ * If provided, this request will be marked as retryable and the client will wait for the specified number of milliseconds before retrying.
123
+ * If not provided, the client will not retry the request.
124
+ */
125
+ shouldRetryAfter?: number;
126
+
127
+ /**
128
+ * Status code of the response.
129
+ * @default 500
130
+ */
131
+ status?: number;
132
+ }): Response => {
133
+ const headers = new Headers({ 'Content-Type': 'application/json' });
134
+ if (shouldRetryAfter) {
135
+ headers.set('Retry-After', String(shouldRetryAfter));
136
+ }
137
+
138
+ return new Response(
139
+ JSON.stringify({
140
+ success: false,
141
+ reason,
142
+ errorData,
143
+ cause: cause ? ErrorCodec.encode(cause) : undefined,
144
+ } satisfies EdgeFailure),
145
+ {
146
+ status,
147
+ headers,
148
+ },
149
+ );
150
+ },
151
+ });
45
152
 
46
153
  export type GetNotarizationResponseBody = {
47
154
  awaitingNotarization: { credentials: string[] };
@@ -116,15 +223,36 @@ export type GetAgentStatusResponseBody = {
116
223
 
117
224
  export type UploadFunctionRequest = {
118
225
  name?: string;
119
- script: string;
120
226
  version: string;
121
227
  ownerPublicKey: string;
228
+ entryPoint: string;
229
+ assets: Record<string, Uint8Array>;
230
+ /**
231
+ * Runtime in Edge that will be used to run the function.
232
+ * Runtime cannot be changed once the function was deployed.
233
+ * @default Runtime.WORKERS_FOR_PLATFORMS
234
+ */
235
+ runtime?: Runtime;
122
236
  };
123
237
 
238
+ /**
239
+ * Note: Do not change the values of these enums, this values are stored in the FunctionVersions database.
240
+ */
241
+ export enum Runtime {
242
+ // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
243
+ WORKERS_FOR_PLATFORMS = 'WORKERS_FOR_PLATFORMS',
244
+ // https://developers.cloudflare.com/workers/runtime-apis/bindings/worker-loader/
245
+ WORKER_LOADER = 'WORKER_LOADER',
246
+ // Local worker dispatcher for testing.
247
+ TEST = 'TEST',
248
+ }
249
+
124
250
  export type UploadFunctionResponseBody = {
125
251
  functionId: string;
126
252
  version: string;
127
253
  meta: {
254
+ key?: string;
255
+ name?: string;
128
256
  description?: string;
129
257
  /**
130
258
  * JSON Schema for the input of the function.
@@ -138,12 +266,18 @@ export type UploadFunctionResponseBody = {
138
266
  };
139
267
 
140
268
  export type CreateSpaceRequest = {
269
+ /**
270
+ * HEX encoded public key of the agent.
271
+ */
141
272
  agentKey: string;
142
273
  };
143
274
 
144
275
  export type CreateSpaceResponseBody = {
276
+ /**
277
+ * HEX encoded public key of the space.
278
+ */
145
279
  spaceKey: string;
146
- spaceId: string; // TODO(burdon): Use SpaceId.
280
+ spaceId: SpaceId;
147
281
  automergeRoot: string;
148
282
  };
149
283
 
@@ -220,3 +354,124 @@ export type EdgeStatus = {
220
354
  fetchError?: string;
221
355
  };
222
356
  };
357
+
358
+ //
359
+ // Space import/export.
360
+ //
361
+
362
+ export type ImportBundleRequest = {
363
+ bundle: {
364
+ /**
365
+ * DocumentId.
366
+ */
367
+ documentId: string;
368
+ /**
369
+ * Encoded mutation.
370
+ */
371
+ mutation: string;
372
+ /**
373
+ * Heads of the document.
374
+ */
375
+ heads: string[];
376
+ }[];
377
+ };
378
+
379
+ export type ExportBundleRequest = {
380
+ /**
381
+ * DocumentId -> Heads (decoded heads since which we want to export).
382
+ */
383
+ docHeads: Record<string, string[]>;
384
+ };
385
+
386
+ export type ExportBundleResponse = {
387
+ bundle: {
388
+ /**
389
+ * DocumentId.
390
+ */
391
+ documentId: string;
392
+ /**
393
+ * Encoded mutation.
394
+ */
395
+ mutation: string;
396
+ }[];
397
+ };
398
+
399
+ export const DocumentCodec = Object.freeze({
400
+ encode: (doc: Uint8Array) => Buffer.from(doc).toString('base64'),
401
+ decode: (doc: string) => new Uint8Array(Buffer.from(doc, 'base64')),
402
+ });
403
+
404
+ const MAX_ERROR_DEPTH = 3;
405
+
406
+ /**
407
+ * Codec for serializing and deserializing Edge Errors.
408
+ */
409
+ export const ErrorCodec = Object.freeze({
410
+ encode: (err: Error, depth: number = 0): SerializedError => ({
411
+ code: 'code' in err ? (err as any).code : undefined,
412
+ message: err.message,
413
+ stack: err.stack,
414
+ cause: err.cause instanceof Error && depth < MAX_ERROR_DEPTH ? ErrorCodec.encode(err.cause, depth + 1) : undefined,
415
+ }),
416
+ decode: (serializedError: SerializedError, depth: number = 0): Error => {
417
+ let err: Error;
418
+ if (typeof serializedError.code === 'string') {
419
+ err = new BaseError(serializedError.code, {
420
+ message: serializedError.message ?? 'Unknown error',
421
+ cause:
422
+ serializedError.cause && depth < MAX_ERROR_DEPTH
423
+ ? ErrorCodec.decode(serializedError.cause, depth + 1)
424
+ : undefined,
425
+ context: serializedError.context,
426
+ });
427
+
428
+ if (serializedError.stack) {
429
+ Object.defineProperty(err, 'stack', {
430
+ value: serializedError.stack,
431
+ });
432
+ }
433
+ } else {
434
+ err = new Error(serializedError.message ?? 'Unknown error', {
435
+ cause:
436
+ serializedError.cause && depth < MAX_ERROR_DEPTH
437
+ ? ErrorCodec.decode(serializedError.cause, depth + 1)
438
+ : undefined,
439
+ });
440
+
441
+ if (serializedError.stack) {
442
+ Object.defineProperty(err, 'stack', {
443
+ value: serializedError.stack,
444
+ });
445
+ }
446
+ }
447
+
448
+ return err;
449
+ },
450
+ });
451
+
452
+ /**
453
+ * Codec for serializing and deserializing Edge unhandled HTTP errors.
454
+ */
455
+ export const EdgeHttpErrorCodec = Object.freeze({
456
+ encode: (err: Error): Response =>
457
+ new Response(
458
+ JSON.stringify({
459
+ error: ErrorCodec.encode(err),
460
+ }),
461
+ { status: 500 },
462
+ ),
463
+
464
+ decode: async (response: Response): Promise<Error | undefined> => {
465
+ if (response.headers.get('Content-Type') !== 'application/json') {
466
+ const body = await response.clone().text();
467
+ return new Error(body.slice(0, 256));
468
+ }
469
+
470
+ const body = await response.clone().json();
471
+ if (!('error' in body)) {
472
+ return undefined;
473
+ }
474
+
475
+ return ErrorCodec.decode(body.error);
476
+ },
477
+ });
@@ -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,16 @@
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';
17
+ export * as FunctionProtocol from './FunctionProtocol.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 {