@dxos/protocols 0.8.4-main.fffef41 → 0.8.4-staging.ac66bdf99f

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 (286) hide show
  1. package/README.md +1 -1
  2. package/dist/src/FeedProtocol.d.ts +528 -0
  3. package/dist/src/FeedProtocol.d.ts.map +1 -0
  4. package/dist/src/FeedProtocol.js +237 -0
  5. package/dist/src/FeedProtocol.js.map +1 -0
  6. package/dist/src/FunctionProtocol.d.ts +8 -2
  7. package/dist/src/FunctionProtocol.d.ts.map +1 -1
  8. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +237 -0
  9. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
  10. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +44 -0
  11. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
  12. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +64 -3
  13. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  14. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +68 -37
  15. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  16. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +106 -0
  17. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  18. package/dist/src/buf/proto/gen/dxos/config_pb.js +72 -1
  19. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  20. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +6 -0
  21. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
  22. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
  23. package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
  24. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
  25. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  26. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  27. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  28. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +55 -9
  29. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  30. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
  31. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  32. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +28 -0
  33. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts.map +1 -1
  34. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +10 -5
  35. package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
  36. package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
  37. package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
  38. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +39 -0
  39. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts.map +1 -1
  40. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +27 -2
  41. package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
  42. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -10
  43. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
  44. package/dist/src/buf/proto/gen/dxos/iframe_pb.js +1 -1
  45. package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
  46. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +24 -0
  47. package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts.map +1 -1
  48. package/dist/src/buf/proto/gen/dxos/rpc_pb.js +12 -7
  49. package/dist/src/buf/proto/gen/dxos/rpc_pb.js.map +1 -1
  50. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -139
  51. package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts.map +1 -1
  52. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +11 -45
  53. package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
  54. package/dist/src/codec.test.js +1 -1
  55. package/dist/src/edge/EdgeFunctionEnv.d.ts +108 -0
  56. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
  57. package/dist/src/edge/EdgeFunctionEnv.js +4 -0
  58. package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
  59. package/dist/src/{edge.d.ts → edge/edge.d.ts} +204 -26
  60. package/dist/src/edge/edge.d.ts.map +1 -0
  61. package/dist/src/{edge.js → edge/edge.js} +32 -14
  62. package/dist/src/edge/edge.js.map +1 -0
  63. package/dist/src/{edge-error.d.ts → edge/errors.d.ts} +6 -7
  64. package/dist/src/edge/errors.d.ts.map +1 -0
  65. package/dist/src/{edge-error.js → edge/errors.js} +14 -15
  66. package/dist/src/edge/errors.js.map +1 -0
  67. package/dist/src/edge/index.d.ts +5 -0
  68. package/dist/src/edge/index.d.ts.map +1 -0
  69. package/dist/src/edge/index.js +8 -0
  70. package/dist/src/edge/index.js.map +1 -0
  71. package/dist/src/edge/registry.d.ts +127 -0
  72. package/dist/src/edge/registry.d.ts.map +1 -0
  73. package/dist/src/edge/registry.js +79 -0
  74. package/dist/src/edge/registry.js.map +1 -0
  75. package/dist/src/errors/base-errors.d.ts +86 -8
  76. package/dist/src/errors/base-errors.d.ts.map +1 -1
  77. package/dist/src/errors/base-errors.js +4 -20
  78. package/dist/src/errors/base-errors.js.map +1 -1
  79. package/dist/src/errors/encoding.d.ts +2 -2
  80. package/dist/src/errors/encoding.d.ts.map +1 -1
  81. package/dist/src/errors/encoding.js +1 -1
  82. package/dist/src/errors/encoding.js.map +1 -1
  83. package/dist/src/errors/errors.d.ts +619 -42
  84. package/dist/src/errors/errors.d.ts.map +1 -1
  85. package/dist/src/errors/errors.js +50 -104
  86. package/dist/src/errors/errors.js.map +1 -1
  87. package/dist/src/errors/errors.test.js +2 -2
  88. package/dist/src/errors/errors.test.js.map +1 -1
  89. package/dist/src/errors/helpers.d.ts +9 -5
  90. package/dist/src/errors/helpers.d.ts.map +1 -1
  91. package/dist/src/errors/helpers.js +3 -3
  92. package/dist/src/errors/helpers.js.map +1 -1
  93. package/dist/src/errors/index.d.ts +5 -5
  94. package/dist/src/errors/index.js +5 -5
  95. package/dist/src/feed-replication.d.ts.map +1 -1
  96. package/dist/src/index.d.ts +12 -13
  97. package/dist/src/index.d.ts.map +1 -1
  98. package/dist/src/index.js +11 -12
  99. package/dist/src/index.js.map +1 -1
  100. package/dist/src/indexing.test.js +1 -1
  101. package/dist/src/messenger.d.ts +16 -0
  102. package/dist/src/messenger.d.ts.map +1 -0
  103. package/dist/src/messenger.js +4 -0
  104. package/dist/src/messenger.js.map +1 -0
  105. package/dist/src/proto/gen/dxos/client/services.d.ts +1009 -845
  106. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  107. package/dist/src/proto/gen/dxos/client/services.js +107 -94
  108. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  109. package/dist/src/proto/gen/dxos/config.d.ts +59 -0
  110. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  111. package/dist/src/proto/gen/dxos/config.js +26 -0
  112. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  113. package/dist/src/proto/gen/dxos/devtools/host.d.ts +31 -31
  114. package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  115. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +4 -0
  116. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
  117. package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -1
  118. package/dist/src/proto/gen/dxos/echo/query.d.ts +17 -1
  119. package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  120. package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
  121. package/dist/src/proto/gen/dxos/echo/service.d.ts +34 -8
  122. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  123. package/dist/src/proto/gen/dxos/edge/messenger.d.ts +24 -0
  124. package/dist/src/proto/gen/dxos/edge/messenger.d.ts.map +1 -1
  125. package/dist/src/proto/gen/dxos/edge/messenger.js.map +1 -1
  126. package/dist/src/proto/gen/dxos/halo/credentials.d.ts +15 -1
  127. package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
  128. package/dist/src/proto/gen/dxos/halo/credentials.js +9 -0
  129. package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -1
  130. package/dist/src/proto/gen/dxos/iframe.d.ts +0 -10
  131. package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -1
  132. package/dist/src/proto/gen/dxos/iframe.js.map +1 -1
  133. package/dist/src/proto/gen/dxos/rpc.d.ts +19 -0
  134. package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -1
  135. package/dist/src/proto/gen/dxos/rpc.js.map +1 -1
  136. package/dist/src/proto/gen/dxos/tracing.d.ts +0 -79
  137. package/dist/src/proto/gen/dxos/tracing.d.ts.map +1 -1
  138. package/dist/src/proto/gen/google/protobuf.d.ts +326 -40
  139. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  140. package/dist/src/proto/gen/google/protobuf.js +127 -1
  141. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  142. package/dist/src/proto/gen/index.d.ts +40 -7
  143. package/dist/src/proto/gen/index.d.ts.map +1 -1
  144. package/dist/src/proto/gen/index.js +1 -1
  145. package/dist/src/proto/gen/index.js.map +1 -1
  146. package/dist/src/proto/index.d.ts +2 -2
  147. package/dist/src/proto/index.js +1 -1
  148. package/dist/src/proto/types.d.ts +1 -1
  149. package/dist/src/space-archive.d.ts +60 -1
  150. package/dist/src/space-archive.d.ts.map +1 -1
  151. package/dist/src/space-archive.js +13 -1
  152. package/dist/src/space-archive.js.map +1 -1
  153. package/dist/src/types.d.ts +2 -2
  154. package/dist/tsconfig.tsbuildinfo +1 -1
  155. package/package.json +19 -15
  156. package/src/FeedProtocol.ts +320 -0
  157. package/src/FunctionProtocol.ts +8 -6
  158. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
  159. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
  160. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
  161. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
  162. package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
  163. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
  164. package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
  165. package/src/buf/proto/gen/dxos/client/queue_pb.ts +286 -0
  166. package/src/buf/proto/gen/dxos/client/services_pb.ts +114 -40
  167. package/src/buf/proto/gen/dxos/config_pb.ts +125 -2
  168. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
  169. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
  170. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
  171. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
  172. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
  173. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
  174. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
  175. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +9 -2
  176. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
  177. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
  178. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
  179. package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
  180. package/src/buf/proto/gen/dxos/echo/query_pb.ts +16 -4
  181. package/src/buf/proto/gen/dxos/echo/service_pb.ts +68 -16
  182. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
  183. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
  184. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
  185. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +39 -6
  186. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
  187. package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
  188. package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
  189. package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
  190. package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
  191. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
  192. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
  193. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
  194. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +49 -3
  195. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
  196. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
  197. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
  198. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
  199. package/src/buf/proto/gen/dxos/iframe_pb.ts +3 -14
  200. package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
  201. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
  202. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
  203. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
  204. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
  205. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
  206. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
  207. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
  208. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
  209. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
  210. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
  211. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
  212. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
  213. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
  214. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
  215. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
  216. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
  217. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
  218. package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
  219. package/src/buf/proto/gen/dxos/rpc_pb.ts +37 -8
  220. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
  221. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
  222. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
  223. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
  224. package/src/buf/proto/gen/dxos/tracing_pb.ts +12 -179
  225. package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
  226. package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
  227. package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
  228. package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
  229. package/src/codec.test.ts +1 -1
  230. package/src/edge/EdgeFunctionEnv.ts +191 -0
  231. package/src/{edge.ts → edge/edge.ts} +166 -39
  232. package/src/{edge-error.ts → edge/errors.ts} +15 -16
  233. package/src/edge/index.ts +8 -0
  234. package/src/edge/registry.ts +96 -0
  235. package/src/errors/base-errors.ts +4 -22
  236. package/src/errors/encoding.ts +2 -3
  237. package/src/errors/errors.test.ts +2 -2
  238. package/src/errors/errors.ts +57 -124
  239. package/src/errors/helpers.ts +6 -7
  240. package/src/errors/index.ts +5 -5
  241. package/src/feed-replication.ts +1 -0
  242. package/src/index.ts +12 -13
  243. package/src/indexing.test.ts +1 -1
  244. package/src/messenger.ts +22 -0
  245. package/src/proto/dxos/client/queue.proto +81 -0
  246. package/src/proto/dxos/client/services.proto +19 -1
  247. package/src/proto/dxos/config.proto +48 -1
  248. package/src/proto/dxos/echo/metadata.proto +3 -0
  249. package/src/proto/dxos/echo/query.proto +4 -1
  250. package/src/proto/dxos/echo/service.proto +27 -6
  251. package/src/proto/dxos/edge/messenger.proto +10 -0
  252. package/src/proto/dxos/halo/credentials.proto +15 -0
  253. package/src/proto/dxos/iframe.proto +1 -3
  254. package/src/proto/dxos/rpc.proto +7 -0
  255. package/src/proto/dxos/tracing.proto +0 -40
  256. package/src/proto/gen/dxos/client/services.ts +1009 -845
  257. package/src/proto/gen/dxos/config.ts +59 -0
  258. package/src/proto/gen/dxos/devtools/host.ts +31 -31
  259. package/src/proto/gen/dxos/echo/metadata.ts +4 -0
  260. package/src/proto/gen/dxos/echo/query.ts +17 -1
  261. package/src/proto/gen/dxos/echo/service.ts +33 -8
  262. package/src/proto/gen/dxos/edge/messenger.ts +24 -0
  263. package/src/proto/gen/dxos/halo/credentials.ts +15 -1
  264. package/src/proto/gen/dxos/iframe.ts +0 -10
  265. package/src/proto/gen/dxos/rpc.ts +19 -0
  266. package/src/proto/gen/dxos/tracing.ts +0 -76
  267. package/src/proto/gen/google/protobuf.ts +326 -40
  268. package/src/proto/gen/index.ts +41 -8
  269. package/src/proto/index.ts +2 -2
  270. package/src/proto/types.ts +1 -1
  271. package/src/space-archive.ts +70 -1
  272. package/src/types.ts +2 -2
  273. package/dist/src/edge-error.d.ts.map +0 -1
  274. package/dist/src/edge-error.js.map +0 -1
  275. package/dist/src/edge.d.ts.map +0 -1
  276. package/dist/src/edge.js.map +0 -1
  277. package/dist/src/query.d.ts +0 -5
  278. package/dist/src/query.d.ts.map +0 -1
  279. package/dist/src/query.js +0 -8
  280. package/dist/src/query.js.map +0 -1
  281. package/dist/src/queue.d.ts +0 -37
  282. package/dist/src/queue.d.ts.map +0 -1
  283. package/dist/src/queue.js +0 -8
  284. package/dist/src/queue.js.map +0 -1
  285. package/src/query.ts +0 -8
  286. package/src/queue.ts +0 -51
@@ -2,5 +2,5 @@
2
2
  // Copyright 2020 DXOS.org
3
3
  //
4
4
 
5
- export { schema, schemaJson, type TYPES } from './gen/index.js';
6
- export type * from './types.js';
5
+ export { schema, schemaJson, type TYPES } from './gen/index.ts';
6
+ export type * from './types.ts';
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { type TypedProtoMessage } from '@dxos/codec-protobuf';
6
6
 
7
- import { type TYPES } from './gen/index.js';
7
+ import { type TYPES } from './gen/index.ts';
8
8
 
9
9
  // TODO(burdon): Rename ProtocolMessage.
10
10
  export type TypedMessage = TypedProtoMessage<TYPES>;
@@ -11,8 +11,13 @@ import type { IdentityDid, SpaceId } from '@dxos/keys';
11
11
  *
12
12
  * A tar archive with files:
13
13
  * - metadata.json -- JSON-encoded {@link SpaceArchiveMetadata} file.
14
- * - documents
14
+ * - documents/
15
15
  * - <document-id>.bin -- Automerge document.
16
+ * - feeds/
17
+ * - <feed-id>/
18
+ * - metadata.json -- JSON-encoded {@link FeedArchiveMetadata} file.
19
+ * - blocks-0.json -- JSON array of {@link FeedArchiveBlock} (chunks of 100).
20
+ * - blocks-1.json -- ...
16
21
  */
17
22
 
18
23
  /**
@@ -60,7 +65,71 @@ export interface SpaceArchiveMetadata {
60
65
  };
61
66
  }
62
67
 
68
+ /**
69
+ * Feed metadata stored in `feeds/<feed-id>/metadata.json`.
70
+ */
71
+ export interface FeedArchiveMetadata {
72
+ /**
73
+ * Feed identifier.
74
+ */
75
+ id: string;
76
+
77
+ /**
78
+ * Feed namespace (e.g., 'data', 'trace').
79
+ */
80
+ namespace: string;
81
+ }
82
+
83
+ /**
84
+ * Feed block stored in `feeds/<feed-id>/blocks-N.json`.
85
+ * Represents a single block from the feed.
86
+ */
87
+ export interface FeedArchiveBlock {
88
+ /**
89
+ * Actor that produced this block.
90
+ */
91
+ actorId: string;
92
+
93
+ /**
94
+ * Per-feed monotonic sequence assigned by the actor.
95
+ */
96
+ sequence: number;
97
+
98
+ /**
99
+ * Actor of the immediate predecessor block, if any.
100
+ */
101
+ prevActorId: string | null;
102
+
103
+ /**
104
+ * Sequence of the immediate predecessor block, if any.
105
+ */
106
+ prevSequence: number | null;
107
+
108
+ /**
109
+ * Globally ordered position assigned by a position authority.
110
+ */
111
+ position: number | null;
112
+
113
+ /**
114
+ * Milliseconds since Unix epoch when the block was created.
115
+ */
116
+ timestamp: number;
117
+
118
+ /**
119
+ * Base64-encoded serialized application payload.
120
+ */
121
+ data: string;
122
+ }
123
+
124
+ /**
125
+ * Number of blocks per chunk file.
126
+ */
127
+ export const FEED_ARCHIVE_BLOCKS_PER_CHUNK = 100;
128
+
63
129
  export const SpaceArchiveFileStructure = {
64
130
  metadata: 'metadata.json',
65
131
  documents: 'documents',
132
+ feeds: 'feeds',
133
+ feedMetadata: 'metadata.json',
134
+ feedBlocksPrefix: 'blocks-',
66
135
  } as const;
package/src/types.ts CHANGED
@@ -5,8 +5,8 @@
5
5
  import { type PublicKey } from '@dxos/keys';
6
6
  import { type Timeframe } from '@dxos/timeframe';
7
7
 
8
- import { type CredentialsMessage, type FeedMessage } from './proto/gen/dxos/echo/feed.js';
9
- import { type EchoObjectBatch } from './proto/gen/dxos/echo/object.js';
8
+ import { type CredentialsMessage, type FeedMessage } from './proto/gen/dxos/echo/feed.ts';
9
+ import { type EchoObjectBatch } from './proto/gen/dxos/echo/object.ts';
10
10
 
11
11
  // TODO(burdon): Replace with proto definition.
12
12
  export type FeedMeta = {
@@ -1 +0,0 @@
1
- {"version":3,"file":"edge-error.d.ts","sourceRoot":"","sources":["../../src/edge-error.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAkC,MAAM,WAAW,CAAC;AAGjG;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;WAC9B,wBAAwB,CAAC,Q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AAE,QAAkB,EAA8B,EAAE;QAC/D,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,kBAAkB,EAAE,CAAC;YAChE,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;YAC3C,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACvC,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC;YACvB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACF,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Channel name that will be used to query spaces from agent.
3
- */
4
- export declare const QUERY_CHANNEL = "dxos.org/agent/plugin/query";
5
- //# sourceMappingURL=query.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/query.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,aAAa,gCAAgC,CAAC"}
package/dist/src/query.js DELETED
@@ -1,8 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
- /**
5
- * Channel name that will be used to query spaces from agent.
6
- */
7
- export const QUERY_CHANNEL = 'dxos.org/agent/plugin/query';
8
- //# sourceMappingURL=query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/query.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,6BAA6B,CAAC"}
@@ -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"}
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
- }