@dxos/protocols 0.8.4-main.fffef41 → 0.8.4-staging.60fe92afc8

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 (507) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/src/FeedProtocol.d.ts +528 -0
  4. package/dist/src/FeedProtocol.d.ts.map +1 -0
  5. package/dist/src/FeedProtocol.js +237 -0
  6. package/dist/src/FeedProtocol.js.map +1 -0
  7. package/dist/src/FunctionProtocol.d.ts +15 -2
  8. package/dist/src/FunctionProtocol.d.ts.map +1 -1
  9. package/dist/src/TraceProtocol.d.ts +15 -0
  10. package/dist/src/TraceProtocol.d.ts.map +1 -0
  11. package/dist/src/TraceProtocol.js +4 -0
  12. package/dist/src/TraceProtocol.js.map +1 -0
  13. package/dist/src/automerge.d.ts +203 -13
  14. package/dist/src/automerge.d.ts.map +1 -1
  15. package/dist/src/automerge.js +17 -0
  16. package/dist/src/automerge.js.map +1 -1
  17. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.d.ts +16 -4
  18. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.d.ts.map +1 -1
  19. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.js +17 -5
  20. package/dist/src/buf/proto/gen/dxos/client/invitation_pb.js.map +1 -1
  21. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +311 -0
  22. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
  23. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +59 -0
  24. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
  25. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +78 -3
  26. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  27. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +68 -37
  28. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  29. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +112 -0
  30. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  31. package/dist/src/buf/proto/gen/dxos/config_pb.js +72 -1
  32. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  33. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.d.ts +70 -0
  34. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.d.ts.map +1 -1
  35. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.js +16 -1
  36. package/dist/src/buf/proto/gen/dxos/devtools/host_pb.js.map +1 -1
  37. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +12 -0
  38. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
  39. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
  40. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
  41. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
  42. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  43. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  44. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  45. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +68 -7
  46. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  47. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
  48. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  49. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +28 -0
  50. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts.map +1 -1
  51. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +10 -5
  52. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
  53. package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
  54. package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
  55. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +65 -0
  56. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts.map +1 -1
  57. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +52 -22
  58. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
  59. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.d.ts +11 -4
  60. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.d.ts.map +1 -1
  61. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.js +12 -5
  62. package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.js.map +1 -1
  63. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -10
  64. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
  65. package/dist/src/buf/proto/gen/dxos/iframe_pb.js +1 -1
  66. package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
  67. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +24 -0
  68. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts.map +1 -1
  69. package/dist/src/buf/proto/gen/dxos/rpc_pb.js +12 -7
  70. package/dist/src/buf/proto/gen/dxos/rpc_pb.js.map +1 -1
  71. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -139
  72. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts.map +1 -1
  73. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +11 -45
  74. package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
  75. package/dist/src/edge/EdgeFunctionEnv.d.ts +134 -0
  76. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
  77. package/dist/src/edge/EdgeFunctionEnv.js +4 -0
  78. package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
  79. package/dist/src/edge/edge.d.ts +698 -0
  80. package/dist/src/edge/edge.d.ts.map +1 -0
  81. package/dist/src/edge/edge.js +278 -0
  82. package/dist/src/edge/edge.js.map +1 -0
  83. package/dist/src/edge/edge.test.d.ts +2 -0
  84. package/dist/src/edge/edge.test.d.ts.map +1 -0
  85. package/dist/src/edge/edge.test.js +50 -0
  86. package/dist/src/edge/edge.test.js.map +1 -0
  87. package/dist/src/{edge-error.d.ts → edge/errors.d.ts} +6 -7
  88. package/dist/src/edge/errors.d.ts.map +1 -0
  89. package/dist/src/{edge-error.js → edge/errors.js} +13 -14
  90. package/dist/src/edge/errors.js.map +1 -0
  91. package/dist/src/edge/index.d.ts +5 -0
  92. package/dist/src/edge/index.d.ts.map +1 -0
  93. package/dist/src/edge/index.js +8 -0
  94. package/dist/src/edge/index.js.map +1 -0
  95. package/dist/src/edge/registry.d.ts +212 -0
  96. package/dist/src/edge/registry.d.ts.map +1 -0
  97. package/dist/src/edge/registry.js +139 -0
  98. package/dist/src/edge/registry.js.map +1 -0
  99. package/dist/src/errors/base-errors.d.ts +86 -8
  100. package/dist/src/errors/base-errors.d.ts.map +1 -1
  101. package/dist/src/errors/base-errors.js +4 -20
  102. package/dist/src/errors/base-errors.js.map +1 -1
  103. package/dist/src/errors/encoding.d.ts +2 -2
  104. package/dist/src/errors/encoding.d.ts.map +1 -1
  105. package/dist/src/errors/encoding.js.map +1 -1
  106. package/dist/src/errors/errors.d.ts +619 -42
  107. package/dist/src/errors/errors.d.ts.map +1 -1
  108. package/dist/src/errors/errors.js +49 -103
  109. package/dist/src/errors/errors.js.map +1 -1
  110. package/dist/src/errors/errors.test.js +1 -1
  111. package/dist/src/errors/errors.test.js.map +1 -1
  112. package/dist/src/errors/helpers.d.ts +9 -5
  113. package/dist/src/errors/helpers.d.ts.map +1 -1
  114. package/dist/src/errors/helpers.js +3 -3
  115. package/dist/src/errors/helpers.js.map +1 -1
  116. package/dist/src/errors/index.d.ts +5 -5
  117. package/dist/src/errors/parameter.d.ts.map +1 -1
  118. package/dist/src/feed-replication.d.ts.map +1 -1
  119. package/dist/src/index.d.ts +12 -13
  120. package/dist/src/index.d.ts.map +1 -1
  121. package/dist/src/index.js +4 -5
  122. package/dist/src/index.js.map +1 -1
  123. package/dist/src/indexing.d.ts.map +1 -1
  124. package/dist/src/invitation.js +3 -3
  125. package/dist/src/invitation.js.map +1 -1
  126. package/dist/src/messenger.d.ts +16 -0
  127. package/dist/src/messenger.d.ts.map +1 -0
  128. package/dist/src/messenger.js +4 -0
  129. package/dist/src/messenger.js.map +1 -0
  130. package/dist/src/profile-archive.d.ts +14 -1
  131. package/dist/src/profile-archive.d.ts.map +1 -1
  132. package/dist/src/profile-archive.js +2 -0
  133. package/dist/src/profile-archive.js.map +1 -1
  134. package/dist/src/proto/gen/dxos/agent/dashboard.d.ts +3 -6
  135. package/dist/src/proto/gen/dxos/agent/dashboard.d.ts.map +1 -1
  136. package/dist/src/proto/gen/dxos/agent/dashboard.js.map +1 -1
  137. package/dist/src/proto/gen/dxos/agent/echoproxy.d.ts +1 -2
  138. package/dist/src/proto/gen/dxos/agent/echoproxy.d.ts.map +1 -1
  139. package/dist/src/proto/gen/dxos/agent/epoch.d.ts +1 -2
  140. package/dist/src/proto/gen/dxos/agent/epoch.d.ts.map +1 -1
  141. package/dist/src/proto/gen/dxos/agent/functions.d.ts +6 -12
  142. package/dist/src/proto/gen/dxos/agent/functions.d.ts.map +1 -1
  143. package/dist/src/proto/gen/dxos/bot.d.ts +12 -24
  144. package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -1
  145. package/dist/src/proto/gen/dxos/bot.js.map +1 -1
  146. package/dist/src/proto/gen/dxos/client/services.d.ts +1050 -915
  147. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  148. package/dist/src/proto/gen/dxos/client/services.js +109 -94
  149. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  150. package/dist/src/proto/gen/dxos/config.d.ts +115 -100
  151. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  152. package/dist/src/proto/gen/dxos/config.js +26 -0
  153. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  154. package/dist/src/proto/gen/dxos/devtools/host.d.ts +101 -119
  155. package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  156. package/dist/src/proto/gen/dxos/devtools/swarm.d.ts +4 -8
  157. package/dist/src/proto/gen/dxos/devtools/swarm.d.ts.map +1 -1
  158. package/dist/src/proto/gen/dxos/echo/blob.d.ts +1 -2
  159. package/dist/src/proto/gen/dxos/echo/blob.d.ts.map +1 -1
  160. package/dist/src/proto/gen/dxos/echo/blob.js.map +1 -1
  161. package/dist/src/proto/gen/dxos/echo/feed.d.ts +4 -8
  162. package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
  163. package/dist/src/proto/gen/dxos/echo/filter.d.ts +2 -4
  164. package/dist/src/proto/gen/dxos/echo/filter.d.ts.map +1 -1
  165. package/dist/src/proto/gen/dxos/echo/filter.js.map +1 -1
  166. package/dist/src/proto/gen/dxos/echo/indexing.d.ts +2 -4
  167. package/dist/src/proto/gen/dxos/echo/indexing.d.ts.map +1 -1
  168. package/dist/src/proto/gen/dxos/echo/indexing.js.map +1 -1
  169. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +16 -16
  170. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
  171. package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -1
  172. package/dist/src/proto/gen/dxos/echo/model/document.d.ts +11 -22
  173. package/dist/src/proto/gen/dxos/echo/model/document.d.ts.map +1 -1
  174. package/dist/src/proto/gen/dxos/echo/model/document.js.map +1 -1
  175. package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts +1 -2
  176. package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts.map +1 -1
  177. package/dist/src/proto/gen/dxos/echo/model/text.d.ts +2 -4
  178. package/dist/src/proto/gen/dxos/echo/model/text.d.ts.map +1 -1
  179. package/dist/src/proto/gen/dxos/echo/object.d.ts +6 -12
  180. package/dist/src/proto/gen/dxos/echo/object.d.ts.map +1 -1
  181. package/dist/src/proto/gen/dxos/echo/object.js.map +1 -1
  182. package/dist/src/proto/gen/dxos/echo/query.d.ts +21 -9
  183. package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  184. package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
  185. package/dist/src/proto/gen/dxos/echo/service.d.ts +61 -34
  186. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  187. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +2 -4
  188. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
  189. package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +2 -4
  190. package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -1
  191. package/dist/src/proto/gen/dxos/edge/calls.d.ts +5 -10
  192. package/dist/src/proto/gen/dxos/edge/calls.d.ts.map +1 -1
  193. package/dist/src/proto/gen/dxos/edge/messenger.d.ts +28 -10
  194. package/dist/src/proto/gen/dxos/edge/messenger.d.ts.map +1 -1
  195. package/dist/src/proto/gen/dxos/edge/messenger.js.map +1 -1
  196. package/dist/src/proto/gen/dxos/edge/signal.d.ts +7 -14
  197. package/dist/src/proto/gen/dxos/edge/signal.d.ts.map +1 -1
  198. package/dist/src/proto/gen/dxos/error.d.ts +1 -2
  199. package/dist/src/proto/gen/dxos/error.d.ts.map +1 -1
  200. package/dist/src/proto/gen/dxos/gravity.d.ts +10 -20
  201. package/dist/src/proto/gen/dxos/gravity.d.ts.map +1 -1
  202. package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts +1 -2
  203. package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts.map +1 -1
  204. package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts +6 -12
  205. package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts.map +1 -1
  206. package/dist/src/proto/gen/dxos/halo/credentials/greet.js.map +1 -1
  207. package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts +2 -4
  208. package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts.map +1 -1
  209. package/dist/src/proto/gen/dxos/halo/credentials.d.ts +47 -43
  210. package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
  211. package/dist/src/proto/gen/dxos/halo/credentials.js +9 -0
  212. package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -1
  213. package/dist/src/proto/gen/dxos/halo/invitations.d.ts +16 -28
  214. package/dist/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -1
  215. package/dist/src/proto/gen/dxos/halo/invitations.js +3 -2
  216. package/dist/src/proto/gen/dxos/halo/invitations.js.map +1 -1
  217. package/dist/src/proto/gen/dxos/halo/keyring.d.ts +1 -2
  218. package/dist/src/proto/gen/dxos/halo/keyring.d.ts.map +1 -1
  219. package/dist/src/proto/gen/dxos/halo/keys.d.ts +2 -4
  220. package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -1
  221. package/dist/src/proto/gen/dxos/halo/signed.d.ts +4 -8
  222. package/dist/src/proto/gen/dxos/halo/signed.d.ts.map +1 -1
  223. package/dist/src/proto/gen/dxos/iframe.d.ts +4 -18
  224. package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -1
  225. package/dist/src/proto/gen/dxos/iframe.js.map +1 -1
  226. package/dist/src/proto/gen/dxos/keys.d.ts +2 -4
  227. package/dist/src/proto/gen/dxos/keys.d.ts.map +1 -1
  228. package/dist/src/proto/gen/dxos/mesh/bridge.d.ts +12 -24
  229. package/dist/src/proto/gen/dxos/mesh/bridge.d.ts.map +1 -1
  230. package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts +1 -2
  231. package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts.map +1 -1
  232. package/dist/src/proto/gen/dxos/mesh/messaging.d.ts +2 -4
  233. package/dist/src/proto/gen/dxos/mesh/messaging.d.ts.map +1 -1
  234. package/dist/src/proto/gen/dxos/mesh/muxer.d.ts +5 -10
  235. package/dist/src/proto/gen/dxos/mesh/muxer.d.ts.map +1 -1
  236. package/dist/src/proto/gen/dxos/mesh/presence.d.ts +1 -2
  237. package/dist/src/proto/gen/dxos/mesh/presence.d.ts.map +1 -1
  238. package/dist/src/proto/gen/dxos/mesh/protocol.d.ts +3 -6
  239. package/dist/src/proto/gen/dxos/mesh/protocol.d.ts.map +1 -1
  240. package/dist/src/proto/gen/dxos/mesh/replicator.d.ts +2 -4
  241. package/dist/src/proto/gen/dxos/mesh/replicator.d.ts.map +1 -1
  242. package/dist/src/proto/gen/dxos/mesh/signal.d.ts +9 -18
  243. package/dist/src/proto/gen/dxos/mesh/signal.d.ts.map +1 -1
  244. package/dist/src/proto/gen/dxos/mesh/signal.js.map +1 -1
  245. package/dist/src/proto/gen/dxos/mesh/swarm.d.ts +6 -12
  246. package/dist/src/proto/gen/dxos/mesh/swarm.d.ts.map +1 -1
  247. package/dist/src/proto/gen/dxos/mesh/teleport/auth.d.ts +2 -4
  248. package/dist/src/proto/gen/dxos/mesh/teleport/auth.d.ts.map +1 -1
  249. package/dist/src/proto/gen/dxos/mesh/teleport/automerge.d.ts +2 -4
  250. package/dist/src/proto/gen/dxos/mesh/teleport/automerge.d.ts.map +1 -1
  251. package/dist/src/proto/gen/dxos/mesh/teleport/blobsync.d.ts +3 -6
  252. package/dist/src/proto/gen/dxos/mesh/teleport/blobsync.d.ts.map +1 -1
  253. package/dist/src/proto/gen/dxos/mesh/teleport/control.d.ts +3 -6
  254. package/dist/src/proto/gen/dxos/mesh/teleport/control.d.ts.map +1 -1
  255. package/dist/src/proto/gen/dxos/mesh/teleport/gossip.d.ts +1 -2
  256. package/dist/src/proto/gen/dxos/mesh/teleport/gossip.d.ts.map +1 -1
  257. package/dist/src/proto/gen/dxos/mesh/teleport/notarization.d.ts +1 -2
  258. package/dist/src/proto/gen/dxos/mesh/teleport/notarization.d.ts.map +1 -1
  259. package/dist/src/proto/gen/dxos/mesh/teleport/replicator.d.ts +5 -10
  260. package/dist/src/proto/gen/dxos/mesh/teleport/replicator.d.ts.map +1 -1
  261. package/dist/src/proto/gen/dxos/mesh/teleport.d.ts +2 -4
  262. package/dist/src/proto/gen/dxos/mesh/teleport.d.ts.map +1 -1
  263. package/dist/src/proto/gen/dxos/registry.d.ts +3 -6
  264. package/dist/src/proto/gen/dxos/registry.d.ts.map +1 -1
  265. package/dist/src/proto/gen/dxos/rpc.d.ts +24 -12
  266. package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -1
  267. package/dist/src/proto/gen/dxos/rpc.js.map +1 -1
  268. package/dist/src/proto/gen/dxos/service/agentmanager.d.ts +4 -8
  269. package/dist/src/proto/gen/dxos/service/agentmanager.d.ts.map +1 -1
  270. package/dist/src/proto/gen/dxos/service/agentmanager.js.map +1 -1
  271. package/dist/src/proto/gen/dxos/service/publisher.d.ts +5 -10
  272. package/dist/src/proto/gen/dxos/service/publisher.d.ts.map +1 -1
  273. package/dist/src/proto/gen/dxos/service/supervisor.d.ts +12 -24
  274. package/dist/src/proto/gen/dxos/service/supervisor.d.ts.map +1 -1
  275. package/dist/src/proto/gen/dxos/service/supervisor.js.map +1 -1
  276. package/dist/src/proto/gen/dxos/service/tunnel.d.ts +3 -6
  277. package/dist/src/proto/gen/dxos/service/tunnel.d.ts.map +1 -1
  278. package/dist/src/proto/gen/dxos/tracing.d.ts +10 -99
  279. package/dist/src/proto/gen/dxos/tracing.d.ts.map +1 -1
  280. package/dist/src/proto/gen/dxos/type.d.ts +12 -24
  281. package/dist/src/proto/gen/dxos/type.d.ts.map +1 -1
  282. package/dist/src/proto/gen/dxos/value.d.ts +2 -4
  283. package/dist/src/proto/gen/dxos/value.d.ts.map +1 -1
  284. package/dist/src/proto/gen/example/testing/data.d.ts +4 -8
  285. package/dist/src/proto/gen/example/testing/data.d.ts.map +1 -1
  286. package/dist/src/proto/gen/example/testing/rpc.d.ts +7 -14
  287. package/dist/src/proto/gen/example/testing/rpc.d.ts.map +1 -1
  288. package/dist/src/proto/gen/google/protobuf.d.ts +326 -40
  289. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  290. package/dist/src/proto/gen/google/protobuf.js +127 -1
  291. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  292. package/dist/src/proto/gen/index.d.ts +47 -7
  293. package/dist/src/proto/gen/index.d.ts.map +1 -1
  294. package/dist/src/proto/gen/index.js +1 -1
  295. package/dist/src/proto/gen/index.js.map +1 -1
  296. package/dist/src/proto/index.d.ts +2 -2
  297. package/dist/src/proto/substitutions.d.ts +8 -8
  298. package/dist/src/proto/substitutions.d.ts.map +1 -1
  299. package/dist/src/proto/types.d.ts +1 -1
  300. package/dist/src/space-archive.d.ts +62 -3
  301. package/dist/src/space-archive.d.ts.map +1 -1
  302. package/dist/src/space-archive.js +13 -1
  303. package/dist/src/space-archive.js.map +1 -1
  304. package/dist/src/types.d.ts +2 -2
  305. package/dist/tsconfig.tsbuildinfo +1 -1
  306. package/package.json +20 -35
  307. package/src/FeedProtocol.ts +323 -0
  308. package/src/FunctionProtocol.ts +17 -6
  309. package/src/TraceProtocol.ts +21 -0
  310. package/src/automerge.ts +239 -13
  311. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
  312. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
  313. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
  314. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
  315. package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
  316. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +20 -6
  317. package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
  318. package/src/buf/proto/gen/dxos/client/queue_pb.ts +373 -0
  319. package/src/buf/proto/gen/dxos/client/services_pb.ts +129 -40
  320. package/src/buf/proto/gen/dxos/config_pb.ts +132 -2
  321. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
  322. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +83 -2
  323. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
  324. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
  325. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
  326. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
  327. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
  328. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +16 -2
  329. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
  330. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
  331. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
  332. package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
  333. package/src/buf/proto/gen/dxos/echo/query_pb.ts +16 -4
  334. package/src/buf/proto/gen/dxos/echo/service_pb.ts +81 -13
  335. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
  336. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
  337. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
  338. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +39 -6
  339. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
  340. package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
  341. package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
  342. package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
  343. package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
  344. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
  345. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
  346. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
  347. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +100 -23
  348. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +14 -6
  349. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
  350. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
  351. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
  352. package/src/buf/proto/gen/dxos/iframe_pb.ts +3 -14
  353. package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
  354. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
  355. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
  356. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
  357. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
  358. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
  359. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
  360. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
  361. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
  362. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
  363. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
  364. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
  365. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
  366. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
  367. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
  368. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
  369. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
  370. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
  371. package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
  372. package/src/buf/proto/gen/dxos/rpc_pb.ts +37 -8
  373. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
  374. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
  375. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
  376. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
  377. package/src/buf/proto/gen/dxos/tracing_pb.ts +12 -179
  378. package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
  379. package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
  380. package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
  381. package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
  382. package/src/codec.test.ts +1 -1
  383. package/src/edge/EdgeFunctionEnv.ts +228 -0
  384. package/src/edge/edge.test.ts +64 -0
  385. package/src/edge/edge.ts +818 -0
  386. package/src/{edge-error.ts → edge/errors.ts} +15 -16
  387. package/src/edge/index.ts +8 -0
  388. package/src/edge/registry.ts +164 -0
  389. package/src/errors/base-errors.ts +4 -22
  390. package/src/errors/encoding.ts +2 -3
  391. package/src/errors/errors.test.ts +2 -2
  392. package/src/errors/errors.ts +57 -124
  393. package/src/errors/helpers.ts +6 -7
  394. package/src/errors/index.ts +5 -5
  395. package/src/feed-replication.ts +1 -0
  396. package/src/index.ts +12 -13
  397. package/src/indexing.test.ts +1 -1
  398. package/src/invitation.ts +3 -3
  399. package/src/messenger.ts +22 -0
  400. package/src/profile-archive.ts +13 -0
  401. package/src/proto/dxos/client/invitation.proto +9 -2
  402. package/src/proto/dxos/client/queue.proto +102 -0
  403. package/src/proto/dxos/client/services.proto +23 -1
  404. package/src/proto/dxos/config.proto +50 -1
  405. package/src/proto/dxos/devtools/host.proto +27 -0
  406. package/src/proto/dxos/echo/metadata.proto +6 -0
  407. package/src/proto/dxos/echo/query.proto +4 -1
  408. package/src/proto/dxos/echo/service.proto +38 -4
  409. package/src/proto/dxos/edge/messenger.proto +10 -0
  410. package/src/proto/dxos/halo/credentials.proto +24 -0
  411. package/src/proto/dxos/halo/invitations.proto +5 -2
  412. package/src/proto/dxos/iframe.proto +1 -3
  413. package/src/proto/dxos/rpc.proto +7 -0
  414. package/src/proto/dxos/tracing.proto +0 -40
  415. package/src/proto/gen/dxos/agent/dashboard.ts +3 -6
  416. package/src/proto/gen/dxos/agent/echoproxy.ts +1 -2
  417. package/src/proto/gen/dxos/agent/epoch.ts +1 -2
  418. package/src/proto/gen/dxos/agent/functions.ts +6 -12
  419. package/src/proto/gen/dxos/bot.ts +12 -24
  420. package/src/proto/gen/dxos/client/services.ts +1050 -915
  421. package/src/proto/gen/dxos/config.ts +115 -100
  422. package/src/proto/gen/dxos/devtools/host.ts +101 -119
  423. package/src/proto/gen/dxos/devtools/swarm.ts +4 -8
  424. package/src/proto/gen/dxos/echo/blob.ts +1 -2
  425. package/src/proto/gen/dxos/echo/feed.ts +4 -8
  426. package/src/proto/gen/dxos/echo/filter.ts +2 -4
  427. package/src/proto/gen/dxos/echo/indexing.ts +2 -4
  428. package/src/proto/gen/dxos/echo/metadata.ts +16 -16
  429. package/src/proto/gen/dxos/echo/model/document.ts +11 -22
  430. package/src/proto/gen/dxos/echo/model/messenger.ts +1 -2
  431. package/src/proto/gen/dxos/echo/model/text.ts +2 -4
  432. package/src/proto/gen/dxos/echo/object.ts +6 -12
  433. package/src/proto/gen/dxos/echo/query.ts +21 -9
  434. package/src/proto/gen/dxos/echo/service.ts +60 -34
  435. package/src/proto/gen/dxos/echo/snapshot.ts +2 -4
  436. package/src/proto/gen/dxos/echo/timeframe.ts +2 -4
  437. package/src/proto/gen/dxos/edge/calls.ts +5 -10
  438. package/src/proto/gen/dxos/edge/messenger.ts +28 -10
  439. package/src/proto/gen/dxos/edge/signal.ts +7 -14
  440. package/src/proto/gen/dxos/error.ts +1 -2
  441. package/src/proto/gen/dxos/gravity.ts +10 -20
  442. package/src/proto/gen/dxos/halo/credentials/auth.ts +1 -2
  443. package/src/proto/gen/dxos/halo/credentials/greet.ts +6 -12
  444. package/src/proto/gen/dxos/halo/credentials/identity.ts +2 -4
  445. package/src/proto/gen/dxos/halo/credentials.ts +47 -43
  446. package/src/proto/gen/dxos/halo/invitations.ts +16 -28
  447. package/src/proto/gen/dxos/halo/keyring.ts +1 -2
  448. package/src/proto/gen/dxos/halo/keys.ts +2 -4
  449. package/src/proto/gen/dxos/halo/signed.ts +4 -8
  450. package/src/proto/gen/dxos/iframe.ts +4 -18
  451. package/src/proto/gen/dxos/keys.ts +2 -4
  452. package/src/proto/gen/dxos/mesh/bridge.ts +12 -24
  453. package/src/proto/gen/dxos/mesh/broadcast.ts +1 -2
  454. package/src/proto/gen/dxos/mesh/messaging.ts +2 -4
  455. package/src/proto/gen/dxos/mesh/muxer.ts +5 -10
  456. package/src/proto/gen/dxos/mesh/presence.ts +1 -2
  457. package/src/proto/gen/dxos/mesh/protocol.ts +3 -6
  458. package/src/proto/gen/dxos/mesh/replicator.ts +2 -4
  459. package/src/proto/gen/dxos/mesh/signal.ts +9 -18
  460. package/src/proto/gen/dxos/mesh/swarm.ts +6 -12
  461. package/src/proto/gen/dxos/mesh/teleport/auth.ts +2 -4
  462. package/src/proto/gen/dxos/mesh/teleport/automerge.ts +2 -4
  463. package/src/proto/gen/dxos/mesh/teleport/blobsync.ts +3 -6
  464. package/src/proto/gen/dxos/mesh/teleport/control.ts +3 -6
  465. package/src/proto/gen/dxos/mesh/teleport/gossip.ts +1 -2
  466. package/src/proto/gen/dxos/mesh/teleport/notarization.ts +1 -2
  467. package/src/proto/gen/dxos/mesh/teleport/replicator.ts +5 -10
  468. package/src/proto/gen/dxos/mesh/teleport.ts +2 -4
  469. package/src/proto/gen/dxos/registry.ts +3 -6
  470. package/src/proto/gen/dxos/rpc.ts +24 -12
  471. package/src/proto/gen/dxos/service/agentmanager.ts +4 -8
  472. package/src/proto/gen/dxos/service/publisher.ts +5 -10
  473. package/src/proto/gen/dxos/service/supervisor.ts +12 -24
  474. package/src/proto/gen/dxos/service/tunnel.ts +3 -6
  475. package/src/proto/gen/dxos/tracing.ts +10 -96
  476. package/src/proto/gen/dxos/type.ts +12 -24
  477. package/src/proto/gen/dxos/value.ts +2 -4
  478. package/src/proto/gen/example/testing/data.ts +4 -8
  479. package/src/proto/gen/example/testing/rpc.ts +7 -14
  480. package/src/proto/gen/google/protobuf.ts +326 -40
  481. package/src/proto/gen/index.ts +48 -8
  482. package/src/proto/index.ts +2 -2
  483. package/src/proto/types.ts +1 -1
  484. package/src/space-archive.ts +70 -1
  485. package/src/types.ts +2 -2
  486. package/dist/src/edge-error.d.ts.map +0 -1
  487. package/dist/src/edge-error.js.map +0 -1
  488. package/dist/src/edge.d.ts +0 -333
  489. package/dist/src/edge.d.ts.map +0 -1
  490. package/dist/src/edge.js +0 -155
  491. package/dist/src/edge.js.map +0 -1
  492. package/dist/src/query.d.ts +0 -5
  493. package/dist/src/query.d.ts.map +0 -1
  494. package/dist/src/query.js +0 -8
  495. package/dist/src/query.js.map +0 -1
  496. package/dist/src/queue.d.ts +0 -37
  497. package/dist/src/queue.d.ts.map +0 -1
  498. package/dist/src/queue.js +0 -8
  499. package/dist/src/queue.js.map +0 -1
  500. package/dist/src/tracing.d.ts +0 -40
  501. package/dist/src/tracing.d.ts.map +0 -1
  502. package/dist/src/tracing.js +0 -50
  503. package/dist/src/tracing.js.map +0 -1
  504. package/src/edge.ts +0 -477
  505. package/src/query.ts +0 -8
  506. package/src/queue.ts +0 -51
  507. package/src/tracing.ts +0 -86
@@ -1,37 +0,0 @@
1
- import type { SpaceId } from '@dxos/keys';
2
- import type { ObjectId } from './types.js';
3
- export type QueueCursor = string & {
4
- __QueueCursor: never;
5
- };
6
- export type QueueQuery = {
7
- queueId: ObjectId;
8
- after?: QueueCursor;
9
- before?: QueueCursor;
10
- limit?: number;
11
- reverse?: boolean;
12
- objectIds?: ObjectId[];
13
- };
14
- export type QueryResult = {
15
- objects: unknown[];
16
- /**
17
- * Cursor at the end of the range.
18
- */
19
- nextCursor: QueueCursor | null;
20
- /**
21
- * Cursor at the start of the range.
22
- */
23
- prevCursor: QueueCursor | null;
24
- };
25
- /**
26
- * Position of an object in the queue that it is in.
27
- */
28
- export declare const KEY_QUEUE_POSITION = "dxos.org/key/queue-position";
29
- /**
30
- * Service for managing queues.
31
- */
32
- export interface QueueService {
33
- queryQueue(subspaceTag: string, spaceId: SpaceId, query: QueueQuery): Promise<QueryResult>;
34
- insertIntoQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objects: unknown[]): Promise<void>;
35
- deleteFromQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objectIds: ObjectId[]): Promise<void>;
36
- }
37
- //# sourceMappingURL=queue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/queue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IAAE,aAAa,EAAE,KAAK,CAAA;CAAE,CAAC;AAE5D,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,QAAQ,CAAC;IAElB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG;IAGxB,OAAO,EAAE,OAAO,EAAE,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3F,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7G,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjH"}
package/dist/src/queue.js DELETED
@@ -1,8 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
- /**
5
- * Position of an object in the queue that it is in.
6
- */
7
- export const KEY_QUEUE_POSITION = 'dxos.org/key/queue-position';
8
- //# sourceMappingURL=queue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/queue.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAkCF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,6BAA6B,CAAC"}
@@ -1,40 +0,0 @@
1
- export type Command = 'begin' | 'end' | 'update';
2
- export type TraceStatus = 'ok' | 'error';
3
- export type DataType = Record<string, any>;
4
- export type TracingContext = {
5
- span?: {
6
- id: string;
7
- command?: Command;
8
- parent?: string;
9
- status?: TraceStatus;
10
- data?: DataType;
11
- };
12
- };
13
- export type Trace = {
14
- begin: (opts: {
15
- id: string;
16
- parentId?: string;
17
- data?: DataType;
18
- }) => TracingContext;
19
- end: (opts: {
20
- id: string;
21
- status?: 'ok' | 'error';
22
- data?: DataType;
23
- }) => TracingContext;
24
- update: (opts: {
25
- id: string;
26
- data: DataType;
27
- }) => TracingContext;
28
- error: (opts: {
29
- id: string;
30
- error: Error;
31
- data?: DataType;
32
- }) => TracingContext;
33
- };
34
- export declare const trace: Trace;
35
- export type DataPipelineProcessed = {
36
- spaceKey: string;
37
- feedKey: string;
38
- seq: number;
39
- };
40
- //# sourceMappingURL=tracing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;KAAE,KAAK,cAAc,CAAC;IACpF,GAAG,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;KAAE,KAAK,cAAc,CAAC;IACxF,MAAM,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,KAAK,cAAc,CAAC;IACjE,KAAK,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC;QAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;KAAE,KAAK,cAAc,CAAC;CAChF,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAgDnB,CAAC;AAMF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
@@ -1,50 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
- export const trace = {
5
- begin: ({ id, parentId, data }) => {
6
- return {
7
- span: {
8
- command: 'begin',
9
- id,
10
- parent: parentId,
11
- data,
12
- },
13
- };
14
- },
15
- end: ({ id, status, data }) => {
16
- return {
17
- span: {
18
- command: 'end',
19
- id,
20
- status: status ?? 'ok',
21
- data,
22
- },
23
- };
24
- },
25
- update: ({ id, data }) => {
26
- return {
27
- span: {
28
- command: 'update',
29
- id,
30
- data,
31
- },
32
- };
33
- },
34
- error: ({ id, error, data }) => {
35
- return {
36
- span: {
37
- command: 'end',
38
- id,
39
- status: 'error',
40
- data: {
41
- errorMessage: error.message,
42
- errorName: error.name,
43
- errorStack: error.stack,
44
- ...data,
45
- },
46
- },
47
- };
48
- },
49
- };
50
- //# sourceMappingURL=tracing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAyBF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE;QAChC,OAAO;YACL,IAAI,EAAE;gBACJ,OAAO,EAAE,OAAO;gBAChB,EAAE;gBACF,MAAM,EAAE,QAAQ;gBAChB,IAAI;aACL;SACF,CAAC;IACJ,CAAC;IAED,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;QAC5B,OAAO;YACL,IAAI,EAAE;gBACJ,OAAO,EAAE,KAAK;gBACd,EAAE;gBACF,MAAM,EAAE,MAAM,IAAI,IAAI;gBACtB,IAAI;aACL;SACF,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACvB,OAAO;YACL,IAAI,EAAE;gBACJ,OAAO,EAAE,QAAQ;gBACjB,EAAE;gBACF,IAAI;aACL;SACF,CAAC;IACJ,CAAC;IAED,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;QAC7B,OAAO;YACL,IAAI,EAAE;gBACJ,OAAO,EAAE,KAAK;gBACd,EAAE;gBACF,MAAM,EAAE,OAAO;gBACf,IAAI,EAAE;oBACJ,YAAY,EAAE,KAAK,CAAC,OAAO;oBAC3B,SAAS,EAAE,KAAK,CAAC,IAAI;oBACrB,UAAU,EAAE,KAAK,CAAC,KAAK;oBACvB,GAAG,IAAI;iBACR;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
package/src/edge.ts DELETED
@@ -1,477 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import * as Schema from 'effect/Schema';
6
-
7
- import { BaseError } from '@dxos/errors';
8
- import { invariant } from '@dxos/invariant';
9
- import { SpaceId } from '@dxos/keys';
10
-
11
- // TODO(burdon): Rename EdgerRouterEndpoint.
12
- // If we would rename it, we need to be careful to not break composer production.
13
- export enum EdgeService {
14
- AUTOMERGE_REPLICATOR = 'automerge-replicator',
15
- FEED_REPLICATOR = 'feed-replicator',
16
- SWARM = 'swarm',
17
- SIGNAL = 'signal',
18
- STATUS = 'status',
19
- }
20
-
21
- export type EdgeSuccess<T> = {
22
- success: true;
23
- data: T;
24
- };
25
-
26
- export type SerializedError = {
27
- code?: string;
28
- message?: string;
29
- context?: Record<string, unknown>;
30
- stack?: string;
31
- cause?: SerializedError;
32
- };
33
-
34
- export type EdgeErrorData = { type: string } & Record<string, any>;
35
-
36
- /**
37
- * This is the shape of the error response from the Edge service,
38
- * when the error is gracefully handled, the Response will be an object with this shape and have status code 200.
39
- */
40
- // TODO(dmaretskyi): Refactor this type to just be { success: false, error: SerializedError }
41
- // reason -> error.message
42
- // cause -> error.cause
43
- // errorData.type -> error.code
44
- // ...errorData -> error.context
45
- export type EdgeFailure = {
46
- /**
47
- * Branded Type.
48
- */
49
- success: false;
50
- /**
51
- * An explanation of why the call failed. Used mostly for logging and monitoring.
52
- */
53
- reason: string;
54
- /**
55
- * Cause Error captured on the EDGE service to aid debugging on the client.
56
- */
57
- cause?: SerializedError;
58
- /**
59
- * Information that can be used to retry the request such that it will succeed, for example:
60
- * 1. { type: 'auth_required', challenge: string }
61
- * Requires retrying the request with challenge signature included.
62
- * 2. { type: 'user_confirmation_required', dialog: { title: string, message: string, confirmation_payload: string } }
63
- * Requires showing a confirmation dialog to a user and retrying the request with confirmation_payload included
64
- * if the user confirms.
65
- * When errorData is returned simply retrying the request won't have any effect.
66
- * EdgeHttpClient should parse well-known errorData into Error types and throw.
67
- */
68
- errorData?: EdgeErrorData;
69
- };
70
-
71
- /**
72
- * Represents a body response from the Edge service.
73
- */
74
- export type EdgeBody<T> = EdgeSuccess<T> | EdgeFailure;
75
-
76
- /**
77
- * Use this to create a response from the Edge service.
78
- */
79
- export const EdgeResponse = Object.freeze({
80
- success: <T>(data: T, status: number = 200): Response => {
81
- invariant(status >= 200 && status < 300, 'Status code must be in the 2xx range');
82
- const headers = new Headers({ 'Content-Type': 'application/json' });
83
- return new Response(
84
- JSON.stringify({
85
- success: true,
86
- data,
87
- } satisfies EdgeSuccess<T>),
88
- {
89
- status,
90
- headers,
91
- },
92
- );
93
- },
94
- failure: ({
95
- reason,
96
- cause,
97
- errorData,
98
- shouldRetryAfter,
99
- status = 500,
100
- }: {
101
- /**
102
- * An explanation of why the call failed. Used mostly for logging and monitoring.
103
- */
104
- reason: string;
105
- /**
106
- * Error that caused the failure.
107
- * Useful for debugging.
108
- */
109
- cause?: Error;
110
- /**
111
- * Information that can be used to retry the request such that it will succeed, for example:
112
- * 1. { type: 'auth_required', challenge: string }
113
- * Requires retrying the request with challenge signature included.
114
- * 2. { type: 'user_confirmation_required', dialog: { title: string, message: string, confirmation_payload: string } }
115
- * Requires showing a confirmation dialog to a user and retrying the request with confirmation_payload included
116
- * if the user confirms.
117
- * When errorData is returned simply retrying the request won't have any effect.
118
- * EdgeHttpClient should parse well-known errorData into Error types and throw.
119
- */
120
- errorData?: EdgeErrorData;
121
- /**
122
- * If provided, this request will be marked as retryable and the client will wait for the specified number of milliseconds before retrying.
123
- * If not provided, the client will not retry the request.
124
- */
125
- shouldRetryAfter?: number;
126
-
127
- /**
128
- * Status code of the response.
129
- * @default 500
130
- */
131
- status?: number;
132
- }): Response => {
133
- const headers = new Headers({ 'Content-Type': 'application/json' });
134
- if (shouldRetryAfter) {
135
- headers.set('Retry-After', String(shouldRetryAfter));
136
- }
137
-
138
- return new Response(
139
- JSON.stringify({
140
- success: false,
141
- reason,
142
- errorData,
143
- cause: cause ? ErrorCodec.encode(cause) : undefined,
144
- } satisfies EdgeFailure),
145
- {
146
- status,
147
- headers,
148
- },
149
- );
150
- },
151
- });
152
-
153
- export type GetNotarizationResponseBody = {
154
- awaitingNotarization: { credentials: string[] };
155
- };
156
-
157
- export type ExecuteWorkflowResponseBody = {
158
- success: boolean;
159
- reason?: string;
160
- output?: any;
161
- };
162
-
163
- export type PostNotarizationRequestBody = {
164
- credentials: string[];
165
- };
166
-
167
- export type JoinSpaceRequest = {
168
- invitationId: string;
169
- identityKey: string;
170
- /**
171
- * Base64 encoded signed challenge.
172
- * Used to verify the IdentityKey in case of `invitation.authMethod === Invitation.AuthMethod.KNOWN_PUBLIC_KEY`
173
- */
174
- signature?: string;
175
- };
176
-
177
- export type JoinSpaceResponseBody = {
178
- spaceMemberCredential: string;
179
- spaceGenesisFeedKey: string;
180
- };
181
-
182
- export type RecoverIdentitySignature =
183
- | string
184
- // This is the format of the signature from the WebAuthn authenticator.
185
- | {
186
- signature: string;
187
- clientDataJson: string;
188
- authenticatorData: string;
189
- };
190
-
191
- export type RecoverIdentityRequest = {
192
- deviceKey: string;
193
- controlFeedKey: string;
194
- lookupKey?: string;
195
- signature?: RecoverIdentitySignature;
196
- token?: string;
197
- };
198
-
199
- export type RecoverIdentityResponseBody = {
200
- identityKey: string;
201
- haloSpaceKey: string;
202
- genesisFeedKey: string;
203
- deviceAuthCredential: string;
204
- };
205
-
206
- export type CreateAgentRequestBody = {
207
- identityKey: string;
208
- haloSpaceId: SpaceId;
209
- haloSpaceKey: string;
210
- };
211
-
212
- export type CreateAgentResponseBody = {
213
- deviceKey: string;
214
- feedKey: string;
215
- };
216
-
217
- export type GetAgentStatusResponseBody = {
218
- agent: {
219
- deviceKey?: string;
220
- status: EdgeAgentStatus;
221
- };
222
- };
223
-
224
- export type UploadFunctionRequest = {
225
- name?: string;
226
- version: string;
227
- ownerPublicKey: string;
228
- entryPoint: string;
229
- assets: Record<string, Uint8Array>;
230
- /**
231
- * Runtime in Edge that will be used to run the function.
232
- * Runtime cannot be changed once the function was deployed.
233
- * @default Runtime.WORKERS_FOR_PLATFORMS
234
- */
235
- runtime?: Runtime;
236
- };
237
-
238
- /**
239
- * Note: Do not change the values of these enums, this values are stored in the FunctionVersions database.
240
- */
241
- export enum Runtime {
242
- // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
243
- WORKERS_FOR_PLATFORMS = 'WORKERS_FOR_PLATFORMS',
244
- // https://developers.cloudflare.com/workers/runtime-apis/bindings/worker-loader/
245
- WORKER_LOADER = 'WORKER_LOADER',
246
- // Local worker dispatcher for testing.
247
- TEST = 'TEST',
248
- }
249
-
250
- export type UploadFunctionResponseBody = {
251
- functionId: string;
252
- version: string;
253
- meta: {
254
- key?: string;
255
- name?: string;
256
- description?: string;
257
- /**
258
- * JSON Schema for the input of the function.
259
- */
260
- inputSchema?: object;
261
- /**
262
- * JSON Schema for the output of the function.
263
- */
264
- outputSchema?: object;
265
- };
266
- };
267
-
268
- export type CreateSpaceRequest = {
269
- /**
270
- * HEX encoded public key of the agent.
271
- */
272
- agentKey: string;
273
- };
274
-
275
- export type CreateSpaceResponseBody = {
276
- /**
277
- * HEX encoded public key of the space.
278
- */
279
- spaceKey: string;
280
- spaceId: SpaceId;
281
- automergeRoot: string;
282
- };
283
-
284
- export enum EdgeAgentStatus {
285
- ACTIVE = 'active',
286
- INACTIVE = 'inactive',
287
- NOT_FOUND = 'not_found',
288
- }
289
-
290
- export type EdgeAuthChallenge = {
291
- type: 'auth_challenge';
292
- challenge: string;
293
- };
294
-
295
- export enum OAuthProvider {
296
- GOOGLE = 'google',
297
- BLUESKY = 'bluesky',
298
- }
299
-
300
- export const InitiateOAuthFlowRequestSchema = Schema.Struct({
301
- provider: Schema.Enums(OAuthProvider),
302
- spaceId: Schema.String.pipe(Schema.filter(SpaceId.isValid)), // TODO(burdon): Use SpaceId.
303
- accessTokenId: Schema.String,
304
- scopes: Schema.mutable(Schema.Array(Schema.String)),
305
- // Set to true if we don't want periodic token refreshes in background, for cases like account connect
306
- noRefresh: Schema.optional(Schema.Boolean),
307
- // Provider-specific (user handle or did for bluesky) hint for auth server resolution
308
- loginHint: Schema.optional(Schema.String),
309
- });
310
- export type InitiateOAuthFlowRequest = Schema.Schema.Type<typeof InitiateOAuthFlowRequestSchema>;
311
-
312
- export type InitiateOAuthFlowResponse = {
313
- authUrl: string;
314
- };
315
-
316
- export type OAuthFlowResult =
317
- | { success: true; accessToken: string; accessTokenId: string }
318
- | { success: false; reason: string };
319
-
320
- export enum EdgeWebsocketProtocol {
321
- V0 = 'edge-ws-v0',
322
- /**
323
- * Enables message framing and muxing by service-id.
324
- */
325
- V1 = 'edge-ws-v1',
326
- }
327
-
328
- // TODO(mykola): Reconcile with type in EDGE repo.
329
- export type EdgeStatus = {
330
- problems: string[];
331
- agent: {
332
- agentStatus?: string;
333
- agentKey?: string;
334
- haloSpaceId?: SpaceId;
335
- fetchError?: string;
336
- };
337
- router: {
338
- connectedDevices?: {
339
- peerKey: string;
340
- topics: string[];
341
- }[];
342
- metrics?: {
343
- sentMessages: number;
344
- receivedMessages: number;
345
- sentBytes: number;
346
- receivedBytes: number;
347
- failedMessages: number;
348
- failedBytes: number;
349
- };
350
- fetchError?: string;
351
- };
352
- spaces: {
353
- data: Record<SpaceId, { diagnostics?: any & { redFlags: string[] }; fetchError?: string }>;
354
- fetchError?: string;
355
- };
356
- };
357
-
358
- //
359
- // Space import/export.
360
- //
361
-
362
- export type ImportBundleRequest = {
363
- bundle: {
364
- /**
365
- * DocumentId.
366
- */
367
- documentId: string;
368
- /**
369
- * Encoded mutation.
370
- */
371
- mutation: string;
372
- /**
373
- * Heads of the document.
374
- */
375
- heads: string[];
376
- }[];
377
- };
378
-
379
- export type ExportBundleRequest = {
380
- /**
381
- * DocumentId -> Heads (decoded heads since which we want to export).
382
- */
383
- docHeads: Record<string, string[]>;
384
- };
385
-
386
- export type ExportBundleResponse = {
387
- bundle: {
388
- /**
389
- * DocumentId.
390
- */
391
- documentId: string;
392
- /**
393
- * Encoded mutation.
394
- */
395
- mutation: string;
396
- }[];
397
- };
398
-
399
- export const DocumentCodec = Object.freeze({
400
- encode: (doc: Uint8Array) => Buffer.from(doc).toString('base64'),
401
- decode: (doc: string) => new Uint8Array(Buffer.from(doc, 'base64')),
402
- });
403
-
404
- const MAX_ERROR_DEPTH = 3;
405
-
406
- /**
407
- * Codec for serializing and deserializing Edge Errors.
408
- */
409
- export const ErrorCodec = Object.freeze({
410
- encode: (err: Error, depth: number = 0): SerializedError => ({
411
- code: 'code' in err ? (err as any).code : undefined,
412
- message: err.message,
413
- stack: err.stack,
414
- cause: err.cause instanceof Error && depth < MAX_ERROR_DEPTH ? ErrorCodec.encode(err.cause, depth + 1) : undefined,
415
- }),
416
- decode: (serializedError: SerializedError, depth: number = 0): Error => {
417
- let err: Error;
418
- if (typeof serializedError.code === 'string') {
419
- err = new BaseError(serializedError.code, {
420
- message: serializedError.message ?? 'Unknown error',
421
- cause:
422
- serializedError.cause && depth < MAX_ERROR_DEPTH
423
- ? ErrorCodec.decode(serializedError.cause, depth + 1)
424
- : undefined,
425
- context: serializedError.context,
426
- });
427
-
428
- if (serializedError.stack) {
429
- Object.defineProperty(err, 'stack', {
430
- value: serializedError.stack,
431
- });
432
- }
433
- } else {
434
- err = new Error(serializedError.message ?? 'Unknown error', {
435
- cause:
436
- serializedError.cause && depth < MAX_ERROR_DEPTH
437
- ? ErrorCodec.decode(serializedError.cause, depth + 1)
438
- : undefined,
439
- });
440
-
441
- if (serializedError.stack) {
442
- Object.defineProperty(err, 'stack', {
443
- value: serializedError.stack,
444
- });
445
- }
446
- }
447
-
448
- return err;
449
- },
450
- });
451
-
452
- /**
453
- * Codec for serializing and deserializing Edge unhandled HTTP errors.
454
- */
455
- export const EdgeHttpErrorCodec = Object.freeze({
456
- encode: (err: Error): Response =>
457
- new Response(
458
- JSON.stringify({
459
- error: ErrorCodec.encode(err),
460
- }),
461
- { status: 500 },
462
- ),
463
-
464
- decode: async (response: Response): Promise<Error | undefined> => {
465
- if (response.headers.get('Content-Type') !== 'application/json') {
466
- const body = await response.clone().text();
467
- return new Error(body.slice(0, 256));
468
- }
469
-
470
- const body = await response.clone().json();
471
- if (!('error' in body)) {
472
- return undefined;
473
- }
474
-
475
- return ErrorCodec.decode(body.error);
476
- },
477
- });
package/src/query.ts DELETED
@@ -1,8 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- /**
6
- * Channel name that will be used to query spaces from agent.
7
- */
8
- export const QUERY_CHANNEL = 'dxos.org/agent/plugin/query';
package/src/queue.ts DELETED
@@ -1,51 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import type { SpaceId } from '@dxos/keys';
6
-
7
- import type { ObjectId } from './types.js';
8
-
9
- export type QueueCursor = string & { __QueueCursor: never };
10
-
11
- export type QueueQuery = {
12
- queueId: ObjectId;
13
-
14
- after?: QueueCursor;
15
- before?: QueueCursor;
16
- limit?: number;
17
- reverse?: boolean;
18
- objectIds?: ObjectId[];
19
- };
20
-
21
- // TODO(dmaretskyi): Rename QueueQueryResult.
22
- export type QueryResult = {
23
- // TODO(dmaretskyi): HasId & HasTypename.
24
-
25
- objects: unknown[];
26
-
27
- /**
28
- * Cursor at the end of the range.
29
- */
30
- nextCursor: QueueCursor | null;
31
- /**
32
- * Cursor at the start of the range.
33
- */
34
- prevCursor: QueueCursor | null;
35
- };
36
-
37
- /**
38
- * Position of an object in the queue that it is in.
39
- */
40
- export const KEY_QUEUE_POSITION = 'dxos.org/key/queue-position';
41
-
42
- /**
43
- * Service for managing queues.
44
- */
45
- export interface QueueService {
46
- queryQueue(subspaceTag: string, spaceId: SpaceId, query: QueueQuery): Promise<QueryResult>;
47
-
48
- insertIntoQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objects: unknown[]): Promise<void>;
49
-
50
- deleteFromQueue(subspaceTag: string, spaceId: SpaceId, queueId: ObjectId, objectIds: ObjectId[]): Promise<void>;
51
- }