@dxos/protocols 0.8.4-main.e8ec1fe → 0.8.4-main.ef1bc66f44

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 (217) hide show
  1. package/dist/src/FeedProtocol.d.ts +528 -0
  2. package/dist/src/FeedProtocol.d.ts.map +1 -0
  3. package/dist/src/FeedProtocol.js +237 -0
  4. package/dist/src/FeedProtocol.js.map +1 -0
  5. package/dist/src/FunctionProtocol.d.ts +8 -2
  6. package/dist/src/FunctionProtocol.d.ts.map +1 -1
  7. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +189 -0
  8. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
  9. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +39 -0
  10. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
  11. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +5 -1
  12. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  13. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +5 -1
  14. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  15. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +4 -0
  16. package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
  17. package/dist/src/buf/proto/gen/dxos/config_pb.js +1 -1
  18. package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
  19. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
  20. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  21. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  22. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  23. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +55 -9
  24. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  25. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
  26. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  27. package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
  28. package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
  29. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -0
  30. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
  31. package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
  32. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +1 -1
  33. package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
  34. package/dist/src/codec.test.js +1 -1
  35. package/dist/src/edge/EdgeFunctionEnv.d.ts +120 -0
  36. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
  37. package/dist/src/edge/EdgeFunctionEnv.js +4 -0
  38. package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
  39. package/dist/src/{edge.d.ts → edge/edge.d.ts} +46 -26
  40. package/dist/src/edge/edge.d.ts.map +1 -0
  41. package/dist/src/{edge.js → edge/edge.js} +28 -14
  42. package/dist/src/edge/edge.js.map +1 -0
  43. package/dist/src/{edge-error.d.ts → edge/errors.d.ts} +6 -7
  44. package/dist/src/edge/errors.d.ts.map +1 -0
  45. package/dist/src/{edge-error.js → edge/errors.js} +14 -15
  46. package/dist/src/edge/errors.js.map +1 -0
  47. package/dist/src/edge/index.d.ts +4 -0
  48. package/dist/src/edge/index.d.ts.map +1 -0
  49. package/dist/src/edge/index.js +7 -0
  50. package/dist/src/edge/index.js.map +1 -0
  51. package/dist/src/errors/base-errors.d.ts +86 -8
  52. package/dist/src/errors/base-errors.d.ts.map +1 -1
  53. package/dist/src/errors/base-errors.js +4 -20
  54. package/dist/src/errors/base-errors.js.map +1 -1
  55. package/dist/src/errors/encoding.d.ts +2 -2
  56. package/dist/src/errors/encoding.d.ts.map +1 -1
  57. package/dist/src/errors/encoding.js +1 -1
  58. package/dist/src/errors/errors.d.ts +619 -42
  59. package/dist/src/errors/errors.d.ts.map +1 -1
  60. package/dist/src/errors/errors.js +50 -104
  61. package/dist/src/errors/errors.js.map +1 -1
  62. package/dist/src/errors/errors.test.js +2 -2
  63. package/dist/src/errors/errors.test.js.map +1 -1
  64. package/dist/src/errors/helpers.d.ts +9 -5
  65. package/dist/src/errors/helpers.d.ts.map +1 -1
  66. package/dist/src/errors/helpers.js +3 -3
  67. package/dist/src/errors/helpers.js.map +1 -1
  68. package/dist/src/errors/index.d.ts +5 -5
  69. package/dist/src/errors/index.js +5 -5
  70. package/dist/src/feed-replication.d.ts.map +1 -1
  71. package/dist/src/index.d.ts +12 -13
  72. package/dist/src/index.d.ts.map +1 -1
  73. package/dist/src/index.js +11 -12
  74. package/dist/src/index.js.map +1 -1
  75. package/dist/src/indexing.test.js +1 -1
  76. package/dist/src/messenger.d.ts +16 -0
  77. package/dist/src/messenger.d.ts.map +1 -0
  78. package/dist/src/messenger.js +4 -0
  79. package/dist/src/messenger.js.map +1 -0
  80. package/dist/src/proto/gen/dxos/client/services.d.ts +105 -1
  81. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  82. package/dist/src/proto/gen/dxos/client/services.js +1 -0
  83. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  84. package/dist/src/proto/gen/dxos/config.d.ts +5 -0
  85. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  86. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  87. package/dist/src/proto/gen/dxos/echo/query.d.ts +17 -1
  88. package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  89. package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
  90. package/dist/src/proto/gen/dxos/echo/service.d.ts +34 -8
  91. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  92. package/dist/src/proto/gen/index.d.ts +8 -0
  93. package/dist/src/proto/gen/index.d.ts.map +1 -1
  94. package/dist/src/proto/gen/index.js +1 -1
  95. package/dist/src/proto/gen/index.js.map +1 -1
  96. package/dist/src/proto/index.d.ts +2 -2
  97. package/dist/src/proto/index.js +1 -1
  98. package/dist/src/proto/types.d.ts +1 -1
  99. package/dist/src/types.d.ts +2 -2
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +19 -15
  102. package/src/FeedProtocol.ts +319 -0
  103. package/src/FunctionProtocol.ts +8 -4
  104. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
  105. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
  106. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
  107. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
  108. package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
  109. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
  110. package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
  111. package/src/buf/proto/gen/dxos/client/queue_pb.ts +231 -0
  112. package/src/buf/proto/gen/dxos/client/services_pb.ts +7 -2
  113. package/src/buf/proto/gen/dxos/config_pb.ts +7 -2
  114. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
  115. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
  116. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
  117. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
  118. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
  119. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
  120. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
  121. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +1 -1
  122. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
  123. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
  124. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
  125. package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
  126. package/src/buf/proto/gen/dxos/echo/query_pb.ts +16 -4
  127. package/src/buf/proto/gen/dxos/echo/service_pb.ts +68 -16
  128. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
  129. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
  130. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
  131. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +1 -1
  132. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
  133. package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
  134. package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
  135. package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
  136. package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
  137. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
  138. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
  139. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
  140. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +1 -1
  141. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
  142. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
  143. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
  144. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
  145. package/src/buf/proto/gen/dxos/iframe_pb.ts +2 -1
  146. package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
  147. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
  148. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
  149. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
  150. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
  151. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
  152. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
  153. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
  154. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
  155. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
  156. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
  157. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
  158. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
  159. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
  160. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
  161. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
  162. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
  163. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
  164. package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
  165. package/src/buf/proto/gen/dxos/rpc_pb.ts +1 -1
  166. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
  167. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
  168. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
  169. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
  170. package/src/buf/proto/gen/dxos/tracing_pb.ts +1 -1
  171. package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
  172. package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
  173. package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
  174. package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
  175. package/src/codec.test.ts +1 -1
  176. package/src/edge/EdgeFunctionEnv.ts +193 -0
  177. package/src/{edge.ts → edge/edge.ts} +55 -39
  178. package/src/{edge-error.ts → edge/errors.ts} +15 -16
  179. package/src/edge/index.ts +7 -0
  180. package/src/errors/base-errors.ts +4 -22
  181. package/src/errors/encoding.ts +2 -2
  182. package/src/errors/errors.test.ts +2 -2
  183. package/src/errors/errors.ts +57 -123
  184. package/src/errors/helpers.ts +6 -7
  185. package/src/errors/index.ts +5 -5
  186. package/src/feed-replication.ts +1 -0
  187. package/src/index.ts +12 -13
  188. package/src/indexing.test.ts +1 -1
  189. package/src/messenger.ts +22 -0
  190. package/src/proto/dxos/client/queue.proto +67 -0
  191. package/src/proto/dxos/client/services.proto +1 -0
  192. package/src/proto/dxos/config.proto +2 -0
  193. package/src/proto/dxos/echo/query.proto +4 -1
  194. package/src/proto/dxos/echo/service.proto +27 -6
  195. package/src/proto/dxos/iframe.proto +1 -0
  196. package/src/proto/gen/dxos/client/services.ts +105 -1
  197. package/src/proto/gen/dxos/config.ts +5 -0
  198. package/src/proto/gen/dxos/echo/query.ts +17 -1
  199. package/src/proto/gen/dxos/echo/service.ts +33 -8
  200. package/src/proto/gen/index.ts +9 -1
  201. package/src/proto/index.ts +2 -2
  202. package/src/proto/types.ts +1 -1
  203. package/src/types.ts +2 -2
  204. package/dist/src/edge-error.d.ts.map +0 -1
  205. package/dist/src/edge-error.js.map +0 -1
  206. package/dist/src/edge.d.ts.map +0 -1
  207. package/dist/src/edge.js.map +0 -1
  208. package/dist/src/query.d.ts +0 -5
  209. package/dist/src/query.d.ts.map +0 -1
  210. package/dist/src/query.js +0 -8
  211. package/dist/src/query.js.map +0 -1
  212. package/dist/src/queue.d.ts +0 -37
  213. package/dist/src/queue.d.ts.map +0 -1
  214. package/dist/src/queue.js +0 -8
  215. package/dist/src/queue.js.map +0 -1
  216. package/src/query.ts +0 -8
  217. package/src/queue.ts +0 -51
@@ -435,6 +435,109 @@ export interface LoggingService {
435
435
  queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
436
436
  queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
437
437
  }
438
+ /**
439
+ * Defined in:
440
+ * {@link file://./../../../dxos/client/queue.proto}
441
+ */
442
+ export interface QueueQuery {
443
+ spaceId: string;
444
+ /**
445
+ * Options:
446
+ * - proto3_optional = true
447
+ */
448
+ queuesNamespace?: string;
449
+ /**
450
+ * Queries the whole space if missing.
451
+ */
452
+ queueIds?: string[];
453
+ /**
454
+ * Filter items after this cursor. Exclusive.
455
+ *
456
+ * Options:
457
+ * - proto3_optional = true
458
+ */
459
+ after?: string;
460
+ /**
461
+ * Filter items before this cursor. Exclusive.
462
+ *
463
+ * Options:
464
+ * - proto3_optional = true
465
+ */
466
+ before?: string;
467
+ /**
468
+ * Filter items after this position. Inclusive.
469
+ *
470
+ * Options:
471
+ * - proto3_optional = true
472
+ */
473
+ beginPosition?: string;
474
+ /**
475
+ * Filter items before this position. Exclusive.
476
+ *
477
+ * Options:
478
+ * - proto3_optional = true
479
+ */
480
+ endPosition?: string;
481
+ /**
482
+ * Options:
483
+ * - proto3_optional = true
484
+ */
485
+ limit?: number;
486
+ /**
487
+ * Options:
488
+ * - proto3_optional = true
489
+ */
490
+ reverse?: boolean;
491
+ objectIds?: string[];
492
+ }
493
+ /**
494
+ * Defined in:
495
+ * {@link file://./../../../dxos/client/queue.proto}
496
+ */
497
+ export interface QueueQueryResult {
498
+ objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
499
+ /**
500
+ * Cursor to query the next items. Can be passed to `after` in query to keep querying.
501
+ */
502
+ nextCursor: string;
503
+ prevCursor: string;
504
+ }
505
+ /**
506
+ * Defined in:
507
+ * {@link file://./../../../dxos/client/queue.proto}
508
+ */
509
+ export interface QueryQueueRequest {
510
+ query: QueueQuery;
511
+ }
512
+ /**
513
+ * Defined in:
514
+ * {@link file://./../../../dxos/client/queue.proto}
515
+ */
516
+ export interface InsertIntoQueueRequest {
517
+ subspaceTag: string;
518
+ spaceId: string;
519
+ queueId: string;
520
+ objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
521
+ }
522
+ /**
523
+ * Defined in:
524
+ * {@link file://./../../../dxos/client/queue.proto}
525
+ */
526
+ export interface DeleteFromQueueRequest {
527
+ subspaceTag: string;
528
+ spaceId: string;
529
+ queueId: string;
530
+ objectIds?: string[];
531
+ }
532
+ /**
533
+ * Defined in:
534
+ * {@link file://./../../../dxos/client/queue.proto}
535
+ */
536
+ export interface QueueService {
537
+ queryQueue: (request: QueryQueueRequest, options?: RequestOptions) => Promise<QueueQueryResult>;
538
+ insertIntoQueue: (request: InsertIntoQueueRequest, options?: RequestOptions) => Promise<void>;
539
+ deleteFromQueue: (request: DeleteFromQueueRequest, options?: RequestOptions) => Promise<void>;
540
+ }
438
541
  /**
439
542
  * Defined in:
440
543
  * {@link file://./../../../dxos/client/services.proto}
@@ -555,7 +658,8 @@ export namespace Platform {
555
658
  export enum PLATFORM_TYPE {
556
659
  BROWSER = 0,
557
660
  SHARED_WORKER = 1,
558
- NODE = 2
661
+ NODE = 2,
662
+ DEDICATED_WORKER = 3
559
663
  }
560
664
  }
561
665
  /**
@@ -332,6 +332,11 @@ export namespace Runtime {
332
332
  * - proto3_optional = true
333
333
  */
334
334
  edgeFeatures?: Runtime.Client.EdgeFeatures;
335
+ /**
336
+ * Options:
337
+ * - proto3_optional = true
338
+ */
339
+ enableLocalQueues?: boolean;
335
340
  }
336
341
  export namespace Client {
337
342
  /**
@@ -106,9 +106,25 @@ export interface Heads {
106
106
  export interface QueryResult {
107
107
  id: string;
108
108
  spaceId: string;
109
- documentId: string;
109
+ /**
110
+ * Options:
111
+ * - proto3_optional = true
112
+ */
113
+ documentId?: string;
114
+ /**
115
+ * Options:
116
+ * - proto3_optional = true
117
+ */
118
+ queueId?: string;
119
+ /**
120
+ * Options:
121
+ * - proto3_optional = true
122
+ */
123
+ queueNamespace?: string;
110
124
  rank: number;
111
125
  /**
126
+ * In the ECHO Json object format.
127
+ *
112
128
  * Options:
113
129
  * - proto3_optional = true
114
130
  */
@@ -133,14 +133,6 @@ export interface DocumentUpdate {
133
133
  * Value returned by `Automerge.saveSince()`.
134
134
  */
135
135
  mutation: Uint8Array;
136
- /**
137
- * Set to true for init mutation of document.
138
- * default: undefined.
139
- *
140
- * Options:
141
- * - proto3_optional = true
142
- */
143
- isNew?: boolean;
144
136
  }
145
137
  /**
146
138
  * Defined in:
@@ -187,6 +179,34 @@ export interface WaitUntilHeadsReplicatedRequest {
187
179
  export interface ReIndexHeadsRequest {
188
180
  documentIds?: string[];
189
181
  }
182
+ /**
183
+ * Defined in:
184
+ * {@link file://./../../../dxos/echo/service.proto}
185
+ */
186
+ export interface CreateDocumentRequest {
187
+ /**
188
+ * Space id where the document will be created.
189
+ */
190
+ spaceId: string;
191
+ /**
192
+ * Automerge encoded initial document value.
193
+ * Optional - if not provided, an empty document will be created.
194
+ *
195
+ * Options:
196
+ * - proto3_optional = true
197
+ */
198
+ initialValue?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
199
+ }
200
+ /**
201
+ * Defined in:
202
+ * {@link file://./../../../dxos/echo/service.proto}
203
+ */
204
+ export interface CreateDocumentResponse {
205
+ /**
206
+ * The generated document id.
207
+ */
208
+ documentId: string;
209
+ }
190
210
  /**
191
211
  * Defined in:
192
212
  * {@link file://./../../../dxos/echo/service.proto}
@@ -254,6 +274,11 @@ export interface DataService {
254
274
  * Change which documents are subscribed to for specific subscription.
255
275
  */
256
276
  updateSubscription: (request: UpdateSubscriptionRequest, options?: RequestOptions) => Promise<void>;
277
+ /**
278
+ * Create a new automerge document.
279
+ * Returns the generated document id which is controlled by the host.
280
+ */
281
+ createDocument: (request: CreateDocumentRequest, options?: RequestOptions) => Promise<CreateDocumentResponse>;
257
282
  /**
258
283
  * Write incremental updates to multiple automerge documents.
259
284
  * Used to propagate changes from client to services.