@dxos/protocols 0.8.4-main.ead640a → 0.8.4-main.effb148878

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 (478) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/src/FeedProtocol.d.ts +528 -0
  4. package/dist/src/FeedProtocol.d.ts.map +1 -0
  5. package/dist/src/FeedProtocol.js +237 -0
  6. package/dist/src/FeedProtocol.js.map +1 -0
  7. package/dist/src/FunctionProtocol.d.ts +89 -0
  8. package/dist/src/FunctionProtocol.d.ts.map +1 -0
  9. package/dist/src/FunctionProtocol.js +4 -0
  10. package/dist/src/FunctionProtocol.js.map +1 -0
  11. package/dist/src/TraceProtocol.d.ts +15 -0
  12. package/dist/src/TraceProtocol.d.ts.map +1 -0
  13. package/dist/src/TraceProtocol.js +4 -0
  14. package/dist/src/TraceProtocol.js.map +1 -0
  15. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +311 -0
  16. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
  17. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +59 -0
  18. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
  19. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +70 -3
  20. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  21. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +68 -37
  22. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  23. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +112 -0
  24. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  25. package/dist/src/buf/proto/gen/dxos/config_pb.js +72 -1
  26. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  27. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +6 -0
  28. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
  29. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
  30. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
  31. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
  32. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  33. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  34. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  35. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +68 -7
  36. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  37. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
  38. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  39. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +28 -0
  40. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts.map +1 -1
  41. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +10 -5
  42. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
  43. package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
  44. package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
  45. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +39 -0
  46. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts.map +1 -1
  47. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +27 -2
  48. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
  49. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -10
  50. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
  51. package/dist/src/buf/proto/gen/dxos/iframe_pb.js +1 -1
  52. package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
  53. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +24 -0
  54. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts.map +1 -1
  55. package/dist/src/buf/proto/gen/dxos/rpc_pb.js +12 -7
  56. package/dist/src/buf/proto/gen/dxos/rpc_pb.js.map +1 -1
  57. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -139
  58. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts.map +1 -1
  59. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +11 -45
  60. package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
  61. package/dist/src/edge/EdgeFunctionEnv.d.ts +134 -0
  62. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
  63. package/dist/src/edge/EdgeFunctionEnv.js +4 -0
  64. package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
  65. package/dist/src/edge/edge.d.ts +521 -0
  66. package/dist/src/edge/edge.d.ts.map +1 -0
  67. package/dist/src/edge/edge.js +183 -0
  68. package/dist/src/edge/edge.js.map +1 -0
  69. package/dist/src/edge/errors.d.ts +29 -0
  70. package/dist/src/edge/errors.d.ts.map +1 -0
  71. package/dist/src/edge/errors.js +69 -0
  72. package/dist/src/edge/errors.js.map +1 -0
  73. package/dist/src/edge/index.d.ts +5 -0
  74. package/dist/src/edge/index.d.ts.map +1 -0
  75. package/dist/src/edge/index.js +8 -0
  76. package/dist/src/edge/index.js.map +1 -0
  77. package/dist/src/edge/registry.d.ts +212 -0
  78. package/dist/src/edge/registry.d.ts.map +1 -0
  79. package/dist/src/edge/registry.js +139 -0
  80. package/dist/src/edge/registry.js.map +1 -0
  81. package/dist/src/errors/base-errors.d.ts +86 -8
  82. package/dist/src/errors/base-errors.d.ts.map +1 -1
  83. package/dist/src/errors/base-errors.js +4 -20
  84. package/dist/src/errors/base-errors.js.map +1 -1
  85. package/dist/src/errors/encoding.d.ts +2 -2
  86. package/dist/src/errors/encoding.d.ts.map +1 -1
  87. package/dist/src/errors/encoding.js.map +1 -1
  88. package/dist/src/errors/errors.d.ts +619 -42
  89. package/dist/src/errors/errors.d.ts.map +1 -1
  90. package/dist/src/errors/errors.js +49 -103
  91. package/dist/src/errors/errors.js.map +1 -1
  92. package/dist/src/errors/errors.test.js +1 -1
  93. package/dist/src/errors/errors.test.js.map +1 -1
  94. package/dist/src/errors/helpers.d.ts +9 -5
  95. package/dist/src/errors/helpers.d.ts.map +1 -1
  96. package/dist/src/errors/helpers.js +3 -3
  97. package/dist/src/errors/helpers.js.map +1 -1
  98. package/dist/src/errors/index.d.ts +5 -5
  99. package/dist/src/errors/parameter.d.ts.map +1 -1
  100. package/dist/src/feed-replication.d.ts.map +1 -1
  101. package/dist/src/index.d.ts +12 -12
  102. package/dist/src/index.d.ts.map +1 -1
  103. package/dist/src/index.js +5 -5
  104. package/dist/src/index.js.map +1 -1
  105. package/dist/src/indexing.d.ts.map +1 -1
  106. package/dist/src/messenger.d.ts +16 -0
  107. package/dist/src/messenger.d.ts.map +1 -0
  108. package/dist/src/messenger.js +4 -0
  109. package/dist/src/messenger.js.map +1 -0
  110. package/dist/src/proto/gen/dxos/agent/dashboard.d.ts +3 -6
  111. package/dist/src/proto/gen/dxos/agent/dashboard.d.ts.map +1 -1
  112. package/dist/src/proto/gen/dxos/agent/dashboard.js.map +1 -1
  113. package/dist/src/proto/gen/dxos/agent/echoproxy.d.ts +1 -2
  114. package/dist/src/proto/gen/dxos/agent/echoproxy.d.ts.map +1 -1
  115. package/dist/src/proto/gen/dxos/agent/epoch.d.ts +1 -2
  116. package/dist/src/proto/gen/dxos/agent/epoch.d.ts.map +1 -1
  117. package/dist/src/proto/gen/dxos/agent/functions.d.ts +6 -12
  118. package/dist/src/proto/gen/dxos/agent/functions.d.ts.map +1 -1
  119. package/dist/src/proto/gen/dxos/bot.d.ts +12 -24
  120. package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -1
  121. package/dist/src/proto/gen/dxos/bot.js.map +1 -1
  122. package/dist/src/proto/gen/dxos/client/services.d.ts +1058 -929
  123. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  124. package/dist/src/proto/gen/dxos/client/services.js +107 -94
  125. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  126. package/dist/src/proto/gen/dxos/config.d.ts +115 -100
  127. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  128. package/dist/src/proto/gen/dxos/config.js +26 -0
  129. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  130. package/dist/src/proto/gen/dxos/devtools/host.d.ts +48 -96
  131. package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  132. package/dist/src/proto/gen/dxos/devtools/swarm.d.ts +4 -8
  133. package/dist/src/proto/gen/dxos/devtools/swarm.d.ts.map +1 -1
  134. package/dist/src/proto/gen/dxos/echo/blob.d.ts +1 -2
  135. package/dist/src/proto/gen/dxos/echo/blob.d.ts.map +1 -1
  136. package/dist/src/proto/gen/dxos/echo/blob.js.map +1 -1
  137. package/dist/src/proto/gen/dxos/echo/feed.d.ts +4 -8
  138. package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
  139. package/dist/src/proto/gen/dxos/echo/filter.d.ts +2 -4
  140. package/dist/src/proto/gen/dxos/echo/filter.d.ts.map +1 -1
  141. package/dist/src/proto/gen/dxos/echo/filter.js.map +1 -1
  142. package/dist/src/proto/gen/dxos/echo/indexing.d.ts +2 -4
  143. package/dist/src/proto/gen/dxos/echo/indexing.d.ts.map +1 -1
  144. package/dist/src/proto/gen/dxos/echo/indexing.js.map +1 -1
  145. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +12 -16
  146. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
  147. package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -1
  148. package/dist/src/proto/gen/dxos/echo/model/document.d.ts +11 -22
  149. package/dist/src/proto/gen/dxos/echo/model/document.d.ts.map +1 -1
  150. package/dist/src/proto/gen/dxos/echo/model/document.js.map +1 -1
  151. package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts +1 -2
  152. package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts.map +1 -1
  153. package/dist/src/proto/gen/dxos/echo/model/text.d.ts +2 -4
  154. package/dist/src/proto/gen/dxos/echo/model/text.d.ts.map +1 -1
  155. package/dist/src/proto/gen/dxos/echo/object.d.ts +6 -12
  156. package/dist/src/proto/gen/dxos/echo/object.d.ts.map +1 -1
  157. package/dist/src/proto/gen/dxos/echo/object.js.map +1 -1
  158. package/dist/src/proto/gen/dxos/echo/query.d.ts +21 -9
  159. package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  160. package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
  161. package/dist/src/proto/gen/dxos/echo/service.d.ts +61 -34
  162. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  163. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +2 -4
  164. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
  165. package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +2 -4
  166. package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -1
  167. package/dist/src/proto/gen/dxos/edge/calls.d.ts +5 -10
  168. package/dist/src/proto/gen/dxos/edge/calls.d.ts.map +1 -1
  169. package/dist/src/proto/gen/dxos/edge/messenger.d.ts +28 -10
  170. package/dist/src/proto/gen/dxos/edge/messenger.d.ts.map +1 -1
  171. package/dist/src/proto/gen/dxos/edge/messenger.js.map +1 -1
  172. package/dist/src/proto/gen/dxos/edge/signal.d.ts +7 -14
  173. package/dist/src/proto/gen/dxos/edge/signal.d.ts.map +1 -1
  174. package/dist/src/proto/gen/dxos/error.d.ts +1 -2
  175. package/dist/src/proto/gen/dxos/error.d.ts.map +1 -1
  176. package/dist/src/proto/gen/dxos/gravity.d.ts +10 -20
  177. package/dist/src/proto/gen/dxos/gravity.d.ts.map +1 -1
  178. package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts +1 -2
  179. package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts.map +1 -1
  180. package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts +6 -12
  181. package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts.map +1 -1
  182. package/dist/src/proto/gen/dxos/halo/credentials/greet.js.map +1 -1
  183. package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts +2 -4
  184. package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts.map +1 -1
  185. package/dist/src/proto/gen/dxos/halo/credentials.d.ts +35 -43
  186. package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
  187. package/dist/src/proto/gen/dxos/halo/credentials.js +9 -0
  188. package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -1
  189. package/dist/src/proto/gen/dxos/halo/invitations.d.ts +13 -26
  190. package/dist/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -1
  191. package/dist/src/proto/gen/dxos/halo/invitations.js.map +1 -1
  192. package/dist/src/proto/gen/dxos/halo/keyring.d.ts +1 -2
  193. package/dist/src/proto/gen/dxos/halo/keyring.d.ts.map +1 -1
  194. package/dist/src/proto/gen/dxos/halo/keys.d.ts +2 -4
  195. package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -1
  196. package/dist/src/proto/gen/dxos/halo/signed.d.ts +4 -8
  197. package/dist/src/proto/gen/dxos/halo/signed.d.ts.map +1 -1
  198. package/dist/src/proto/gen/dxos/iframe.d.ts +4 -18
  199. package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -1
  200. package/dist/src/proto/gen/dxos/iframe.js.map +1 -1
  201. package/dist/src/proto/gen/dxos/keys.d.ts +2 -4
  202. package/dist/src/proto/gen/dxos/keys.d.ts.map +1 -1
  203. package/dist/src/proto/gen/dxos/mesh/bridge.d.ts +12 -24
  204. package/dist/src/proto/gen/dxos/mesh/bridge.d.ts.map +1 -1
  205. package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts +1 -2
  206. package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts.map +1 -1
  207. package/dist/src/proto/gen/dxos/mesh/messaging.d.ts +2 -4
  208. package/dist/src/proto/gen/dxos/mesh/messaging.d.ts.map +1 -1
  209. package/dist/src/proto/gen/dxos/mesh/muxer.d.ts +5 -10
  210. package/dist/src/proto/gen/dxos/mesh/muxer.d.ts.map +1 -1
  211. package/dist/src/proto/gen/dxos/mesh/presence.d.ts +1 -2
  212. package/dist/src/proto/gen/dxos/mesh/presence.d.ts.map +1 -1
  213. package/dist/src/proto/gen/dxos/mesh/protocol.d.ts +3 -6
  214. package/dist/src/proto/gen/dxos/mesh/protocol.d.ts.map +1 -1
  215. package/dist/src/proto/gen/dxos/mesh/replicator.d.ts +2 -4
  216. package/dist/src/proto/gen/dxos/mesh/replicator.d.ts.map +1 -1
  217. package/dist/src/proto/gen/dxos/mesh/signal.d.ts +9 -18
  218. package/dist/src/proto/gen/dxos/mesh/signal.d.ts.map +1 -1
  219. package/dist/src/proto/gen/dxos/mesh/signal.js.map +1 -1
  220. package/dist/src/proto/gen/dxos/mesh/swarm.d.ts +6 -12
  221. package/dist/src/proto/gen/dxos/mesh/swarm.d.ts.map +1 -1
  222. package/dist/src/proto/gen/dxos/mesh/teleport/auth.d.ts +2 -4
  223. package/dist/src/proto/gen/dxos/mesh/teleport/auth.d.ts.map +1 -1
  224. package/dist/src/proto/gen/dxos/mesh/teleport/automerge.d.ts +2 -4
  225. package/dist/src/proto/gen/dxos/mesh/teleport/automerge.d.ts.map +1 -1
  226. package/dist/src/proto/gen/dxos/mesh/teleport/blobsync.d.ts +3 -6
  227. package/dist/src/proto/gen/dxos/mesh/teleport/blobsync.d.ts.map +1 -1
  228. package/dist/src/proto/gen/dxos/mesh/teleport/control.d.ts +3 -6
  229. package/dist/src/proto/gen/dxos/mesh/teleport/control.d.ts.map +1 -1
  230. package/dist/src/proto/gen/dxos/mesh/teleport/gossip.d.ts +1 -2
  231. package/dist/src/proto/gen/dxos/mesh/teleport/gossip.d.ts.map +1 -1
  232. package/dist/src/proto/gen/dxos/mesh/teleport/notarization.d.ts +1 -2
  233. package/dist/src/proto/gen/dxos/mesh/teleport/notarization.d.ts.map +1 -1
  234. package/dist/src/proto/gen/dxos/mesh/teleport/replicator.d.ts +5 -10
  235. package/dist/src/proto/gen/dxos/mesh/teleport/replicator.d.ts.map +1 -1
  236. package/dist/src/proto/gen/dxos/mesh/teleport.d.ts +2 -4
  237. package/dist/src/proto/gen/dxos/mesh/teleport.d.ts.map +1 -1
  238. package/dist/src/proto/gen/dxos/registry.d.ts +3 -6
  239. package/dist/src/proto/gen/dxos/registry.d.ts.map +1 -1
  240. package/dist/src/proto/gen/dxos/rpc.d.ts +24 -12
  241. package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -1
  242. package/dist/src/proto/gen/dxos/rpc.js.map +1 -1
  243. package/dist/src/proto/gen/dxos/service/agentmanager.d.ts +4 -8
  244. package/dist/src/proto/gen/dxos/service/agentmanager.d.ts.map +1 -1
  245. package/dist/src/proto/gen/dxos/service/agentmanager.js.map +1 -1
  246. package/dist/src/proto/gen/dxos/service/publisher.d.ts +5 -10
  247. package/dist/src/proto/gen/dxos/service/publisher.d.ts.map +1 -1
  248. package/dist/src/proto/gen/dxos/service/supervisor.d.ts +12 -24
  249. package/dist/src/proto/gen/dxos/service/supervisor.d.ts.map +1 -1
  250. package/dist/src/proto/gen/dxos/service/supervisor.js.map +1 -1
  251. package/dist/src/proto/gen/dxos/service/tunnel.d.ts +3 -6
  252. package/dist/src/proto/gen/dxos/service/tunnel.d.ts.map +1 -1
  253. package/dist/src/proto/gen/dxos/tracing.d.ts +10 -99
  254. package/dist/src/proto/gen/dxos/tracing.d.ts.map +1 -1
  255. package/dist/src/proto/gen/dxos/type.d.ts +12 -24
  256. package/dist/src/proto/gen/dxos/type.d.ts.map +1 -1
  257. package/dist/src/proto/gen/dxos/value.d.ts +2 -4
  258. package/dist/src/proto/gen/dxos/value.d.ts.map +1 -1
  259. package/dist/src/proto/gen/example/testing/data.d.ts +4 -8
  260. package/dist/src/proto/gen/example/testing/data.d.ts.map +1 -1
  261. package/dist/src/proto/gen/example/testing/rpc.d.ts +7 -14
  262. package/dist/src/proto/gen/example/testing/rpc.d.ts.map +1 -1
  263. package/dist/src/proto/gen/google/protobuf.d.ts +326 -40
  264. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  265. package/dist/src/proto/gen/google/protobuf.js +127 -1
  266. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  267. package/dist/src/proto/gen/index.d.ts +43 -7
  268. package/dist/src/proto/gen/index.d.ts.map +1 -1
  269. package/dist/src/proto/gen/index.js +1 -1
  270. package/dist/src/proto/gen/index.js.map +1 -1
  271. package/dist/src/proto/index.d.ts +2 -2
  272. package/dist/src/proto/substitutions.d.ts +8 -8
  273. package/dist/src/proto/substitutions.d.ts.map +1 -1
  274. package/dist/src/proto/types.d.ts +1 -1
  275. package/dist/src/space-archive.d.ts +62 -3
  276. package/dist/src/space-archive.d.ts.map +1 -1
  277. package/dist/src/space-archive.js +13 -1
  278. package/dist/src/space-archive.js.map +1 -1
  279. package/dist/src/types.d.ts +2 -2
  280. package/dist/tsconfig.tsbuildinfo +1 -1
  281. package/package.json +21 -35
  282. package/src/FeedProtocol.ts +323 -0
  283. package/src/FunctionProtocol.ts +111 -0
  284. package/src/TraceProtocol.ts +21 -0
  285. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
  286. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
  287. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
  288. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
  289. package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
  290. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
  291. package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
  292. package/src/buf/proto/gen/dxos/client/queue_pb.ts +373 -0
  293. package/src/buf/proto/gen/dxos/client/services_pb.ts +121 -40
  294. package/src/buf/proto/gen/dxos/config_pb.ts +132 -2
  295. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
  296. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
  297. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
  298. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
  299. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
  300. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
  301. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
  302. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +9 -2
  303. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
  304. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
  305. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
  306. package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
  307. package/src/buf/proto/gen/dxos/echo/query_pb.ts +16 -4
  308. package/src/buf/proto/gen/dxos/echo/service_pb.ts +81 -13
  309. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
  310. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
  311. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
  312. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +39 -6
  313. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
  314. package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
  315. package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
  316. package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
  317. package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
  318. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
  319. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
  320. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
  321. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +49 -3
  322. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
  323. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
  324. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
  325. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
  326. package/src/buf/proto/gen/dxos/iframe_pb.ts +3 -14
  327. package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
  328. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
  329. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
  330. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
  331. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
  332. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
  333. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
  334. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
  335. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
  336. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
  337. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
  338. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
  339. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
  340. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
  341. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
  342. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
  343. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
  344. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
  345. package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
  346. package/src/buf/proto/gen/dxos/rpc_pb.ts +37 -8
  347. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
  348. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
  349. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
  350. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
  351. package/src/buf/proto/gen/dxos/tracing_pb.ts +12 -179
  352. package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
  353. package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
  354. package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
  355. package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
  356. package/src/codec.test.ts +1 -1
  357. package/src/edge/EdgeFunctionEnv.ts +228 -0
  358. package/src/edge/edge.ts +614 -0
  359. package/src/edge/errors.ts +85 -0
  360. package/src/edge/index.ts +8 -0
  361. package/src/edge/registry.ts +164 -0
  362. package/src/errors/base-errors.ts +4 -22
  363. package/src/errors/encoding.ts +2 -3
  364. package/src/errors/errors.test.ts +2 -2
  365. package/src/errors/errors.ts +57 -124
  366. package/src/errors/helpers.ts +6 -7
  367. package/src/errors/index.ts +5 -5
  368. package/src/feed-replication.ts +1 -0
  369. package/src/index.ts +12 -12
  370. package/src/indexing.test.ts +1 -1
  371. package/src/messenger.ts +22 -0
  372. package/src/proto/dxos/client/queue.proto +102 -0
  373. package/src/proto/dxos/client/services.proto +21 -1
  374. package/src/proto/dxos/config.proto +50 -1
  375. package/src/proto/dxos/echo/metadata.proto +3 -0
  376. package/src/proto/dxos/echo/query.proto +4 -1
  377. package/src/proto/dxos/echo/service.proto +38 -4
  378. package/src/proto/dxos/edge/messenger.proto +10 -0
  379. package/src/proto/dxos/halo/credentials.proto +15 -0
  380. package/src/proto/dxos/iframe.proto +1 -3
  381. package/src/proto/dxos/rpc.proto +7 -0
  382. package/src/proto/dxos/tracing.proto +0 -40
  383. package/src/proto/gen/dxos/agent/dashboard.ts +3 -6
  384. package/src/proto/gen/dxos/agent/echoproxy.ts +1 -2
  385. package/src/proto/gen/dxos/agent/epoch.ts +1 -2
  386. package/src/proto/gen/dxos/agent/functions.ts +6 -12
  387. package/src/proto/gen/dxos/bot.ts +12 -24
  388. package/src/proto/gen/dxos/client/services.ts +1058 -929
  389. package/src/proto/gen/dxos/config.ts +115 -100
  390. package/src/proto/gen/dxos/devtools/host.ts +48 -96
  391. package/src/proto/gen/dxos/devtools/swarm.ts +4 -8
  392. package/src/proto/gen/dxos/echo/blob.ts +1 -2
  393. package/src/proto/gen/dxos/echo/feed.ts +4 -8
  394. package/src/proto/gen/dxos/echo/filter.ts +2 -4
  395. package/src/proto/gen/dxos/echo/indexing.ts +2 -4
  396. package/src/proto/gen/dxos/echo/metadata.ts +12 -16
  397. package/src/proto/gen/dxos/echo/model/document.ts +11 -22
  398. package/src/proto/gen/dxos/echo/model/messenger.ts +1 -2
  399. package/src/proto/gen/dxos/echo/model/text.ts +2 -4
  400. package/src/proto/gen/dxos/echo/object.ts +6 -12
  401. package/src/proto/gen/dxos/echo/query.ts +21 -9
  402. package/src/proto/gen/dxos/echo/service.ts +60 -34
  403. package/src/proto/gen/dxos/echo/snapshot.ts +2 -4
  404. package/src/proto/gen/dxos/echo/timeframe.ts +2 -4
  405. package/src/proto/gen/dxos/edge/calls.ts +5 -10
  406. package/src/proto/gen/dxos/edge/messenger.ts +28 -10
  407. package/src/proto/gen/dxos/edge/signal.ts +7 -14
  408. package/src/proto/gen/dxos/error.ts +1 -2
  409. package/src/proto/gen/dxos/gravity.ts +10 -20
  410. package/src/proto/gen/dxos/halo/credentials/auth.ts +1 -2
  411. package/src/proto/gen/dxos/halo/credentials/greet.ts +6 -12
  412. package/src/proto/gen/dxos/halo/credentials/identity.ts +2 -4
  413. package/src/proto/gen/dxos/halo/credentials.ts +35 -43
  414. package/src/proto/gen/dxos/halo/invitations.ts +13 -26
  415. package/src/proto/gen/dxos/halo/keyring.ts +1 -2
  416. package/src/proto/gen/dxos/halo/keys.ts +2 -4
  417. package/src/proto/gen/dxos/halo/signed.ts +4 -8
  418. package/src/proto/gen/dxos/iframe.ts +4 -18
  419. package/src/proto/gen/dxos/keys.ts +2 -4
  420. package/src/proto/gen/dxos/mesh/bridge.ts +12 -24
  421. package/src/proto/gen/dxos/mesh/broadcast.ts +1 -2
  422. package/src/proto/gen/dxos/mesh/messaging.ts +2 -4
  423. package/src/proto/gen/dxos/mesh/muxer.ts +5 -10
  424. package/src/proto/gen/dxos/mesh/presence.ts +1 -2
  425. package/src/proto/gen/dxos/mesh/protocol.ts +3 -6
  426. package/src/proto/gen/dxos/mesh/replicator.ts +2 -4
  427. package/src/proto/gen/dxos/mesh/signal.ts +9 -18
  428. package/src/proto/gen/dxos/mesh/swarm.ts +6 -12
  429. package/src/proto/gen/dxos/mesh/teleport/auth.ts +2 -4
  430. package/src/proto/gen/dxos/mesh/teleport/automerge.ts +2 -4
  431. package/src/proto/gen/dxos/mesh/teleport/blobsync.ts +3 -6
  432. package/src/proto/gen/dxos/mesh/teleport/control.ts +3 -6
  433. package/src/proto/gen/dxos/mesh/teleport/gossip.ts +1 -2
  434. package/src/proto/gen/dxos/mesh/teleport/notarization.ts +1 -2
  435. package/src/proto/gen/dxos/mesh/teleport/replicator.ts +5 -10
  436. package/src/proto/gen/dxos/mesh/teleport.ts +2 -4
  437. package/src/proto/gen/dxos/registry.ts +3 -6
  438. package/src/proto/gen/dxos/rpc.ts +24 -12
  439. package/src/proto/gen/dxos/service/agentmanager.ts +4 -8
  440. package/src/proto/gen/dxos/service/publisher.ts +5 -10
  441. package/src/proto/gen/dxos/service/supervisor.ts +12 -24
  442. package/src/proto/gen/dxos/service/tunnel.ts +3 -6
  443. package/src/proto/gen/dxos/tracing.ts +10 -96
  444. package/src/proto/gen/dxos/type.ts +12 -24
  445. package/src/proto/gen/dxos/value.ts +2 -4
  446. package/src/proto/gen/example/testing/data.ts +4 -8
  447. package/src/proto/gen/example/testing/rpc.ts +7 -14
  448. package/src/proto/gen/google/protobuf.ts +326 -40
  449. package/src/proto/gen/index.ts +44 -8
  450. package/src/proto/index.ts +2 -2
  451. package/src/proto/types.ts +1 -1
  452. package/src/space-archive.ts +70 -1
  453. package/src/types.ts +2 -2
  454. package/dist/src/edge-error.d.ts +0 -26
  455. package/dist/src/edge-error.d.ts.map +0 -1
  456. package/dist/src/edge-error.js +0 -102
  457. package/dist/src/edge-error.js.map +0 -1
  458. package/dist/src/edge.d.ts +0 -246
  459. package/dist/src/edge.d.ts.map +0 -1
  460. package/dist/src/edge.js +0 -49
  461. package/dist/src/edge.js.map +0 -1
  462. package/dist/src/query.d.ts +0 -5
  463. package/dist/src/query.d.ts.map +0 -1
  464. package/dist/src/query.js +0 -8
  465. package/dist/src/query.js.map +0 -1
  466. package/dist/src/queue.d.ts +0 -28
  467. package/dist/src/queue.d.ts.map +0 -1
  468. package/dist/src/queue.js +0 -8
  469. package/dist/src/queue.js.map +0 -1
  470. package/dist/src/tracing.d.ts +0 -40
  471. package/dist/src/tracing.d.ts.map +0 -1
  472. package/dist/src/tracing.js +0 -50
  473. package/dist/src/tracing.js.map +0 -1
  474. package/src/edge-error.ts +0 -134
  475. package/src/edge.ts +0 -279
  476. package/src/query.ts +0 -8
  477. package/src/queue.ts +0 -38
  478. package/src/tracing.ts +0 -86
@@ -67,1392 +67,1521 @@ import * as example_testing_rpc from "../../example/testing/rpc.js";
67
67
  import * as google_protobuf from "../../google/protobuf.js";
68
68
  /**
69
69
  * Defined in:
70
- * {@link file://./../../../dxos/client/logging.proto}
70
+ * {@link file://./../../../dxos/client/services.proto}
71
71
  */
72
- export interface Metrics {
73
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
74
- values?: Metrics.KeyPair[];
72
+ export enum SystemStatus {
73
+ INACTIVE = 0,
74
+ ACTIVE = 1
75
75
  }
76
- export namespace Metrics {
77
- /**
78
- * Defined in:
79
- * {@link file://./../../../dxos/client/logging.proto}
80
- */
81
- export interface KeyPair {
82
- /**
83
- * Options:
84
- * - proto3_optional = true
85
- */
86
- key?: string;
87
- /**
88
- * Options:
89
- * - proto3_optional = true
90
- */
91
- value?: dxos_value.Value;
92
- /**
93
- * Options:
94
- * - proto3_optional = true
95
- */
96
- stats?: dxos_value.Stats;
97
- }
76
+ /**
77
+ * Defined in: `../../../dxos/client/services.proto`
78
+ */
79
+ export interface UpdateStatusRequest {
80
+ status: SystemStatus;
98
81
  }
99
82
  /**
100
- * Defined in:
101
- * {@link file://./../../../dxos/client/logging.proto}
83
+ * Defined in: `../../../dxos/client/services.proto`
102
84
  */
103
- export interface ControlMetricsRequest {
104
- /**
105
- * Options:
106
- * - proto3_optional = true
107
- */
108
- reset?: boolean;
85
+ export interface QueryStatusRequest {
109
86
  /**
110
87
  * Options:
111
88
  * - proto3_optional = true
112
89
  */
113
- record?: boolean;
90
+ interval?: number;
114
91
  }
115
92
  /**
116
- * Defined in:
117
- * {@link file://./../../../dxos/client/logging.proto}
93
+ * Defined in: `../../../dxos/client/services.proto`
118
94
  */
119
- export interface ControlMetricsResponse {
120
- /**
121
- * Options:
122
- * - proto3_optional = true
123
- */
124
- recording?: boolean;
95
+ export interface QueryStatusResponse {
96
+ status: SystemStatus;
125
97
  }
126
98
  /**
127
- * Defined in:
128
- * {@link file://./../../../dxos/client/logging.proto}
99
+ * Defined in: `../../../dxos/client/services.proto`
129
100
  */
130
- export interface QueryMetricsRequest {
101
+ export interface GetDiagnosticsRequest {
131
102
  /**
132
103
  * Options:
133
104
  * - proto3_optional = true
134
105
  */
135
- interval?: number;
106
+ keys?: GetDiagnosticsRequest.KEY_OPTION;
136
107
  }
137
- /**
138
- * Defined in:
139
- * {@link file://./../../../dxos/client/logging.proto}
140
- */
141
- export interface QueryMetricsResponse {
142
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
143
- metrics: Metrics;
108
+ export namespace GetDiagnosticsRequest {
109
+ /**
110
+ * Defined in:
111
+ * {@link file://./../../../dxos/client/services.proto}
112
+ */
113
+ export enum KEY_OPTION {
114
+ NONE = 0,
115
+ TRUNCATE = 1,
116
+ HUMANIZE = 2
117
+ }
144
118
  }
145
119
  /**
146
- * Defined in:
147
- * {@link file://./../../../dxos/client/logging.proto}
120
+ * Defined in: `../../../dxos/client/services.proto`
148
121
  */
149
- export enum LogLevel {
150
- NONE = 0,
151
- TRACE = 5,
152
- DEBUG = 10,
153
- VERBOSE = 11,
154
- INFO = 12,
155
- WARN = 13,
156
- ERROR = 14
122
+ export interface GetDiagnosticsResponse {
123
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
124
+ diagnostics: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
157
125
  }
158
126
  /**
159
- * Defined in:
160
- * {@link file://./../../../dxos/client/logging.proto}
127
+ * Defined in: `../../../dxos/client/services.proto`
161
128
  */
162
- export interface QueryLogsRequest {
163
- filters?: QueryLogsRequest.Filter[];
129
+ export interface Platform {
130
+ type: Platform.PLATFORM_TYPE;
164
131
  /**
132
+ * The User-Agent string from a browser
133
+ *
165
134
  * Options:
166
135
  * - proto3_optional = true
167
136
  */
168
- options?: QueryLogsRequest.MatchingOptions;
169
- }
170
- export namespace QueryLogsRequest {
137
+ userAgent?: string;
171
138
  /**
172
- * Defined in:
173
- * {@link file://./../../../dxos/client/logging.proto}
139
+ * e.g process.platform from node, e.g. 'darwin', 'linux', 'win32'
140
+ *
141
+ * Options:
142
+ * - proto3_optional = true
174
143
  */
175
- export enum MatchingOptions {
176
- NONE = 0,
177
- INCLUSIVE = 1,
178
- EXPLICIT = 2
179
- }
144
+ platform?: string;
180
145
  /**
181
- * Defined in:
182
- * {@link file://./../../../dxos/client/logging.proto}
146
+ * the Node.JS arch string, e.g. 'arm64', 'x64'
147
+ *
148
+ * Options:
149
+ * - proto3_optional = true
183
150
  */
184
- export interface Filter {
185
- level: LogLevel;
186
- /**
187
- * Options:
188
- * - proto3_optional = true
189
- */
190
- pattern?: string;
191
- }
192
- }
193
- /**
194
- * Defined in:
195
- * {@link file://./../../../dxos/client/logging.proto}
196
- */
197
- export interface LogEntry {
198
- level: LogLevel;
199
- message: string;
151
+ arch?: string;
200
152
  /**
153
+ * the node.js version string
154
+ *
201
155
  * Options:
202
156
  * - proto3_optional = true
203
157
  */
204
- context?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
158
+ runtime?: string;
205
159
  /**
160
+ * the number of seconds the client has been up
161
+ *
206
162
  * Options:
207
163
  * - proto3_optional = true
208
164
  */
209
- meta?: LogEntry.Meta;
165
+ uptime?: number;
210
166
  /**
167
+ * e.g. NodeJS.MemoryUsage, subject to change
168
+ *
211
169
  * Options:
212
170
  * - proto3_optional = true
213
171
  */
214
- error?: dxos_error.Error;
215
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
172
+ memory?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
216
173
  }
217
- export namespace LogEntry {
174
+ export namespace Platform {
218
175
  /**
219
176
  * Defined in:
220
- * {@link file://./../../../dxos/client/logging.proto}
177
+ * {@link file://./../../../dxos/client/services.proto}
221
178
  */
222
- export interface Meta {
223
- file: string;
224
- line: number;
225
- /**
226
- * Options:
227
- * - proto3_optional = true
228
- */
229
- scope?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
230
- /**
231
- * Options:
232
- * - proto3_optional = true
233
- */
234
- resourceId?: number;
179
+ export enum PLATFORM_TYPE {
180
+ BROWSER = 0,
181
+ SHARED_WORKER = 1,
182
+ NODE = 2,
183
+ DEDICATED_WORKER = 3
235
184
  }
236
185
  }
237
186
  /**
238
187
  * Defined in:
239
- * {@link file://./../../../dxos/client/logging.proto}
240
- */
241
- export interface LoggingService {
242
- controlMetrics: (request: ControlMetricsRequest, options?: RequestOptions) => Promise<ControlMetricsResponse>;
243
- queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
244
- queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
245
- }
246
- /**
247
- * Defined in:
248
- * {@link file://./../../../dxos/client/invitation.proto}
249
- */
250
- export interface AdmissionKeypair {
251
- publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
252
- /**
253
- * Options:
254
- * - proto3_optional = true
255
- */
256
- privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
257
- }
258
- /**
259
- * Runtime state of the space object.
260
- *
261
- * Defined in:
262
- * {@link file://./../../../dxos/client/invitation.proto}
263
- */
264
- export enum SpaceState {
265
- INVALID = 0,
266
- SPACE_INACTIVE = 2,
267
- SPACE_ACTIVE = 6,
268
- SPACE_CLOSED = 1,
269
- SPACE_CONTROL_ONLY = 7,
270
- SPACE_INITIALIZING = 4,
271
- SPACE_READY = 3,
272
- SPACE_ERROR = 5,
273
- SPACE_REQUIRES_MIGRATION = 8
274
- }
275
- /**
276
- * Represents the invitation state passed between client and service.
277
- *
278
- * Defined in:
279
- * {@link file://./../../../dxos/client/invitation.proto}
188
+ * {@link file://./../../../dxos/client/services.proto}
280
189
  */
281
- export interface Invitation {
190
+ export interface SystemService {
282
191
  /**
283
- * Local identifier (random).
192
+ * Get the static config of the client.
284
193
  */
285
- invitationId: string;
194
+ getConfig: (request: void, options?: RequestOptions) => Promise<dxos_config.Config>;
286
195
  /**
287
- * Determines the behavior of the invitation.
196
+ * Get the diagnostics snapshot.
288
197
  */
289
- type: Invitation.Type;
198
+ getDiagnostics: (request: GetDiagnosticsRequest, options?: RequestOptions) => Promise<GetDiagnosticsResponse>;
290
199
  /**
291
- * Kind of access the invitation will grant.
200
+ * Update the status of the client. Used to re-activate an inactive client.
292
201
  */
293
- kind: Invitation.Kind;
202
+ updateStatus: (request: UpdateStatusRequest, options?: RequestOptions) => Promise<void>;
294
203
  /**
295
- * How the invitation is authenticated.
204
+ * Stream the status of the client.
296
205
  */
297
- authMethod: Invitation.AuthMethod;
206
+ queryStatus: (request: QueryStatusRequest, options?: RequestOptions) => Stream<QueryStatusResponse>;
298
207
  /**
299
- * Swarm rendezvous (random).
208
+ * Reset the client.
300
209
  */
301
- swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
210
+ reset: (request: void, options?: RequestOptions) => Promise<void>;
302
211
  /**
303
- * Local state.
212
+ * Get platform Information
304
213
  */
305
- state: Invitation.State;
214
+ getPlatform: (request: void, options?: RequestOptions) => Promise<Platform>;
215
+ }
216
+ /**
217
+ * Defined in: `../../../dxos/client/services.proto`
218
+ */
219
+ export interface Identity {
220
+ did: string;
221
+ identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
306
222
  /**
307
- * Timeout for guest to complete invitation once connected (ms).
308
- *
309
223
  * Options:
310
224
  * - proto3_optional = true
311
225
  */
312
- timeout?: number;
226
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
313
227
  /**
314
- * Guest's identity.
315
- *
316
228
  * Options:
317
229
  * - proto3_optional = true
318
230
  */
319
- identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
320
- /**
321
- * Space to join (only present if kind is SPACE).
322
- *
323
- * Options:
324
- * - proto3_optional = true
231
+ profile?: dxos_halo_credentials.ProfileDocument;
232
+ }
233
+ /**
234
+ * Defined in: `../../../dxos/client/services.proto`
235
+ */
236
+ export interface RequestRecoveryChallengeResponse {
237
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
238
+ controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
239
+ challenge: string;
240
+ }
241
+ /**
242
+ * Defined in: `../../../dxos/client/services.proto`
243
+ */
244
+ export interface RecoverIdentityRequest {
245
+ recoveryCode?: string;
246
+ external?: RecoverIdentityRequest.ExternalSignature;
247
+ token?: string;
248
+ }
249
+ export namespace RecoverIdentityRequest {
250
+ /**
251
+ * Defined in: `../../../dxos/client/services.proto`
325
252
  */
326
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
253
+ export interface ExternalSignature {
254
+ lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
255
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
256
+ controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
257
+ signature: Uint8Array;
258
+ /**
259
+ * Options:
260
+ * - proto3_optional = true
261
+ */
262
+ clientDataJson?: Uint8Array;
263
+ /**
264
+ * Options:
265
+ * - proto3_optional = true
266
+ */
267
+ authenticatorData?: Uint8Array;
268
+ }
269
+ }
270
+ /**
271
+ * Defined in: `../../../dxos/client/services.proto`
272
+ */
273
+ export interface RecoveryCredentialData {
327
274
  /**
328
- * Authentication code created by host (only present if auth_method is SHARED_SECRET).
329
- *
330
- * Options:
331
- * - proto3_optional = true
275
+ * Recovery key used to validate recovery challenge signature.
332
276
  */
333
- authCode?: string;
277
+ recoveryKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
334
278
  /**
335
- * Path or identifier to navigate to after successful authentication.
336
- *
337
- * Options:
338
- * - proto3_optional = true
279
+ * Public key used to identify the recovery key.
339
280
  */
340
- target?: string;
281
+ lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
341
282
  /**
342
- * Host should resume invitation on startup until timeout.
343
- *
344
- * Options:
345
- * - proto3_optional = true
283
+ * Algorithm used to generate the recovery key.
346
284
  */
347
- persistent?: boolean;
285
+ algorithm: string;
286
+ }
287
+ /**
288
+ * Defined in: `../../../dxos/client/services.proto`
289
+ */
290
+ export interface CreateRecoveryCredentialRequest {
348
291
  /**
292
+ * If not provided, a new key will be generated.
293
+ *
349
294
  * Options:
350
295
  * - proto3_optional = true
351
296
  */
352
- created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
297
+ data?: RecoveryCredentialData;
298
+ }
299
+ /**
300
+ * Defined in: `../../../dxos/client/services.proto`
301
+ */
302
+ export interface CreateRecoveryCredentialResponse {
353
303
  /**
354
304
  * Options:
355
305
  * - proto3_optional = true
356
306
  */
357
- lifetime?: number;
307
+ recoveryCode?: string;
308
+ }
309
+ /**
310
+ * Defined in: `../../../dxos/client/services.proto`
311
+ */
312
+ export interface QueryIdentityResponse {
358
313
  /**
359
- * Whether an invitation can be used multiple times.
360
- *
361
314
  * Options:
362
315
  * - proto3_optional = true
363
316
  */
364
- multiUse?: boolean;
317
+ identity?: Identity;
318
+ }
319
+ /**
320
+ * Defined in: `../../../dxos/client/services.proto`
321
+ */
322
+ export interface SignPresentationRequest {
323
+ presentation: dxos_halo_credentials.Presentation;
365
324
  /**
366
- * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
367
- *
368
325
  * Options:
369
326
  * - proto3_optional = true
370
327
  */
371
- guestKeypair?: AdmissionKeypair;
328
+ nonce?: Uint8Array;
329
+ }
330
+ /**
331
+ * Defined in: `../../../dxos/client/services.proto`
332
+ */
333
+ export interface CreateIdentityRequest {
372
334
  /**
373
- * Present on Type.DELEGATED invitations.
374
- *
375
335
  * Options:
376
336
  * - proto3_optional = true
377
337
  */
378
- delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
338
+ profile?: dxos_halo_credentials.ProfileDocument;
379
339
  /**
380
- * Role of the admitted member, defaults to ADMIN.
381
- *
382
340
  * Options:
383
341
  * - proto3_optional = true
384
342
  */
385
- role?: dxos_halo_credentials.SpaceMember.Role;
343
+ deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
344
+ }
345
+ /**
346
+ * Defined in:
347
+ * {@link file://./../../../dxos/client/services.proto}
348
+ */
349
+ export interface IdentityService {
350
+ createIdentity: (request: CreateIdentityRequest, options?: RequestOptions) => Promise<Identity>;
351
+ requestRecoveryChallenge: (request: void, options?: RequestOptions) => Promise<RequestRecoveryChallengeResponse>;
352
+ recoverIdentity: (request: RecoverIdentityRequest, options?: RequestOptions) => Promise<Identity>;
353
+ createRecoveryCredential: (request: CreateRecoveryCredentialRequest, options?: RequestOptions) => Promise<CreateRecoveryCredentialResponse>;
354
+ queryIdentity: (request: void, options?: RequestOptions) => Stream<QueryIdentityResponse>;
355
+ updateProfile: (request: dxos_halo_credentials.ProfileDocument, options?: RequestOptions) => Promise<Identity>;
356
+ signPresentation: (request: SignPresentationRequest, options?: RequestOptions) => Promise<dxos_halo_credentials.Presentation>;
357
+ createAuthCredential: (request: void, options?: RequestOptions) => Promise<dxos_halo_credentials.Credential>;
358
+ }
359
+ /**
360
+ * Defined in:
361
+ * {@link file://./../../../dxos/client/services.proto}
362
+ */
363
+ export enum DeviceKind {
364
+ CURRENT = 0,
365
+ TRUSTED = 1
366
+ }
367
+ /**
368
+ * Defined in: `../../../dxos/client/services.proto`
369
+ */
370
+ export interface Device {
371
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
372
+ kind: DeviceKind;
386
373
  /**
387
- * Id of a the space to join (only present if kind is SPACE).
388
- *
389
374
  * Options:
390
375
  * - proto3_optional = true
391
376
  */
392
- spaceId?: string;
377
+ profile?: dxos_halo_credentials.DeviceProfileDocument;
378
+ presence: Device.PresenceState;
393
379
  }
394
- export namespace Invitation {
395
- /**
396
- * Defined in:
397
- * {@link file://./../../../dxos/client/invitation.proto}
398
- */
399
- export enum Type {
400
- INTERACTIVE = 0,
401
- DELEGATED = 1,
402
- MULTIUSE = 2
403
- }
404
- /**
405
- * Defined in:
406
- * {@link file://./../../../dxos/client/invitation.proto}
407
- */
408
- export enum Kind {
409
- DEVICE = 0,
410
- SPACE = 1
411
- }
412
- /**
413
- * Defined in:
414
- * {@link file://./../../../dxos/client/invitation.proto}
415
- */
416
- export enum AuthMethod {
417
- NONE = 0,
418
- SHARED_SECRET = 1,
419
- KNOWN_PUBLIC_KEY = 2
420
- }
380
+ export namespace Device {
421
381
  /**
422
382
  * Defined in:
423
- * {@link file://./../../../dxos/client/invitation.proto}
383
+ * {@link file://./../../../dxos/client/services.proto}
424
384
  */
425
- export enum State {
426
- INIT = 0,
427
- CONNECTING = 1,
428
- CONNECTED = 2,
429
- READY_FOR_AUTHENTICATION = 3,
430
- AUTHENTICATING = 4,
431
- SUCCESS = 5,
432
- CANCELLED = 6,
433
- TIMEOUT = 7,
434
- ERROR = 8,
435
- EXPIRED = 9
385
+ export enum PresenceState {
386
+ OFFLINE = 0,
387
+ ONLINE = 1,
388
+ REMOVED = 2
436
389
  }
437
390
  }
438
391
  /**
439
- * Defined in:
440
- * {@link file://./../../../dxos/client/services.proto}
392
+ * Defined in: `../../../dxos/client/services.proto`
441
393
  */
442
- export enum SystemStatus {
443
- INACTIVE = 0,
444
- ACTIVE = 1
394
+ export interface QueryDevicesResponse {
395
+ devices?: Device[];
445
396
  }
446
397
  /**
447
398
  * Defined in:
448
399
  * {@link file://./../../../dxos/client/services.proto}
449
400
  */
450
- export interface UpdateStatusRequest {
451
- status: SystemStatus;
401
+ export interface DevicesService {
402
+ updateDevice: (request: dxos_halo_credentials.DeviceProfileDocument, options?: RequestOptions) => Promise<Device>;
403
+ queryDevices: (request: void, options?: RequestOptions) => Stream<QueryDevicesResponse>;
452
404
  }
453
405
  /**
454
- * Defined in:
455
- * {@link file://./../../../dxos/client/services.proto}
406
+ * Defined in: `../../../dxos/client/services.proto`
456
407
  */
457
- export interface QueryStatusRequest {
408
+ export interface Contact {
409
+ identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
458
410
  /**
459
411
  * Options:
460
412
  * - proto3_optional = true
461
413
  */
462
- interval?: number;
414
+ profile?: dxos_halo_credentials.ProfileDocument;
415
+ commonSpaces?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
463
416
  }
464
417
  /**
465
- * Defined in:
466
- * {@link file://./../../../dxos/client/services.proto}
418
+ * Defined in: `../../../dxos/client/services.proto`
467
419
  */
468
- export interface QueryStatusResponse {
469
- status: SystemStatus;
420
+ export interface ContactBook {
421
+ contacts?: Contact[];
470
422
  }
471
423
  /**
472
424
  * Defined in:
473
425
  * {@link file://./../../../dxos/client/services.proto}
474
426
  */
475
- export interface GetDiagnosticsRequest {
476
- /**
477
- * Options:
478
- * - proto3_optional = true
479
- */
480
- keys?: GetDiagnosticsRequest.KEY_OPTION;
427
+ export interface ContactsService {
428
+ getContacts: (request: void, options?: RequestOptions) => Promise<ContactBook>;
429
+ queryContacts: (request: void, options?: RequestOptions) => Stream<ContactBook>;
481
430
  }
482
- export namespace GetDiagnosticsRequest {
431
+ /**
432
+ * Defined in: `../../../dxos/client/services.proto`
433
+ */
434
+ export interface SpaceMember {
435
+ identity: Identity;
436
+ presence: SpaceMember.PresenceState;
437
+ peerStates?: dxos_mesh_presence.PeerState[];
438
+ role: dxos_halo_credentials.SpaceMember.Role;
439
+ }
440
+ export namespace SpaceMember {
483
441
  /**
484
442
  * Defined in:
485
443
  * {@link file://./../../../dxos/client/services.proto}
486
444
  */
487
- export enum KEY_OPTION {
488
- NONE = 0,
489
- TRUNCATE = 1,
490
- HUMANIZE = 2
445
+ export enum PresenceState {
446
+ OFFLINE = 0,
447
+ ONLINE = 1
491
448
  }
492
449
  }
493
450
  /**
494
- * Defined in:
495
- * {@link file://./../../../dxos/client/services.proto}
496
- */
497
- export interface GetDiagnosticsResponse {
498
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
499
- diagnostics: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
500
- }
501
- /**
502
- * Defined in:
503
- * {@link file://./../../../dxos/client/services.proto}
451
+ * Defined in: `../../../dxos/client/services.proto`
504
452
  */
505
- export interface Platform {
506
- type: Platform.PLATFORM_TYPE;
453
+ export interface Space {
454
+ id: string;
455
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
456
+ state: SpaceState;
507
457
  /**
508
- * The User-Agent string from a browser
509
- *
510
458
  * Options:
511
459
  * - proto3_optional = true
512
460
  */
513
- userAgent?: string;
461
+ pipeline?: Space.PipelineState;
514
462
  /**
515
- * e.g process.platform from node, e.g. 'darwin', 'linux', 'win32'
516
- *
517
463
  * Options:
518
464
  * - proto3_optional = true
519
465
  */
520
- platform?: string;
466
+ error?: dxos_error.Error;
521
467
  /**
522
- * the Node.JS arch string, e.g. 'arm64', 'x64'
523
- *
524
468
  * Options:
525
469
  * - proto3_optional = true
526
470
  */
527
- arch?: string;
471
+ edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
472
+ tags?: string[];
473
+ membershipPolicy: dxos_halo_credentials.MembershipPolicy;
474
+ members?: SpaceMember[];
528
475
  /**
529
- * the node.js version string
530
- *
531
476
  * Options:
532
477
  * - proto3_optional = true
533
478
  */
534
- runtime?: string;
479
+ creator?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
535
480
  /**
536
- * the number of seconds the client has been up
537
- *
538
481
  * Options:
539
482
  * - proto3_optional = true
540
483
  */
541
- uptime?: number;
484
+ cache?: dxos_echo_metadata.SpaceCache;
485
+ metrics: Space.Metrics;
486
+ }
487
+ export namespace Space {
542
488
  /**
543
- * e.g. NodeJS.MemoryUsage, subject to change
544
- *
545
- * Options:
546
- * - proto3_optional = true
489
+ * Defined in: `../../../dxos/client/services.proto`
547
490
  */
548
- memory?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
549
- }
550
- export namespace Platform {
491
+ export interface Metrics {
492
+ /**
493
+ * Options:
494
+ * - proto3_optional = true
495
+ */
496
+ open?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
497
+ /**
498
+ * Options:
499
+ * - proto3_optional = true
500
+ */
501
+ pipelineInitBegin?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
502
+ /**
503
+ * Options:
504
+ * - proto3_optional = true
505
+ */
506
+ controlPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
507
+ /**
508
+ * Options:
509
+ * - proto3_optional = true
510
+ */
511
+ dataPipelineOpen?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
512
+ /**
513
+ * Options:
514
+ * - proto3_optional = true
515
+ */
516
+ dataPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
517
+ /**
518
+ * Options:
519
+ * - proto3_optional = true
520
+ */
521
+ ready?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
522
+ }
551
523
  /**
552
- * Defined in:
553
- * {@link file://./../../../dxos/client/services.proto}
524
+ * Defined in: `../../../dxos/client/services.proto`
554
525
  */
555
- export enum PLATFORM_TYPE {
556
- BROWSER = 0,
557
- SHARED_WORKER = 1,
558
- NODE = 2
526
+ export interface PipelineState {
527
+ /**
528
+ * Options:
529
+ * - proto3_optional = true
530
+ */
531
+ controlFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
532
+ /**
533
+ * Options:
534
+ * - proto3_optional = true
535
+ */
536
+ dataFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
537
+ /**
538
+ * TODO(burdon): Normalize _key suffix.
539
+ */
540
+ controlFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
541
+ dataFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
542
+ /**
543
+ * Last processed epoch. Might now have been applied yet.
544
+ *
545
+ * Options:
546
+ * - proto3_optional = true
547
+ */
548
+ currentEpoch?: dxos_halo_credentials.Credential;
549
+ /**
550
+ * Epoch that is currently applied.
551
+ *
552
+ * Options:
553
+ * - proto3_optional = true
554
+ */
555
+ appliedEpoch?: dxos_halo_credentials.Credential;
556
+ /**
557
+ * Mutations already processed.
558
+ *
559
+ * Options:
560
+ * - proto3_optional = true
561
+ */
562
+ currentControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
563
+ /**
564
+ * Minimum timeframe to consider the state to be up-to-date.
565
+ *
566
+ * Options:
567
+ * - proto3_optional = true
568
+ */
569
+ targetControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
570
+ /**
571
+ * All mutations stored in feeds.
572
+ *
573
+ * Options:
574
+ * - proto3_optional = true
575
+ */
576
+ totalControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
577
+ /**
578
+ * All mutations known to exist on the network.
579
+ *
580
+ * Options:
581
+ * - proto3_optional = true
582
+ */
583
+ knownControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
584
+ /**
585
+ * Start timeframe of the pipeline.
586
+ *
587
+ * Options:
588
+ * - proto3_optional = true
589
+ */
590
+ startDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
591
+ /**
592
+ * Mutations already processed.
593
+ *
594
+ * Options:
595
+ * - proto3_optional = true
596
+ */
597
+ currentDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
598
+ /**
599
+ * Minimum timeframe to consider the state to be up-to-date.
600
+ *
601
+ * Options:
602
+ * - proto3_optional = true
603
+ */
604
+ targetDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
605
+ /**
606
+ * All mutations stored in feeds.
607
+ *
608
+ * Options:
609
+ * - proto3_optional = true
610
+ */
611
+ totalDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
612
+ /**
613
+ * All mutations known to exist on the network.
614
+ *
615
+ * Options:
616
+ * - proto3_optional = true
617
+ */
618
+ knownDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
619
+ /**
620
+ * URL of the current space root automerge document.
621
+ *
622
+ * Options:
623
+ * - proto3_optional = true
624
+ */
625
+ spaceRootUrl?: string;
559
626
  }
560
627
  }
561
628
  /**
562
- * Defined in:
563
- * {@link file://./../../../dxos/client/services.proto}
629
+ * Defined in: `../../../dxos/client/services.proto`
564
630
  */
565
- export interface SystemService {
566
- /**
567
- * Get the static config of the client.
568
- */
569
- getConfig: (request: void, options?: RequestOptions) => Promise<dxos_config.Config>;
570
- /**
571
- * Get the diagnostics snapshot.
572
- */
573
- getDiagnostics: (request: GetDiagnosticsRequest, options?: RequestOptions) => Promise<GetDiagnosticsResponse>;
574
- /**
575
- * Update the status of the client. Used to re-activate an inactive client.
576
- */
577
- updateStatus: (request: UpdateStatusRequest, options?: RequestOptions) => Promise<void>;
578
- /**
579
- * Stream the status of the client.
580
- */
581
- queryStatus: (request: QueryStatusRequest, options?: RequestOptions) => Stream<QueryStatusResponse>;
582
- /**
583
- * Reset the client.
584
- */
585
- reset: (request: void, options?: RequestOptions) => Promise<void>;
586
- /**
587
- * Get platform Information
588
- */
589
- getPlatform: (request: void, options?: RequestOptions) => Promise<Platform>;
631
+ export interface CreateSpaceRequest {
632
+ tags?: string[];
633
+ membershipPolicy: dxos_halo_credentials.MembershipPolicy;
590
634
  }
591
635
  /**
592
- * Defined in:
593
- * {@link file://./../../../dxos/client/services.proto}
636
+ * Defined in: `../../../dxos/client/services.proto`
594
637
  */
595
- export interface Identity {
596
- did: string;
597
- identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
638
+ export interface UpdateSpaceRequest {
639
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
598
640
  /**
641
+ * Allowed values: ACTIVE, INACTIVE.
642
+ *
599
643
  * Options:
600
644
  * - proto3_optional = true
601
645
  */
602
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
646
+ state?: SpaceState;
603
647
  /**
604
648
  * Options:
605
649
  * - proto3_optional = true
606
650
  */
607
- profile?: dxos_halo_credentials.ProfileDocument;
651
+ edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
608
652
  }
609
653
  /**
610
- * Defined in:
611
- * {@link file://./../../../dxos/client/services.proto}
654
+ * Defined in: `../../../dxos/client/services.proto`
612
655
  */
613
- export interface RequestRecoveryChallengeResponse {
614
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
615
- controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
616
- challenge: string;
656
+ export interface QuerySpacesResponse {
657
+ spaces?: Space[];
617
658
  }
618
659
  /**
619
- * Defined in:
620
- * {@link file://./../../../dxos/client/services.proto}
660
+ * Defined in: `../../../dxos/client/services.proto`
621
661
  */
622
- export interface RecoverIdentityRequest {
623
- recoveryCode?: string;
624
- external?: RecoverIdentityRequest.ExternalSignature;
625
- token?: string;
662
+ export interface PostMessageRequest {
663
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
664
+ channel: string;
665
+ message: ReturnType<(typeof substitutions)["google.protobuf.Any"]["decode"]>;
626
666
  }
627
- export namespace RecoverIdentityRequest {
628
- /**
629
- * Defined in:
630
- * {@link file://./../../../dxos/client/services.proto}
631
- */
632
- export interface ExternalSignature {
633
- lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
634
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
635
- controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
636
- signature: Uint8Array;
637
- /**
638
- * Options:
639
- * - proto3_optional = true
640
- */
641
- clientDataJson?: Uint8Array;
642
- /**
643
- * Options:
644
- * - proto3_optional = true
645
- */
646
- authenticatorData?: Uint8Array;
647
- }
667
+ /**
668
+ * Defined in: `../../../dxos/client/services.proto`
669
+ */
670
+ export interface SubscribeMessagesRequest {
671
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
672
+ channel: string;
648
673
  }
649
674
  /**
650
- * Defined in:
651
- * {@link file://./../../../dxos/client/services.proto}
675
+ * Defined in: `../../../dxos/client/services.proto`
652
676
  */
653
- export interface RecoveryCredentialData {
654
- /**
655
- * Recovery key used to validate recovery challenge signature.
656
- */
657
- recoveryKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
658
- /**
659
- * Public key used to identify the recovery key.
660
- */
661
- lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
662
- /**
663
- * Algorithm used to generate the recovery key.
664
- */
665
- algorithm: string;
677
+ export interface WriteCredentialsRequest {
678
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
679
+ credentials?: dxos_halo_credentials.Credential[];
666
680
  }
667
681
  /**
668
- * Defined in:
669
- * {@link file://./../../../dxos/client/services.proto}
682
+ * Defined in: `../../../dxos/client/services.proto`
670
683
  */
671
- export interface CreateRecoveryCredentialRequest {
684
+ export interface QueryCredentialsRequest {
685
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
672
686
  /**
673
- * If not provided, a new key will be generated.
674
- *
675
687
  * Options:
676
688
  * - proto3_optional = true
677
689
  */
678
- data?: RecoveryCredentialData;
690
+ noTail?: boolean;
679
691
  }
680
692
  /**
681
- * Defined in:
682
- * {@link file://./../../../dxos/client/services.proto}
693
+ * Defined in: `../../../dxos/client/services.proto`
683
694
  */
684
- export interface CreateRecoveryCredentialResponse {
695
+ export interface CreateEpochRequest {
696
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
685
697
  /**
686
698
  * Options:
687
699
  * - proto3_optional = true
688
700
  */
689
- recoveryCode?: string;
690
- }
691
- /**
692
- * Defined in:
693
- * {@link file://./../../../dxos/client/services.proto}
694
- */
695
- export interface QueryIdentityResponse {
701
+ migration?: CreateEpochRequest.Migration;
696
702
  /**
703
+ * For REPLACE_AUTOMERGE_ROOT migration.
704
+ *
697
705
  * Options:
698
706
  * - proto3_optional = true
699
707
  */
700
- identity?: Identity;
708
+ automergeRootUrl?: string;
701
709
  }
702
- /**
703
- * Defined in:
704
- * {@link file://./../../../dxos/client/services.proto}
705
- */
706
- export interface SignPresentationRequest {
707
- presentation: dxos_halo_credentials.Presentation;
710
+ export namespace CreateEpochRequest {
708
711
  /**
709
- * Options:
710
- * - proto3_optional = true
712
+ * Defined in:
713
+ * {@link file://./../../../dxos/client/services.proto}
711
714
  */
712
- nonce?: Uint8Array;
715
+ export enum Migration {
716
+ NONE = 0,
717
+ INIT_AUTOMERGE = 1,
718
+ PRUNE_AUTOMERGE_ROOT_HISTORY = 2,
719
+ FRAGMENT_AUTOMERGE_ROOT = 3,
720
+ REPLACE_AUTOMERGE_ROOT = 4,
721
+ MIGRATE_REFERENCES_TO_DXN = 5
722
+ }
713
723
  }
714
724
  /**
715
- * Defined in:
716
- * {@link file://./../../../dxos/client/services.proto}
725
+ * Defined in: `../../../dxos/client/services.proto`
717
726
  */
718
- export interface CreateIdentityRequest {
727
+ export interface CreateEpochResponse {
719
728
  /**
729
+ * Credential of the new epoch.
730
+ *
720
731
  * Options:
721
732
  * - proto3_optional = true
722
733
  */
723
- profile?: dxos_halo_credentials.ProfileDocument;
734
+ epochCredential?: dxos_halo_credentials.Credential;
724
735
  /**
736
+ * Control pipeline timeframe.
737
+ *
725
738
  * Options:
726
739
  * - proto3_optional = true
727
740
  */
728
- deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
741
+ controlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
729
742
  }
730
743
  /**
731
- * Defined in:
732
- * {@link file://./../../../dxos/client/services.proto}
744
+ * Defined in: `../../../dxos/client/services.proto`
733
745
  */
734
- export interface IdentityService {
735
- createIdentity: (request: CreateIdentityRequest, options?: RequestOptions) => Promise<Identity>;
736
- requestRecoveryChallenge: (request: void, options?: RequestOptions) => Promise<RequestRecoveryChallengeResponse>;
737
- recoverIdentity: (request: RecoverIdentityRequest, options?: RequestOptions) => Promise<Identity>;
738
- createRecoveryCredential: (request: CreateRecoveryCredentialRequest, options?: RequestOptions) => Promise<CreateRecoveryCredentialResponse>;
739
- queryIdentity: (request: void, options?: RequestOptions) => Stream<QueryIdentityResponse>;
740
- updateProfile: (request: dxos_halo_credentials.ProfileDocument, options?: RequestOptions) => Promise<Identity>;
741
- signPresentation: (request: SignPresentationRequest, options?: RequestOptions) => Promise<dxos_halo_credentials.Presentation>;
742
- createAuthCredential: (request: void, options?: RequestOptions) => Promise<dxos_halo_credentials.Credential>;
746
+ export interface UpdateMemberRoleRequest {
747
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
748
+ memberKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
749
+ newRole: dxos_halo_credentials.SpaceMember.Role;
743
750
  }
744
751
  /**
745
- * Defined in:
746
- * {@link file://./../../../dxos/client/services.proto}
752
+ * Defined in: `../../../dxos/client/services.proto`
747
753
  */
748
- export enum DeviceKind {
749
- CURRENT = 0,
750
- TRUSTED = 1
754
+ export interface AdmitContactRequest {
755
+ contact: Contact;
756
+ role: dxos_halo_credentials.SpaceMember.Role;
757
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
751
758
  }
752
759
  /**
753
- * Defined in:
754
- * {@link file://./../../../dxos/client/services.proto}
760
+ * Defined in: `../../../dxos/client/services.proto`
755
761
  */
756
- export interface Device {
757
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
758
- kind: DeviceKind;
762
+ export interface ContactAdmission {
763
+ credential: dxos_halo_credentials.Credential;
764
+ }
765
+ /**
766
+ * Defined in: `../../../dxos/client/services.proto`
767
+ */
768
+ export interface JoinSpaceResponse {
769
+ space: Space;
770
+ }
771
+ /**
772
+ * Defined in: `../../../dxos/client/services.proto`
773
+ */
774
+ export interface JoinBySpaceKeyRequest {
775
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
776
+ }
777
+ /**
778
+ * Defined in: `../../../dxos/client/services.proto`
779
+ */
780
+ export interface SpaceArchive {
781
+ filename: string;
782
+ contents: Uint8Array;
759
783
  /**
760
784
  * Options:
761
785
  * - proto3_optional = true
762
786
  */
763
- profile?: dxos_halo_credentials.DeviceProfileDocument;
764
- presence: Device.PresenceState;
787
+ format?: SpaceArchive.Format;
765
788
  }
766
- export namespace Device {
789
+ export namespace SpaceArchive {
767
790
  /**
768
791
  * Defined in:
769
792
  * {@link file://./../../../dxos/client/services.proto}
770
793
  */
771
- export enum PresenceState {
772
- OFFLINE = 0,
773
- ONLINE = 1,
774
- REMOVED = 2
794
+ export enum Format {
795
+ BINARY = 0,
796
+ JSON = 1
775
797
  }
776
798
  }
777
799
  /**
778
- * Defined in:
779
- * {@link file://./../../../dxos/client/services.proto}
780
- */
781
- export interface QueryDevicesResponse {
782
- devices?: Device[];
783
- }
784
- /**
785
- * Defined in:
786
- * {@link file://./../../../dxos/client/services.proto}
787
- */
788
- export interface DevicesService {
789
- updateDevice: (request: dxos_halo_credentials.DeviceProfileDocument, options?: RequestOptions) => Promise<Device>;
790
- queryDevices: (request: void, options?: RequestOptions) => Stream<QueryDevicesResponse>;
791
- }
792
- /**
793
- * Defined in:
794
- * {@link file://./../../../dxos/client/services.proto}
800
+ * Defined in: `../../../dxos/client/services.proto`
795
801
  */
796
- export interface Contact {
797
- identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
802
+ export interface ExportSpaceRequest {
803
+ spaceId: string;
798
804
  /**
799
805
  * Options:
800
806
  * - proto3_optional = true
801
807
  */
802
- profile?: dxos_halo_credentials.ProfileDocument;
803
- commonSpaces?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
808
+ format?: SpaceArchive.Format;
804
809
  }
805
810
  /**
806
- * Defined in:
807
- * {@link file://./../../../dxos/client/services.proto}
811
+ * Defined in: `../../../dxos/client/services.proto`
808
812
  */
809
- export interface ContactBook {
810
- contacts?: Contact[];
813
+ export interface ExportSpaceResponse {
814
+ archive: SpaceArchive;
811
815
  }
812
816
  /**
813
- * Defined in:
814
- * {@link file://./../../../dxos/client/services.proto}
817
+ * Defined in: `../../../dxos/client/services.proto`
815
818
  */
816
- export interface ContactsService {
817
- getContacts: (request: void, options?: RequestOptions) => Promise<ContactBook>;
818
- queryContacts: (request: void, options?: RequestOptions) => Stream<ContactBook>;
819
+ export interface ImportSpaceRequest {
820
+ archive: SpaceArchive;
821
+ /**
822
+ * Immutable tags to set on the imported space at creation time.
823
+ */
824
+ tags?: string[];
819
825
  }
820
826
  /**
821
- * Defined in:
822
- * {@link file://./../../../dxos/client/services.proto}
827
+ * Defined in: `../../../dxos/client/services.proto`
823
828
  */
824
- export interface SpaceMember {
825
- identity: Identity;
826
- presence: SpaceMember.PresenceState;
827
- peerStates?: dxos_mesh_presence.PeerState[];
828
- role: dxos_halo_credentials.SpaceMember.Role;
829
- }
830
- export namespace SpaceMember {
829
+ export interface ImportSpaceResponse {
831
830
  /**
832
- * Defined in:
833
- * {@link file://./../../../dxos/client/services.proto}
831
+ * the ID of the new space.
834
832
  */
835
- export enum PresenceState {
836
- OFFLINE = 0,
837
- ONLINE = 1
838
- }
833
+ newSpaceId: string;
839
834
  }
840
835
  /**
841
836
  * Defined in:
842
837
  * {@link file://./../../../dxos/client/services.proto}
843
838
  */
844
- export interface Space {
845
- id: string;
846
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
847
- state: SpaceState;
839
+ export interface SpacesService {
840
+ createSpace: (request: CreateSpaceRequest, options?: RequestOptions) => Promise<Space>;
841
+ updateSpace: (request: UpdateSpaceRequest, options?: RequestOptions) => Promise<void>;
842
+ querySpaces: (request: void, options?: RequestOptions) => Stream<QuerySpacesResponse>;
843
+ updateMemberRole: (request: UpdateMemberRoleRequest, options?: RequestOptions) => Promise<void>;
844
+ admitContact: (request: AdmitContactRequest, options?: RequestOptions) => Promise<void>;
845
+ joinBySpaceKey: (request: JoinBySpaceKeyRequest, options?: RequestOptions) => Promise<JoinSpaceResponse>;
848
846
  /**
849
- * Options:
850
- * - proto3_optional = true
847
+ * Broadcast an ephemeral message to the space swarm.
851
848
  */
852
- pipeline?: Space.PipelineState;
849
+ postMessage: (request: PostMessageRequest, options?: RequestOptions) => Promise<void>;
853
850
  /**
854
- * Options:
855
- * - proto3_optional = true
851
+ * Subscribe to messages from the space swarm.
856
852
  */
857
- error?: dxos_error.Error;
853
+ subscribeMessages: (request: SubscribeMessagesRequest, options?: RequestOptions) => Stream<dxos_mesh_teleport_gossip.GossipMessage>;
858
854
  /**
859
- * Options:
860
- * - proto3_optional = true
855
+ * Write credentials to the space control feed.
861
856
  */
862
- edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
863
- members?: SpaceMember[];
857
+ writeCredentials: (request: WriteCredentialsRequest, options?: RequestOptions) => Promise<void>;
858
+ /**
859
+ * Query credentials from the space control feed.
860
+ */
861
+ queryCredentials: (request: QueryCredentialsRequest, options?: RequestOptions) => Stream<dxos_halo_credentials.Credential>;
862
+ createEpoch: (request: CreateEpochRequest, options?: RequestOptions) => Promise<CreateEpochResponse>;
863
+ exportSpace: (request: ExportSpaceRequest, options?: RequestOptions) => Promise<ExportSpaceResponse>;
864
+ importSpace: (request: ImportSpaceRequest, options?: RequestOptions) => Promise<ImportSpaceResponse>;
865
+ }
866
+ /**
867
+ * Defined in: `../../../dxos/client/services.proto`
868
+ */
869
+ export interface AcceptInvitationRequest {
870
+ invitation: Invitation;
864
871
  /**
865
872
  * Options:
866
873
  * - proto3_optional = true
867
874
  */
868
- creator?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
875
+ deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
876
+ }
877
+ /**
878
+ * Defined in: `../../../dxos/client/services.proto`
879
+ */
880
+ export interface AuthenticationRequest {
881
+ invitationId: string;
882
+ authCode: string;
883
+ }
884
+ /**
885
+ * Defined in: `../../../dxos/client/services.proto`
886
+ */
887
+ export interface CancelInvitationRequest {
888
+ invitationId: string;
889
+ }
890
+ /**
891
+ * Defined in: `../../../dxos/client/services.proto`
892
+ */
893
+ export interface InvitationMethod {
894
+ created?: Invitation;
895
+ accepted?: Invitation;
896
+ }
897
+ /**
898
+ * Defined in: `../../../dxos/client/services.proto`
899
+ */
900
+ export interface QueryInvitationsResponse {
901
+ action: QueryInvitationsResponse.Action;
902
+ type: QueryInvitationsResponse.Type;
903
+ invitations?: Invitation[];
869
904
  /**
870
905
  * Options:
871
906
  * - proto3_optional = true
872
907
  */
873
- cache?: dxos_echo_metadata.SpaceCache;
874
- metrics: Space.Metrics;
908
+ existing?: boolean;
875
909
  }
876
- export namespace Space {
910
+ export namespace QueryInvitationsResponse {
877
911
  /**
878
912
  * Defined in:
879
913
  * {@link file://./../../../dxos/client/services.proto}
880
914
  */
881
- export interface Metrics {
882
- /**
883
- * Options:
884
- * - proto3_optional = true
885
- */
886
- open?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
887
- /**
888
- * Options:
889
- * - proto3_optional = true
890
- */
891
- pipelineInitBegin?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
892
- /**
893
- * Options:
894
- * - proto3_optional = true
895
- */
896
- controlPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
897
- /**
898
- * Options:
899
- * - proto3_optional = true
900
- */
901
- dataPipelineOpen?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
902
- /**
903
- * Options:
904
- * - proto3_optional = true
905
- */
906
- dataPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
907
- /**
908
- * Options:
909
- * - proto3_optional = true
910
- */
911
- ready?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
915
+ export enum Action {
916
+ ADDED = 0,
917
+ REMOVED = 1,
918
+ SAVED = 2,
919
+ LOAD_COMPLETE = 3
912
920
  }
913
921
  /**
914
922
  * Defined in:
915
923
  * {@link file://./../../../dxos/client/services.proto}
916
924
  */
917
- export interface PipelineState {
918
- /**
919
- * Options:
920
- * - proto3_optional = true
921
- */
922
- controlFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
923
- /**
924
- * Options:
925
- * - proto3_optional = true
926
- */
927
- dataFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
928
- /**
929
- * TODO(burdon): Normalize _key suffix.
930
- */
931
- controlFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
932
- dataFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
933
- /**
934
- * Last processed epoch. Might now have been applied yet.
935
- *
936
- * Options:
937
- * - proto3_optional = true
938
- */
939
- currentEpoch?: dxos_halo_credentials.Credential;
940
- /**
941
- * Epoch that is currently applied.
942
- *
943
- * Options:
944
- * - proto3_optional = true
945
- */
946
- appliedEpoch?: dxos_halo_credentials.Credential;
947
- /**
948
- * Mutations already processed.
949
- *
950
- * Options:
951
- * - proto3_optional = true
952
- */
953
- currentControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
954
- /**
955
- * Minimum timeframe to consider the state to be up-to-date.
956
- *
957
- * Options:
958
- * - proto3_optional = true
959
- */
960
- targetControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
961
- /**
962
- * All mutations stored in feeds.
963
- *
964
- * Options:
965
- * - proto3_optional = true
966
- */
967
- totalControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
968
- /**
969
- * All mutations known to exist on the network.
970
- *
971
- * Options:
972
- * - proto3_optional = true
973
- */
974
- knownControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
975
- /**
976
- * Start timeframe of the pipeline.
977
- *
978
- * Options:
979
- * - proto3_optional = true
980
- */
981
- startDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
982
- /**
983
- * Mutations already processed.
984
- *
985
- * Options:
986
- * - proto3_optional = true
987
- */
988
- currentDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
989
- /**
990
- * Minimum timeframe to consider the state to be up-to-date.
991
- *
992
- * Options:
993
- * - proto3_optional = true
994
- */
995
- targetDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
996
- /**
997
- * All mutations stored in feeds.
998
- *
999
- * Options:
1000
- * - proto3_optional = true
1001
- */
1002
- totalDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1003
- /**
1004
- * All mutations known to exist on the network.
1005
- *
1006
- * Options:
1007
- * - proto3_optional = true
1008
- */
1009
- knownDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1010
- /**
1011
- * URL of the current space root automerge document.
1012
- *
1013
- * Options:
1014
- * - proto3_optional = true
1015
- */
1016
- spaceRootUrl?: string;
925
+ export enum Type {
926
+ CREATED = 0,
927
+ ACCEPTED = 1
1017
928
  }
1018
929
  }
1019
930
  /**
1020
- * Defined in:
1021
- * {@link file://./../../../dxos/client/services.proto}
931
+ * Defined in: `../../../dxos/client/services.proto`
1022
932
  */
1023
- export interface UpdateSpaceRequest {
1024
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1025
- /**
1026
- * Allowed values: ACTIVE, INACTIVE.
1027
- *
1028
- * Options:
1029
- * - proto3_optional = true
1030
- */
1031
- state?: SpaceState;
1032
- /**
1033
- * Options:
1034
- * - proto3_optional = true
1035
- */
1036
- edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
933
+ export interface LoadPersistentInvitationsResponse {
934
+ invitations?: Invitation[];
1037
935
  }
1038
936
  /**
1039
937
  * Defined in:
1040
938
  * {@link file://./../../../dxos/client/services.proto}
1041
939
  */
1042
- export interface QuerySpacesResponse {
1043
- spaces?: Space[];
940
+ export interface InvitationsService {
941
+ createInvitation: (request: Invitation, options?: RequestOptions) => Stream<Invitation>;
942
+ acceptInvitation: (request: AcceptInvitationRequest, options?: RequestOptions) => Stream<Invitation>;
943
+ authenticate: (request: AuthenticationRequest, options?: RequestOptions) => Promise<void>;
944
+ cancelInvitation: (request: CancelInvitationRequest, options?: RequestOptions) => Promise<void>;
945
+ queryInvitations: (request: void, options?: RequestOptions) => Stream<QueryInvitationsResponse>;
1044
946
  }
1045
947
  /**
1046
948
  * Defined in:
1047
949
  * {@link file://./../../../dxos/client/services.proto}
1048
950
  */
1049
- export interface PostMessageRequest {
1050
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1051
- channel: string;
1052
- message: ReturnType<(typeof substitutions)["google.protobuf.Any"]["decode"]>;
951
+ export enum ConnectionState {
952
+ OFFLINE = 0,
953
+ ONLINE = 1
1053
954
  }
1054
955
  /**
1055
- * Defined in:
1056
- * {@link file://./../../../dxos/client/services.proto}
956
+ * Defined in: `../../../dxos/client/services.proto`
1057
957
  */
1058
- export interface SubscribeMessagesRequest {
1059
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1060
- channel: string;
958
+ export interface NetworkStatus {
959
+ swarm: ConnectionState;
960
+ signaling?: NetworkStatus.Signal[];
961
+ connectionInfo?: dxos_devtools_swarm.SwarmInfo[];
962
+ }
963
+ export namespace NetworkStatus {
964
+ /**
965
+ * Defined in: `../../../dxos/client/services.proto`
966
+ */
967
+ export interface Signal {
968
+ server: string;
969
+ state: dxos_mesh_signal.SignalState;
970
+ }
1061
971
  }
1062
972
  /**
1063
- * Defined in:
1064
- * {@link file://./../../../dxos/client/services.proto}
973
+ * Defined in: `../../../dxos/client/services.proto`
1065
974
  */
1066
- export interface WriteCredentialsRequest {
1067
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1068
- credentials?: dxos_halo_credentials.Credential[];
975
+ export interface UpdateConfigRequest {
976
+ swarm: ConnectionState;
977
+ }
978
+ /**
979
+ * Defined in: `../../../dxos/client/services.proto`
980
+ */
981
+ export interface SubscribeSwarmStateRequest {
982
+ topic: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1069
983
  }
1070
984
  /**
1071
985
  * Defined in:
1072
986
  * {@link file://./../../../dxos/client/services.proto}
1073
987
  */
1074
- export interface QueryCredentialsRequest {
1075
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
988
+ export interface NetworkService {
989
+ updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
990
+ queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
991
+ joinSwarm: (request: dxos_edge_signal.JoinRequest, options?: RequestOptions) => Promise<void>;
992
+ leaveSwarm: (request: dxos_edge_signal.LeaveRequest, options?: RequestOptions) => Promise<void>;
1076
993
  /**
1077
- * Options:
1078
- * - proto3_optional = true
994
+ * Query the swarm state without joining it.
1079
995
  */
1080
- noTail?: boolean;
996
+ querySwarm: (request: dxos_edge_signal.QueryRequest, options?: RequestOptions) => Promise<dxos_edge_messenger.SwarmResponse>;
997
+ subscribeSwarmState: (request: SubscribeSwarmStateRequest, options?: RequestOptions) => Stream<dxos_edge_messenger.SwarmResponse>;
998
+ sendMessage: (request: dxos_edge_signal.Message, options?: RequestOptions) => Promise<void>;
999
+ subscribeMessages: (request: dxos_edge_messenger.Peer, options?: RequestOptions) => Stream<dxos_edge_signal.Message>;
1081
1000
  }
1082
1001
  /**
1083
1002
  * Defined in:
1084
1003
  * {@link file://./../../../dxos/client/services.proto}
1085
1004
  */
1086
- export interface CreateEpochRequest {
1087
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1005
+ export interface EdgeAgentService {
1006
+ queryEdgeStatus: (request: void, options?: RequestOptions) => Stream<QueryEdgeStatusResponse>;
1007
+ createAgent: (request: void, options?: RequestOptions) => Promise<void>;
1008
+ queryAgentStatus: (request: void, options?: RequestOptions) => Stream<QueryAgentStatusResponse>;
1009
+ }
1010
+ /**
1011
+ * Defined in: `../../../dxos/client/services.proto`
1012
+ */
1013
+ export interface EdgeStatus {
1014
+ state: EdgeStatus.ConnectionState;
1088
1015
  /**
1089
- * Options:
1090
- * - proto3_optional = true
1016
+ * Latency in ms
1091
1017
  */
1092
- migration?: CreateEpochRequest.Migration;
1018
+ rtt: number;
1093
1019
  /**
1094
- * For REPLACE_AUTOMERGE_ROOT migration.
1095
- *
1096
- * Options:
1097
- * - proto3_optional = true
1020
+ * How long the connection has been up
1098
1021
  */
1099
- automergeRootUrl?: string;
1022
+ uptime: number;
1023
+ /**
1024
+ * Upload rate in bytes per second
1025
+ */
1026
+ rateBytesUp: number;
1027
+ /**
1028
+ * Download rate in bytes per second
1029
+ */
1030
+ rateBytesDown: number;
1031
+ messagesSent: number;
1032
+ messagesReceived: number;
1100
1033
  }
1101
- export namespace CreateEpochRequest {
1034
+ export namespace EdgeStatus {
1102
1035
  /**
1103
1036
  * Defined in:
1104
1037
  * {@link file://./../../../dxos/client/services.proto}
1105
1038
  */
1106
- export enum Migration {
1107
- NONE = 0,
1108
- INIT_AUTOMERGE = 1,
1109
- PRUNE_AUTOMERGE_ROOT_HISTORY = 2,
1110
- FRAGMENT_AUTOMERGE_ROOT = 3,
1111
- REPLACE_AUTOMERGE_ROOT = 4,
1112
- MIGRATE_REFERENCES_TO_DXN = 5
1039
+ export enum ConnectionState {
1040
+ NOT_CONNECTED = 0,
1041
+ CONNECTED = 1
1113
1042
  }
1114
1043
  }
1115
1044
  /**
1116
- * Defined in:
1117
- * {@link file://./../../../dxos/client/services.proto}
1045
+ * Defined in: `../../../dxos/client/services.proto`
1118
1046
  */
1119
- export interface CreateEpochResponse {
1120
- /**
1121
- * Credential of the new epoch.
1122
- *
1047
+ export interface QueryEdgeStatusResponse {
1048
+ status: EdgeStatus;
1049
+ }
1050
+ /**
1051
+ * Defined in: `../../../dxos/client/services.proto`
1052
+ */
1053
+ export interface QueryAgentStatusResponse {
1054
+ status: QueryAgentStatusResponse.AgentStatus;
1055
+ }
1056
+ export namespace QueryAgentStatusResponse {
1057
+ /**
1058
+ * Defined in:
1059
+ * {@link file://./../../../dxos/client/services.proto}
1060
+ */
1061
+ export enum AgentStatus {
1062
+ UNKNOWN = 0,
1063
+ ACTIVE = 1,
1064
+ INACTIVE = 2,
1065
+ NOT_FOUND = 3
1066
+ }
1067
+ }
1068
+ /**
1069
+ * Defined in: `../../../dxos/client/queue.proto`
1070
+ */
1071
+ export interface QueueQuery {
1072
+ spaceId: string;
1073
+ /**
1123
1074
  * Options:
1124
1075
  * - proto3_optional = true
1125
1076
  */
1126
- epochCredential?: dxos_halo_credentials.Credential;
1077
+ queuesNamespace?: string;
1127
1078
  /**
1128
- * Control pipeline timeframe.
1079
+ * Queries the whole space if missing.
1080
+ */
1081
+ queueIds?: string[];
1082
+ /**
1083
+ * Filter items after this cursor. Exclusive.
1129
1084
  *
1130
1085
  * Options:
1131
1086
  * - proto3_optional = true
1132
1087
  */
1133
- controlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1088
+ after?: string;
1089
+ /**
1090
+ * Filter items before this cursor. Exclusive.
1091
+ *
1092
+ * Options:
1093
+ * - proto3_optional = true
1094
+ */
1095
+ before?: string;
1096
+ /**
1097
+ * Filter items after this position. Inclusive.
1098
+ *
1099
+ * Options:
1100
+ * - proto3_optional = true
1101
+ */
1102
+ beginPosition?: string;
1103
+ /**
1104
+ * Filter items before this position. Exclusive.
1105
+ *
1106
+ * Options:
1107
+ * - proto3_optional = true
1108
+ */
1109
+ endPosition?: string;
1110
+ /**
1111
+ * Options:
1112
+ * - proto3_optional = true
1113
+ */
1114
+ limit?: number;
1115
+ /**
1116
+ * Options:
1117
+ * - proto3_optional = true
1118
+ */
1119
+ reverse?: boolean;
1120
+ objectIds?: string[];
1134
1121
  }
1135
1122
  /**
1136
- * Defined in:
1137
- * {@link file://./../../../dxos/client/services.proto}
1123
+ * Defined in: `../../../dxos/client/queue.proto`
1138
1124
  */
1139
- export interface UpdateMemberRoleRequest {
1140
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1141
- memberKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1142
- newRole: dxos_halo_credentials.SpaceMember.Role;
1125
+ export interface QueueQueryResult {
1126
+ /**
1127
+ * coerces `undefined` to `null`, corrupting optional fields.
1128
+ */
1129
+ objects?: string[];
1130
+ /**
1131
+ * Cursor to query the next items. Can be passed to `after` in query to keep querying.
1132
+ */
1133
+ nextCursor: string;
1134
+ prevCursor: string;
1143
1135
  }
1144
1136
  /**
1145
- * Defined in:
1146
- * {@link file://./../../../dxos/client/services.proto}
1137
+ * Defined in: `../../../dxos/client/queue.proto`
1147
1138
  */
1148
- export interface AdmitContactRequest {
1149
- contact: Contact;
1150
- role: dxos_halo_credentials.SpaceMember.Role;
1151
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1139
+ export interface QueryQueueRequest {
1140
+ query: QueueQuery;
1152
1141
  }
1153
1142
  /**
1154
- * Defined in:
1155
- * {@link file://./../../../dxos/client/services.proto}
1143
+ * Defined in: `../../../dxos/client/queue.proto`
1156
1144
  */
1157
- export interface ContactAdmission {
1158
- credential: dxos_halo_credentials.Credential;
1145
+ export interface InsertIntoQueueRequest {
1146
+ subspaceTag: string;
1147
+ spaceId: string;
1148
+ queueId: string;
1149
+ /**
1150
+ * JSON-encoded object payloads. Each entry is a serialized ObjectJSON.
1151
+ */
1152
+ objects?: string[];
1159
1153
  }
1160
1154
  /**
1161
- * Defined in:
1162
- * {@link file://./../../../dxos/client/services.proto}
1155
+ * Defined in: `../../../dxos/client/queue.proto`
1163
1156
  */
1164
- export interface JoinSpaceResponse {
1165
- space: Space;
1157
+ export interface DeleteFromQueueRequest {
1158
+ subspaceTag: string;
1159
+ spaceId: string;
1160
+ queueId: string;
1161
+ objectIds?: string[];
1166
1162
  }
1167
1163
  /**
1168
- * Defined in:
1169
- * {@link file://./../../../dxos/client/services.proto}
1164
+ * Defined in: `../../../dxos/client/queue.proto`
1170
1165
  */
1171
- export interface JoinBySpaceKeyRequest {
1172
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1166
+ export interface SyncQueueRequest {
1167
+ subspaceTag: string;
1168
+ spaceId: string;
1169
+ queueId: string;
1170
+ /**
1171
+ * Whether to push local changes to the server. Defaults to true.
1172
+ *
1173
+ * Options:
1174
+ * - proto3_optional = true
1175
+ */
1176
+ shouldPush?: boolean;
1177
+ /**
1178
+ * Whether to pull remote changes from the server. Defaults to true.
1179
+ *
1180
+ * Options:
1181
+ * - proto3_optional = true
1182
+ */
1183
+ shouldPull?: boolean;
1173
1184
  }
1174
1185
  /**
1175
- * Defined in:
1176
- * {@link file://./../../../dxos/client/services.proto}
1186
+ * Defined in: `../../../dxos/client/queue.proto`
1177
1187
  */
1178
- export interface SpaceArchive {
1179
- filename: string;
1180
- contents: Uint8Array;
1188
+ export interface GetSyncStateRequest {
1189
+ spaceId: string;
1190
+ /**
1191
+ * If empty, returns state for all namespaces synced by the client.
1192
+ */
1193
+ namespaces?: string[];
1181
1194
  }
1182
1195
  /**
1183
- * Defined in:
1184
- * {@link file://./../../../dxos/client/services.proto}
1196
+ * Defined in: `../../../dxos/client/queue.proto`
1185
1197
  */
1186
- export interface ExportSpaceRequest {
1187
- spaceId: string;
1198
+ export interface QueueNamespaceSyncState {
1199
+ namespace: string;
1200
+ /**
1201
+ * Blocks still to pull from remote. 0 when caught up.
1202
+ */
1203
+ blocksToPull: string;
1204
+ /**
1205
+ * Unpositioned blocks still to push to remote. 0 when caught up.
1206
+ */
1207
+ blocksToPush: string;
1208
+ /**
1209
+ * Total blocks stored locally for this namespace in the space.
1210
+ */
1211
+ totalBlocks: string;
1188
1212
  }
1189
1213
  /**
1190
- * Defined in:
1191
- * {@link file://./../../../dxos/client/services.proto}
1214
+ * Defined in: `../../../dxos/client/queue.proto`
1192
1215
  */
1193
- export interface ExportSpaceResponse {
1194
- archive: SpaceArchive;
1216
+ export interface GetSyncStateResponse {
1217
+ namespaces?: QueueNamespaceSyncState[];
1195
1218
  }
1196
1219
  /**
1197
1220
  * Defined in:
1198
- * {@link file://./../../../dxos/client/services.proto}
1221
+ * {@link file://./../../../dxos/client/queue.proto}
1199
1222
  */
1200
- export interface ImportSpaceRequest {
1201
- archive: SpaceArchive;
1223
+ export interface QueueService {
1224
+ queryQueue: (request: QueryQueueRequest, options?: RequestOptions) => Promise<QueueQueryResult>;
1225
+ insertIntoQueue: (request: InsertIntoQueueRequest, options?: RequestOptions) => Promise<void>;
1226
+ deleteFromQueue: (request: DeleteFromQueueRequest, options?: RequestOptions) => Promise<void>;
1227
+ syncQueue: (request: SyncQueueRequest, options?: RequestOptions) => Promise<void>;
1228
+ getSyncState: (request: GetSyncStateRequest, options?: RequestOptions) => Promise<GetSyncStateResponse>;
1202
1229
  }
1203
1230
  /**
1204
- * Defined in:
1205
- * {@link file://./../../../dxos/client/services.proto}
1231
+ * Defined in: `../../../dxos/client/logging.proto`
1206
1232
  */
1207
- export interface ImportSpaceResponse {
1233
+ export interface Metrics {
1234
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1235
+ values?: Metrics.KeyPair[];
1236
+ }
1237
+ export namespace Metrics {
1208
1238
  /**
1209
- * the ID of the new space.
1239
+ * Defined in: `../../../dxos/client/logging.proto`
1210
1240
  */
1211
- newSpaceId: string;
1241
+ export interface KeyPair {
1242
+ /**
1243
+ * Options:
1244
+ * - proto3_optional = true
1245
+ */
1246
+ key?: string;
1247
+ /**
1248
+ * Options:
1249
+ * - proto3_optional = true
1250
+ */
1251
+ value?: dxos_value.Value;
1252
+ /**
1253
+ * Options:
1254
+ * - proto3_optional = true
1255
+ */
1256
+ stats?: dxos_value.Stats;
1257
+ }
1212
1258
  }
1213
1259
  /**
1214
- * Defined in:
1215
- * {@link file://./../../../dxos/client/services.proto}
1260
+ * Defined in: `../../../dxos/client/logging.proto`
1216
1261
  */
1217
- export interface SpacesService {
1218
- createSpace: (request: void, options?: RequestOptions) => Promise<Space>;
1219
- updateSpace: (request: UpdateSpaceRequest, options?: RequestOptions) => Promise<void>;
1220
- querySpaces: (request: void, options?: RequestOptions) => Stream<QuerySpacesResponse>;
1221
- updateMemberRole: (request: UpdateMemberRoleRequest, options?: RequestOptions) => Promise<void>;
1222
- admitContact: (request: AdmitContactRequest, options?: RequestOptions) => Promise<void>;
1223
- joinBySpaceKey: (request: JoinBySpaceKeyRequest, options?: RequestOptions) => Promise<JoinSpaceResponse>;
1224
- /**
1225
- * Broadcast an ephemeral message to the space swarm.
1226
- */
1227
- postMessage: (request: PostMessageRequest, options?: RequestOptions) => Promise<void>;
1228
- /**
1229
- * Subscribe to messages from the space swarm.
1230
- */
1231
- subscribeMessages: (request: SubscribeMessagesRequest, options?: RequestOptions) => Stream<dxos_mesh_teleport_gossip.GossipMessage>;
1262
+ export interface ControlMetricsRequest {
1232
1263
  /**
1233
- * Write credentials to the space control feed.
1264
+ * Options:
1265
+ * - proto3_optional = true
1234
1266
  */
1235
- writeCredentials: (request: WriteCredentialsRequest, options?: RequestOptions) => Promise<void>;
1267
+ reset?: boolean;
1236
1268
  /**
1237
- * Query credentials from the space control feed.
1269
+ * Options:
1270
+ * - proto3_optional = true
1238
1271
  */
1239
- queryCredentials: (request: QueryCredentialsRequest, options?: RequestOptions) => Stream<dxos_halo_credentials.Credential>;
1240
- createEpoch: (request: CreateEpochRequest, options?: RequestOptions) => Promise<CreateEpochResponse>;
1241
- exportSpace: (request: ExportSpaceRequest, options?: RequestOptions) => Promise<ExportSpaceResponse>;
1242
- importSpace: (request: ImportSpaceRequest, options?: RequestOptions) => Promise<ImportSpaceResponse>;
1272
+ record?: boolean;
1243
1273
  }
1244
1274
  /**
1245
- * Defined in:
1246
- * {@link file://./../../../dxos/client/services.proto}
1275
+ * Defined in: `../../../dxos/client/logging.proto`
1247
1276
  */
1248
- export interface AcceptInvitationRequest {
1249
- invitation: Invitation;
1277
+ export interface ControlMetricsResponse {
1250
1278
  /**
1251
1279
  * Options:
1252
1280
  * - proto3_optional = true
1253
1281
  */
1254
- deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
1282
+ recording?: boolean;
1255
1283
  }
1256
1284
  /**
1257
- * Defined in:
1258
- * {@link file://./../../../dxos/client/services.proto}
1285
+ * Defined in: `../../../dxos/client/logging.proto`
1259
1286
  */
1260
- export interface AuthenticationRequest {
1261
- invitationId: string;
1262
- authCode: string;
1287
+ export interface QueryMetricsRequest {
1288
+ /**
1289
+ * Options:
1290
+ * - proto3_optional = true
1291
+ */
1292
+ interval?: number;
1263
1293
  }
1264
1294
  /**
1265
- * Defined in:
1266
- * {@link file://./../../../dxos/client/services.proto}
1295
+ * Defined in: `../../../dxos/client/logging.proto`
1267
1296
  */
1268
- export interface CancelInvitationRequest {
1269
- invitationId: string;
1297
+ export interface QueryMetricsResponse {
1298
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1299
+ metrics: Metrics;
1270
1300
  }
1271
1301
  /**
1272
1302
  * Defined in:
1273
- * {@link file://./../../../dxos/client/services.proto}
1303
+ * {@link file://./../../../dxos/client/logging.proto}
1274
1304
  */
1275
- export interface InvitationMethod {
1276
- created?: Invitation;
1277
- accepted?: Invitation;
1305
+ export enum LogLevel {
1306
+ NONE = 0,
1307
+ TRACE = 5,
1308
+ DEBUG = 10,
1309
+ VERBOSE = 11,
1310
+ INFO = 12,
1311
+ WARN = 13,
1312
+ ERROR = 14
1278
1313
  }
1279
1314
  /**
1280
- * Defined in:
1281
- * {@link file://./../../../dxos/client/services.proto}
1315
+ * Defined in: `../../../dxos/client/logging.proto`
1282
1316
  */
1283
- export interface QueryInvitationsResponse {
1284
- action: QueryInvitationsResponse.Action;
1285
- type: QueryInvitationsResponse.Type;
1286
- invitations?: Invitation[];
1317
+ export interface QueryLogsRequest {
1318
+ filters?: QueryLogsRequest.Filter[];
1287
1319
  /**
1288
1320
  * Options:
1289
1321
  * - proto3_optional = true
1290
1322
  */
1291
- existing?: boolean;
1323
+ options?: QueryLogsRequest.MatchingOptions;
1292
1324
  }
1293
- export namespace QueryInvitationsResponse {
1325
+ export namespace QueryLogsRequest {
1294
1326
  /**
1295
1327
  * Defined in:
1296
- * {@link file://./../../../dxos/client/services.proto}
1328
+ * {@link file://./../../../dxos/client/logging.proto}
1297
1329
  */
1298
- export enum Action {
1299
- ADDED = 0,
1300
- REMOVED = 1,
1301
- SAVED = 2,
1302
- LOAD_COMPLETE = 3
1330
+ export enum MatchingOptions {
1331
+ NONE = 0,
1332
+ INCLUSIVE = 1,
1333
+ EXPLICIT = 2
1303
1334
  }
1304
1335
  /**
1305
- * Defined in:
1306
- * {@link file://./../../../dxos/client/services.proto}
1336
+ * Defined in: `../../../dxos/client/logging.proto`
1307
1337
  */
1308
- export enum Type {
1309
- CREATED = 0,
1310
- ACCEPTED = 1
1338
+ export interface Filter {
1339
+ level: LogLevel;
1340
+ /**
1341
+ * Options:
1342
+ * - proto3_optional = true
1343
+ */
1344
+ pattern?: string;
1311
1345
  }
1312
1346
  }
1313
1347
  /**
1314
- * Defined in:
1315
- * {@link file://./../../../dxos/client/services.proto}
1348
+ * Defined in: `../../../dxos/client/logging.proto`
1316
1349
  */
1317
- export interface LoadPersistentInvitationsResponse {
1318
- invitations?: Invitation[];
1319
- }
1320
- /**
1321
- * Defined in:
1322
- * {@link file://./../../../dxos/client/services.proto}
1323
- */
1324
- export interface InvitationsService {
1325
- createInvitation: (request: Invitation, options?: RequestOptions) => Stream<Invitation>;
1326
- acceptInvitation: (request: AcceptInvitationRequest, options?: RequestOptions) => Stream<Invitation>;
1327
- authenticate: (request: AuthenticationRequest, options?: RequestOptions) => Promise<void>;
1328
- cancelInvitation: (request: CancelInvitationRequest, options?: RequestOptions) => Promise<void>;
1329
- queryInvitations: (request: void, options?: RequestOptions) => Stream<QueryInvitationsResponse>;
1330
- }
1331
- /**
1332
- * Defined in:
1333
- * {@link file://./../../../dxos/client/services.proto}
1334
- */
1335
- export enum ConnectionState {
1336
- OFFLINE = 0,
1337
- ONLINE = 1
1338
- }
1339
- /**
1340
- * Defined in:
1341
- * {@link file://./../../../dxos/client/services.proto}
1342
- */
1343
- export interface NetworkStatus {
1344
- swarm: ConnectionState;
1345
- signaling?: NetworkStatus.Signal[];
1346
- connectionInfo?: dxos_devtools_swarm.SwarmInfo[];
1350
+ export interface LogEntry {
1351
+ level: LogLevel;
1352
+ message: string;
1353
+ /**
1354
+ * Options:
1355
+ * - proto3_optional = true
1356
+ */
1357
+ context?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
1358
+ /**
1359
+ * Options:
1360
+ * - proto3_optional = true
1361
+ */
1362
+ meta?: LogEntry.Meta;
1363
+ /**
1364
+ * Options:
1365
+ * - proto3_optional = true
1366
+ */
1367
+ error?: dxos_error.Error;
1368
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1347
1369
  }
1348
- export namespace NetworkStatus {
1370
+ export namespace LogEntry {
1349
1371
  /**
1350
- * Defined in:
1351
- * {@link file://./../../../dxos/client/services.proto}
1372
+ * Defined in: `../../../dxos/client/logging.proto`
1352
1373
  */
1353
- export interface Signal {
1354
- server: string;
1355
- state: dxos_mesh_signal.SignalState;
1374
+ export interface Meta {
1375
+ file: string;
1376
+ line: number;
1377
+ /**
1378
+ * Options:
1379
+ * - proto3_optional = true
1380
+ */
1381
+ scope?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
1382
+ /**
1383
+ * Options:
1384
+ * - proto3_optional = true
1385
+ */
1386
+ resourceId?: number;
1356
1387
  }
1357
1388
  }
1358
1389
  /**
1359
1390
  * Defined in:
1360
- * {@link file://./../../../dxos/client/services.proto}
1361
- */
1362
- export interface UpdateConfigRequest {
1363
- swarm: ConnectionState;
1364
- }
1365
- /**
1366
- * Defined in:
1367
- * {@link file://./../../../dxos/client/services.proto}
1391
+ * {@link file://./../../../dxos/client/logging.proto}
1368
1392
  */
1369
- export interface SubscribeSwarmStateRequest {
1370
- topic: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1393
+ export interface LoggingService {
1394
+ controlMetrics: (request: ControlMetricsRequest, options?: RequestOptions) => Promise<ControlMetricsResponse>;
1395
+ queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
1396
+ queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
1371
1397
  }
1372
1398
  /**
1373
- * Defined in:
1374
- * {@link file://./../../../dxos/client/services.proto}
1399
+ * Defined in: `../../../dxos/client/invitation.proto`
1375
1400
  */
1376
- export interface NetworkService {
1377
- updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
1378
- queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
1379
- joinSwarm: (request: dxos_edge_signal.JoinRequest, options?: RequestOptions) => Promise<void>;
1380
- leaveSwarm: (request: dxos_edge_signal.LeaveRequest, options?: RequestOptions) => Promise<void>;
1401
+ export interface AdmissionKeypair {
1402
+ publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1381
1403
  /**
1382
- * Query the swarm state without joining it.
1404
+ * Options:
1405
+ * - proto3_optional = true
1383
1406
  */
1384
- querySwarm: (request: dxos_edge_signal.QueryRequest, options?: RequestOptions) => Promise<dxos_edge_messenger.SwarmResponse>;
1385
- subscribeSwarmState: (request: SubscribeSwarmStateRequest, options?: RequestOptions) => Stream<dxos_edge_messenger.SwarmResponse>;
1386
- sendMessage: (request: dxos_edge_signal.Message, options?: RequestOptions) => Promise<void>;
1387
- subscribeMessages: (request: dxos_edge_messenger.Peer, options?: RequestOptions) => Stream<dxos_edge_signal.Message>;
1407
+ privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
1388
1408
  }
1389
1409
  /**
1410
+ * Runtime state of the space object.
1411
+ *
1390
1412
  * Defined in:
1391
- * {@link file://./../../../dxos/client/services.proto}
1413
+ * {@link file://./../../../dxos/client/invitation.proto}
1392
1414
  */
1393
- export interface EdgeAgentService {
1394
- queryEdgeStatus: (request: void, options?: RequestOptions) => Stream<QueryEdgeStatusResponse>;
1395
- createAgent: (request: void, options?: RequestOptions) => Promise<void>;
1396
- queryAgentStatus: (request: void, options?: RequestOptions) => Stream<QueryAgentStatusResponse>;
1415
+ export enum SpaceState {
1416
+ INVALID = 0,
1417
+ SPACE_INACTIVE = 2,
1418
+ SPACE_ACTIVE = 6,
1419
+ SPACE_CLOSED = 1,
1420
+ SPACE_CONTROL_ONLY = 7,
1421
+ SPACE_INITIALIZING = 4,
1422
+ SPACE_READY = 3,
1423
+ SPACE_ERROR = 5,
1424
+ SPACE_REQUIRES_MIGRATION = 8
1397
1425
  }
1398
1426
  /**
1399
- * Defined in:
1400
- * {@link file://./../../../dxos/client/services.proto}
1427
+ * Represents the invitation state passed between client and service.
1428
+ *
1429
+ * Defined in: `../../../dxos/client/invitation.proto`
1401
1430
  */
1402
- export interface EdgeStatus {
1403
- state: EdgeStatus.ConnectionState;
1431
+ export interface Invitation {
1404
1432
  /**
1405
- * Latency in ms
1433
+ * Local identifier (random).
1406
1434
  */
1407
- rtt: number;
1435
+ invitationId: string;
1408
1436
  /**
1409
- * How long the connection has been up
1437
+ * Determines the behavior of the invitation.
1410
1438
  */
1411
- uptime: number;
1439
+ type: Invitation.Type;
1412
1440
  /**
1413
- * Upload rate in bytes per second
1441
+ * Kind of access the invitation will grant.
1414
1442
  */
1415
- rateBytesUp: number;
1443
+ kind: Invitation.Kind;
1416
1444
  /**
1417
- * Download rate in bytes per second
1445
+ * How the invitation is authenticated.
1418
1446
  */
1419
- rateBytesDown: number;
1420
- messagesSent: number;
1421
- messagesReceived: number;
1447
+ authMethod: Invitation.AuthMethod;
1448
+ /**
1449
+ * Swarm rendezvous (random).
1450
+ */
1451
+ swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1452
+ /**
1453
+ * Local state.
1454
+ */
1455
+ state: Invitation.State;
1456
+ /**
1457
+ * Timeout for guest to complete invitation once connected (ms).
1458
+ *
1459
+ * Options:
1460
+ * - proto3_optional = true
1461
+ */
1462
+ timeout?: number;
1463
+ /**
1464
+ * Guest's identity.
1465
+ *
1466
+ * Options:
1467
+ * - proto3_optional = true
1468
+ */
1469
+ identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1470
+ /**
1471
+ * Space to join (only present if kind is SPACE).
1472
+ *
1473
+ * Options:
1474
+ * - proto3_optional = true
1475
+ */
1476
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1477
+ /**
1478
+ * Authentication code created by host (only present if auth_method is SHARED_SECRET).
1479
+ *
1480
+ * Options:
1481
+ * - proto3_optional = true
1482
+ */
1483
+ authCode?: string;
1484
+ /**
1485
+ * Path or identifier to navigate to after successful authentication.
1486
+ *
1487
+ * Options:
1488
+ * - proto3_optional = true
1489
+ */
1490
+ target?: string;
1491
+ /**
1492
+ * Host should resume invitation on startup until timeout.
1493
+ *
1494
+ * Options:
1495
+ * - proto3_optional = true
1496
+ */
1497
+ persistent?: boolean;
1498
+ /**
1499
+ * Options:
1500
+ * - proto3_optional = true
1501
+ */
1502
+ created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1503
+ /**
1504
+ * Options:
1505
+ * - proto3_optional = true
1506
+ */
1507
+ lifetime?: number;
1508
+ /**
1509
+ * Whether an invitation can be used multiple times.
1510
+ *
1511
+ * Options:
1512
+ * - proto3_optional = true
1513
+ */
1514
+ multiUse?: boolean;
1515
+ /**
1516
+ * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
1517
+ *
1518
+ * Options:
1519
+ * - proto3_optional = true
1520
+ */
1521
+ guestKeypair?: AdmissionKeypair;
1522
+ /**
1523
+ * Present on Type.DELEGATED invitations.
1524
+ *
1525
+ * Options:
1526
+ * - proto3_optional = true
1527
+ */
1528
+ delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1529
+ /**
1530
+ * Role of the admitted member, defaults to ADMIN.
1531
+ *
1532
+ * Options:
1533
+ * - proto3_optional = true
1534
+ */
1535
+ role?: dxos_halo_credentials.SpaceMember.Role;
1536
+ /**
1537
+ * Id of a the space to join (only present if kind is SPACE).
1538
+ *
1539
+ * Options:
1540
+ * - proto3_optional = true
1541
+ */
1542
+ spaceId?: string;
1422
1543
  }
1423
- export namespace EdgeStatus {
1544
+ export namespace Invitation {
1424
1545
  /**
1425
1546
  * Defined in:
1426
- * {@link file://./../../../dxos/client/services.proto}
1547
+ * {@link file://./../../../dxos/client/invitation.proto}
1427
1548
  */
1428
- export enum ConnectionState {
1429
- NOT_CONNECTED = 0,
1430
- CONNECTED = 1
1549
+ export enum Type {
1550
+ INTERACTIVE = 0,
1551
+ DELEGATED = 1,
1552
+ MULTIUSE = 2
1431
1553
  }
1432
- }
1433
- /**
1434
- * Defined in:
1435
- * {@link file://./../../../dxos/client/services.proto}
1436
- */
1437
- export interface QueryEdgeStatusResponse {
1438
- status: EdgeStatus;
1439
- }
1440
- /**
1441
- * Defined in:
1442
- * {@link file://./../../../dxos/client/services.proto}
1443
- */
1444
- export interface QueryAgentStatusResponse {
1445
- status: QueryAgentStatusResponse.AgentStatus;
1446
- }
1447
- export namespace QueryAgentStatusResponse {
1448
1554
  /**
1449
1555
  * Defined in:
1450
- * {@link file://./../../../dxos/client/services.proto}
1556
+ * {@link file://./../../../dxos/client/invitation.proto}
1451
1557
  */
1452
- export enum AgentStatus {
1453
- UNKNOWN = 0,
1454
- ACTIVE = 1,
1455
- INACTIVE = 2,
1456
- NOT_FOUND = 3
1558
+ export enum Kind {
1559
+ DEVICE = 0,
1560
+ SPACE = 1
1561
+ }
1562
+ /**
1563
+ * Defined in:
1564
+ * {@link file://./../../../dxos/client/invitation.proto}
1565
+ */
1566
+ export enum AuthMethod {
1567
+ NONE = 0,
1568
+ SHARED_SECRET = 1,
1569
+ KNOWN_PUBLIC_KEY = 2
1570
+ }
1571
+ /**
1572
+ * Defined in:
1573
+ * {@link file://./../../../dxos/client/invitation.proto}
1574
+ */
1575
+ export enum State {
1576
+ INIT = 0,
1577
+ CONNECTING = 1,
1578
+ CONNECTED = 2,
1579
+ READY_FOR_AUTHENTICATION = 3,
1580
+ AUTHENTICATING = 4,
1581
+ SUCCESS = 5,
1582
+ CANCELLED = 6,
1583
+ TIMEOUT = 7,
1584
+ ERROR = 8,
1585
+ EXPIRED = 9
1457
1586
  }
1458
1587
  }