@dxos/protocols 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae

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 (227) 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 +82 -0
  7. package/dist/src/FunctionProtocol.d.ts.map +1 -0
  8. package/dist/src/FunctionProtocol.js +4 -0
  9. package/dist/src/FunctionProtocol.js.map +1 -0
  10. package/dist/src/automerge.d.ts +8 -0
  11. package/dist/src/automerge.d.ts.map +1 -1
  12. package/dist/src/automerge.js.map +1 -1
  13. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +231 -0
  14. package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
  15. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +44 -0
  16. package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
  17. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +69 -19
  18. package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
  19. package/dist/src/buf/proto/gen/dxos/client/services_pb.js +31 -22
  20. package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
  21. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
  22. package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  23. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
  24. package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  25. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +55 -9
  26. package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  27. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
  28. package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  29. package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
  30. package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
  31. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -0
  32. package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
  33. package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
  34. package/dist/src/buf/proto/gen/dxos/tracing_pb.js +1 -1
  35. package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
  36. package/dist/src/codec.test.js +1 -1
  37. package/dist/src/edge/EdgeFunctionEnv.d.ts +121 -0
  38. package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
  39. package/dist/src/edge/EdgeFunctionEnv.js +4 -0
  40. package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
  41. package/dist/src/{edge.d.ts → edge/edge.d.ts} +117 -10
  42. package/dist/src/edge/edge.d.ts.map +1 -0
  43. package/dist/src/edge/edge.js +169 -0
  44. package/dist/src/edge/edge.js.map +1 -0
  45. package/dist/src/edge/errors.d.ts +29 -0
  46. package/dist/src/edge/errors.d.ts.map +1 -0
  47. package/dist/src/edge/errors.js +69 -0
  48. package/dist/src/edge/errors.js.map +1 -0
  49. package/dist/src/edge/index.d.ts +4 -0
  50. package/dist/src/edge/index.d.ts.map +1 -0
  51. package/dist/src/edge/index.js +7 -0
  52. package/dist/src/edge/index.js.map +1 -0
  53. package/dist/src/errors/base-errors.d.ts +86 -8
  54. package/dist/src/errors/base-errors.d.ts.map +1 -1
  55. package/dist/src/errors/base-errors.js +4 -20
  56. package/dist/src/errors/base-errors.js.map +1 -1
  57. package/dist/src/errors/encoding.d.ts +2 -2
  58. package/dist/src/errors/encoding.d.ts.map +1 -1
  59. package/dist/src/errors/encoding.js +1 -1
  60. package/dist/src/errors/errors.d.ts +619 -42
  61. package/dist/src/errors/errors.d.ts.map +1 -1
  62. package/dist/src/errors/errors.js +50 -104
  63. package/dist/src/errors/errors.js.map +1 -1
  64. package/dist/src/errors/errors.test.js +2 -2
  65. package/dist/src/errors/errors.test.js.map +1 -1
  66. package/dist/src/errors/helpers.d.ts +9 -5
  67. package/dist/src/errors/helpers.d.ts.map +1 -1
  68. package/dist/src/errors/helpers.js +3 -3
  69. package/dist/src/errors/helpers.js.map +1 -1
  70. package/dist/src/errors/index.d.ts +5 -5
  71. package/dist/src/errors/index.js +5 -5
  72. package/dist/src/feed-replication.d.ts.map +1 -1
  73. package/dist/src/index.d.ts +12 -12
  74. package/dist/src/index.d.ts.map +1 -1
  75. package/dist/src/index.js +11 -11
  76. package/dist/src/index.js.map +1 -1
  77. package/dist/src/indexing.test.js +1 -1
  78. package/dist/src/messenger.d.ts +16 -0
  79. package/dist/src/messenger.d.ts.map +1 -0
  80. package/dist/src/messenger.js +4 -0
  81. package/dist/src/messenger.js.map +1 -0
  82. package/dist/src/proto/gen/dxos/client/services.d.ts +300 -145
  83. package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  84. package/dist/src/proto/gen/dxos/client/services.js +37 -33
  85. package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
  86. package/dist/src/proto/gen/dxos/devtools/host.d.ts +31 -31
  87. package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
  88. package/dist/src/proto/gen/dxos/echo/query.d.ts +17 -1
  89. package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  90. package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
  91. package/dist/src/proto/gen/dxos/echo/service.d.ts +34 -8
  92. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  93. package/dist/src/proto/gen/google/protobuf.d.ts +31 -31
  94. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  95. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  96. package/dist/src/proto/gen/index.d.ts +10 -0
  97. package/dist/src/proto/gen/index.d.ts.map +1 -1
  98. package/dist/src/proto/gen/index.js +1 -1
  99. package/dist/src/proto/gen/index.js.map +1 -1
  100. package/dist/src/proto/index.d.ts +2 -2
  101. package/dist/src/proto/index.js +1 -1
  102. package/dist/src/proto/types.d.ts +1 -1
  103. package/dist/src/types.d.ts +2 -2
  104. package/dist/tsconfig.tsbuildinfo +1 -1
  105. package/package.json +19 -15
  106. package/src/FeedProtocol.ts +320 -0
  107. package/src/FunctionProtocol.ts +102 -0
  108. package/src/automerge.ts +8 -0
  109. package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
  110. package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
  111. package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
  112. package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
  113. package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
  114. package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
  115. package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
  116. package/src/buf/proto/gen/dxos/client/queue_pb.ts +280 -0
  117. package/src/buf/proto/gen/dxos/client/services_pb.ts +87 -27
  118. package/src/buf/proto/gen/dxos/config_pb.ts +1 -1
  119. package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
  120. package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
  121. package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
  122. package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
  123. package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
  124. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
  125. package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
  126. package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +1 -1
  127. package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
  128. package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
  129. package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
  130. package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
  131. package/src/buf/proto/gen/dxos/echo/query_pb.ts +16 -4
  132. package/src/buf/proto/gen/dxos/echo/service_pb.ts +68 -16
  133. package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
  134. package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
  135. package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
  136. package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +1 -1
  137. package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
  138. package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
  139. package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
  140. package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
  141. package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
  142. package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
  143. package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
  144. package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
  145. package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +1 -1
  146. package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
  147. package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
  148. package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
  149. package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
  150. package/src/buf/proto/gen/dxos/iframe_pb.ts +2 -1
  151. package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
  152. package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
  153. package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
  154. package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
  155. package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
  156. package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
  157. package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
  158. package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
  159. package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
  160. package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
  161. package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
  162. package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
  163. package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
  164. package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
  165. package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
  166. package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
  167. package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
  168. package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
  169. package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
  170. package/src/buf/proto/gen/dxos/rpc_pb.ts +1 -1
  171. package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
  172. package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
  173. package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
  174. package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
  175. package/src/buf/proto/gen/dxos/tracing_pb.ts +1 -1
  176. package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
  177. package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
  178. package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
  179. package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
  180. package/src/codec.test.ts +1 -1
  181. package/src/edge/EdgeFunctionEnv.ts +203 -0
  182. package/src/edge/edge.ts +493 -0
  183. package/src/edge/errors.ts +85 -0
  184. package/src/edge/index.ts +7 -0
  185. package/src/errors/base-errors.ts +4 -22
  186. package/src/errors/encoding.ts +2 -2
  187. package/src/errors/errors.test.ts +2 -2
  188. package/src/errors/errors.ts +57 -123
  189. package/src/errors/helpers.ts +6 -7
  190. package/src/errors/index.ts +5 -5
  191. package/src/feed-replication.ts +1 -0
  192. package/src/index.ts +12 -12
  193. package/src/indexing.test.ts +1 -1
  194. package/src/messenger.ts +22 -0
  195. package/src/proto/dxos/client/queue.proto +78 -0
  196. package/src/proto/dxos/client/services.proto +21 -3
  197. package/src/proto/dxos/echo/query.proto +4 -1
  198. package/src/proto/dxos/echo/service.proto +27 -6
  199. package/src/proto/dxos/iframe.proto +1 -0
  200. package/src/proto/gen/dxos/client/services.ts +300 -145
  201. package/src/proto/gen/dxos/devtools/host.ts +31 -31
  202. package/src/proto/gen/dxos/echo/query.ts +17 -1
  203. package/src/proto/gen/dxos/echo/service.ts +33 -8
  204. package/src/proto/gen/google/protobuf.ts +31 -31
  205. package/src/proto/gen/index.ts +11 -1
  206. package/src/proto/index.ts +2 -2
  207. package/src/proto/types.ts +1 -1
  208. package/src/types.ts +2 -2
  209. package/dist/src/edge-error.d.ts +0 -26
  210. package/dist/src/edge-error.d.ts.map +0 -1
  211. package/dist/src/edge-error.js +0 -102
  212. package/dist/src/edge-error.js.map +0 -1
  213. package/dist/src/edge.d.ts.map +0 -1
  214. package/dist/src/edge.js +0 -49
  215. package/dist/src/edge.js.map +0 -1
  216. package/dist/src/query.d.ts +0 -5
  217. package/dist/src/query.d.ts.map +0 -1
  218. package/dist/src/query.js +0 -8
  219. package/dist/src/query.js.map +0 -1
  220. package/dist/src/queue.d.ts +0 -28
  221. package/dist/src/queue.d.ts.map +0 -1
  222. package/dist/src/queue.js +0 -8
  223. package/dist/src/queue.js.map +0 -1
  224. package/src/edge-error.ts +0 -134
  225. package/src/edge.ts +0 -279
  226. package/src/query.ts +0 -8
  227. package/src/queue.ts +0 -38
@@ -67,195 +67,130 @@ import * as example_testing_rpc from "../../example/testing/rpc.js";
67
67
  import * as google_protobuf from "../../google/protobuf.js";
68
68
  /**
69
69
  * Defined in:
70
- * {@link file://./../../../dxos/client/invitation.proto}
71
- */
72
- export interface AdmissionKeypair {
73
- publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
74
- /**
75
- * Options:
76
- * - proto3_optional = true
77
- */
78
- privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
79
- }
80
- /**
81
- * Runtime state of the space object.
82
- *
83
- * Defined in:
84
- * {@link file://./../../../dxos/client/invitation.proto}
70
+ * {@link file://./../../../dxos/client/queue.proto}
85
71
  */
86
- export enum SpaceState {
87
- INVALID = 0,
88
- SPACE_INACTIVE = 2,
89
- SPACE_ACTIVE = 6,
90
- SPACE_CLOSED = 1,
91
- SPACE_CONTROL_ONLY = 7,
92
- SPACE_INITIALIZING = 4,
93
- SPACE_READY = 3,
94
- SPACE_ERROR = 5,
95
- SPACE_REQUIRES_MIGRATION = 8
96
- }
97
- /**
98
- * Represents the invitation state passed between client and service.
99
- *
100
- * Defined in:
101
- * {@link file://./../../../dxos/client/invitation.proto}
102
- */
103
- export interface Invitation {
104
- /**
105
- * Local identifier (random).
106
- */
107
- invitationId: string;
108
- /**
109
- * Determines the behavior of the invitation.
110
- */
111
- type: Invitation.Type;
112
- /**
113
- * Kind of access the invitation will grant.
114
- */
115
- kind: Invitation.Kind;
116
- /**
117
- * How the invitation is authenticated.
118
- */
119
- authMethod: Invitation.AuthMethod;
120
- /**
121
- * Swarm rendezvous (random).
122
- */
123
- swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
124
- /**
125
- * Local state.
126
- */
127
- state: Invitation.State;
72
+ export interface QueueQuery {
73
+ spaceId: string;
128
74
  /**
129
- * Timeout for guest to complete invitation once connected (ms).
130
- *
131
75
  * Options:
132
76
  * - proto3_optional = true
133
77
  */
134
- timeout?: number;
78
+ queuesNamespace?: string;
135
79
  /**
136
- * Guest's identity.
137
- *
138
- * Options:
139
- * - proto3_optional = true
80
+ * Queries the whole space if missing.
140
81
  */
141
- identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
82
+ queueIds?: string[];
142
83
  /**
143
- * Space to join (only present if kind is SPACE).
84
+ * Filter items after this cursor. Exclusive.
144
85
  *
145
86
  * Options:
146
87
  * - proto3_optional = true
147
88
  */
148
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
89
+ after?: string;
149
90
  /**
150
- * Authentication code created by host (only present if auth_method is SHARED_SECRET).
91
+ * Filter items before this cursor. Exclusive.
151
92
  *
152
93
  * Options:
153
94
  * - proto3_optional = true
154
95
  */
155
- authCode?: string;
96
+ before?: string;
156
97
  /**
157
- * Path or identifier to navigate to after successful authentication.
98
+ * Filter items after this position. Inclusive.
158
99
  *
159
100
  * Options:
160
101
  * - proto3_optional = true
161
102
  */
162
- target?: string;
103
+ beginPosition?: string;
163
104
  /**
164
- * Host should resume invitation on startup until timeout.
105
+ * Filter items before this position. Exclusive.
165
106
  *
166
107
  * Options:
167
108
  * - proto3_optional = true
168
109
  */
169
- persistent?: boolean;
170
- /**
171
- * Options:
172
- * - proto3_optional = true
173
- */
174
- created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
110
+ endPosition?: string;
175
111
  /**
176
112
  * Options:
177
113
  * - proto3_optional = true
178
114
  */
179
- lifetime?: number;
115
+ limit?: number;
180
116
  /**
181
- * Whether an invitation can be used multiple times.
182
- *
183
117
  * Options:
184
118
  * - proto3_optional = true
185
119
  */
186
- multiUse?: boolean;
120
+ reverse?: boolean;
121
+ objectIds?: string[];
122
+ }
123
+ /**
124
+ * Defined in:
125
+ * {@link file://./../../../dxos/client/queue.proto}
126
+ */
127
+ export interface QueueQueryResult {
128
+ objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
187
129
  /**
188
- * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
189
- *
190
- * Options:
191
- * - proto3_optional = true
130
+ * Cursor to query the next items. Can be passed to `after` in query to keep querying.
192
131
  */
193
- guestKeypair?: AdmissionKeypair;
194
- /**
195
- * Present on Type.DELEGATED invitations.
196
- *
197
- * Options:
198
- * - proto3_optional = true
199
- */
200
- delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
132
+ nextCursor: string;
133
+ prevCursor: string;
134
+ }
135
+ /**
136
+ * Defined in:
137
+ * {@link file://./../../../dxos/client/queue.proto}
138
+ */
139
+ export interface QueryQueueRequest {
140
+ query: QueueQuery;
141
+ }
142
+ /**
143
+ * Defined in:
144
+ * {@link file://./../../../dxos/client/queue.proto}
145
+ */
146
+ export interface InsertIntoQueueRequest {
147
+ subspaceTag: string;
148
+ spaceId: string;
149
+ queueId: string;
150
+ objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
151
+ }
152
+ /**
153
+ * Defined in:
154
+ * {@link file://./../../../dxos/client/queue.proto}
155
+ */
156
+ export interface DeleteFromQueueRequest {
157
+ subspaceTag: string;
158
+ spaceId: string;
159
+ queueId: string;
160
+ objectIds?: string[];
161
+ }
162
+ /**
163
+ * Defined in:
164
+ * {@link file://./../../../dxos/client/queue.proto}
165
+ */
166
+ export interface SyncQueueRequest {
167
+ subspaceTag: string;
168
+ spaceId: string;
169
+ queueId: string;
201
170
  /**
202
- * Role of the admitted member, defaults to ADMIN.
171
+ * Whether to push local changes to the server. Defaults to true.
203
172
  *
204
173
  * Options:
205
174
  * - proto3_optional = true
206
175
  */
207
- role?: dxos_halo_credentials.SpaceMember.Role;
176
+ shouldPush?: boolean;
208
177
  /**
209
- * Id of a the space to join (only present if kind is SPACE).
178
+ * Whether to pull remote changes from the server. Defaults to true.
210
179
  *
211
180
  * Options:
212
181
  * - proto3_optional = true
213
182
  */
214
- spaceId?: string;
183
+ shouldPull?: boolean;
215
184
  }
216
- export namespace Invitation {
217
- /**
218
- * Defined in:
219
- * {@link file://./../../../dxos/client/invitation.proto}
220
- */
221
- export enum Type {
222
- INTERACTIVE = 0,
223
- DELEGATED = 1,
224
- MULTIUSE = 2
225
- }
226
- /**
227
- * Defined in:
228
- * {@link file://./../../../dxos/client/invitation.proto}
229
- */
230
- export enum Kind {
231
- DEVICE = 0,
232
- SPACE = 1
233
- }
234
- /**
235
- * Defined in:
236
- * {@link file://./../../../dxos/client/invitation.proto}
237
- */
238
- export enum AuthMethod {
239
- NONE = 0,
240
- SHARED_SECRET = 1,
241
- KNOWN_PUBLIC_KEY = 2
242
- }
243
- /**
244
- * Defined in:
245
- * {@link file://./../../../dxos/client/invitation.proto}
246
- */
247
- export enum State {
248
- INIT = 0,
249
- CONNECTING = 1,
250
- CONNECTED = 2,
251
- READY_FOR_AUTHENTICATION = 3,
252
- AUTHENTICATING = 4,
253
- SUCCESS = 5,
254
- CANCELLED = 6,
255
- TIMEOUT = 7,
256
- ERROR = 8,
257
- EXPIRED = 9
258
- }
185
+ /**
186
+ * Defined in:
187
+ * {@link file://./../../../dxos/client/queue.proto}
188
+ */
189
+ export interface QueueService {
190
+ queryQueue: (request: QueryQueueRequest, options?: RequestOptions) => Promise<QueueQueryResult>;
191
+ insertIntoQueue: (request: InsertIntoQueueRequest, options?: RequestOptions) => Promise<void>;
192
+ deleteFromQueue: (request: DeleteFromQueueRequest, options?: RequestOptions) => Promise<void>;
193
+ syncQueue: (request: SyncQueueRequest, options?: RequestOptions) => Promise<void>;
259
194
  }
260
195
  /**
261
196
  * Defined in:
@@ -435,6 +370,198 @@ export interface LoggingService {
435
370
  queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
436
371
  queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
437
372
  }
373
+ /**
374
+ * Defined in:
375
+ * {@link file://./../../../dxos/client/invitation.proto}
376
+ */
377
+ export interface AdmissionKeypair {
378
+ publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
379
+ /**
380
+ * Options:
381
+ * - proto3_optional = true
382
+ */
383
+ privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
384
+ }
385
+ /**
386
+ * Runtime state of the space object.
387
+ *
388
+ * Defined in:
389
+ * {@link file://./../../../dxos/client/invitation.proto}
390
+ */
391
+ export enum SpaceState {
392
+ INVALID = 0,
393
+ SPACE_INACTIVE = 2,
394
+ SPACE_ACTIVE = 6,
395
+ SPACE_CLOSED = 1,
396
+ SPACE_CONTROL_ONLY = 7,
397
+ SPACE_INITIALIZING = 4,
398
+ SPACE_READY = 3,
399
+ SPACE_ERROR = 5,
400
+ SPACE_REQUIRES_MIGRATION = 8
401
+ }
402
+ /**
403
+ * Represents the invitation state passed between client and service.
404
+ *
405
+ * Defined in:
406
+ * {@link file://./../../../dxos/client/invitation.proto}
407
+ */
408
+ export interface Invitation {
409
+ /**
410
+ * Local identifier (random).
411
+ */
412
+ invitationId: string;
413
+ /**
414
+ * Determines the behavior of the invitation.
415
+ */
416
+ type: Invitation.Type;
417
+ /**
418
+ * Kind of access the invitation will grant.
419
+ */
420
+ kind: Invitation.Kind;
421
+ /**
422
+ * How the invitation is authenticated.
423
+ */
424
+ authMethod: Invitation.AuthMethod;
425
+ /**
426
+ * Swarm rendezvous (random).
427
+ */
428
+ swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
429
+ /**
430
+ * Local state.
431
+ */
432
+ state: Invitation.State;
433
+ /**
434
+ * Timeout for guest to complete invitation once connected (ms).
435
+ *
436
+ * Options:
437
+ * - proto3_optional = true
438
+ */
439
+ timeout?: number;
440
+ /**
441
+ * Guest's identity.
442
+ *
443
+ * Options:
444
+ * - proto3_optional = true
445
+ */
446
+ identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
447
+ /**
448
+ * Space to join (only present if kind is SPACE).
449
+ *
450
+ * Options:
451
+ * - proto3_optional = true
452
+ */
453
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
454
+ /**
455
+ * Authentication code created by host (only present if auth_method is SHARED_SECRET).
456
+ *
457
+ * Options:
458
+ * - proto3_optional = true
459
+ */
460
+ authCode?: string;
461
+ /**
462
+ * Path or identifier to navigate to after successful authentication.
463
+ *
464
+ * Options:
465
+ * - proto3_optional = true
466
+ */
467
+ target?: string;
468
+ /**
469
+ * Host should resume invitation on startup until timeout.
470
+ *
471
+ * Options:
472
+ * - proto3_optional = true
473
+ */
474
+ persistent?: boolean;
475
+ /**
476
+ * Options:
477
+ * - proto3_optional = true
478
+ */
479
+ created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
480
+ /**
481
+ * Options:
482
+ * - proto3_optional = true
483
+ */
484
+ lifetime?: number;
485
+ /**
486
+ * Whether an invitation can be used multiple times.
487
+ *
488
+ * Options:
489
+ * - proto3_optional = true
490
+ */
491
+ multiUse?: boolean;
492
+ /**
493
+ * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
494
+ *
495
+ * Options:
496
+ * - proto3_optional = true
497
+ */
498
+ guestKeypair?: AdmissionKeypair;
499
+ /**
500
+ * Present on Type.DELEGATED invitations.
501
+ *
502
+ * Options:
503
+ * - proto3_optional = true
504
+ */
505
+ delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
506
+ /**
507
+ * Role of the admitted member, defaults to ADMIN.
508
+ *
509
+ * Options:
510
+ * - proto3_optional = true
511
+ */
512
+ role?: dxos_halo_credentials.SpaceMember.Role;
513
+ /**
514
+ * Id of a the space to join (only present if kind is SPACE).
515
+ *
516
+ * Options:
517
+ * - proto3_optional = true
518
+ */
519
+ spaceId?: string;
520
+ }
521
+ export namespace Invitation {
522
+ /**
523
+ * Defined in:
524
+ * {@link file://./../../../dxos/client/invitation.proto}
525
+ */
526
+ export enum Type {
527
+ INTERACTIVE = 0,
528
+ DELEGATED = 1,
529
+ MULTIUSE = 2
530
+ }
531
+ /**
532
+ * Defined in:
533
+ * {@link file://./../../../dxos/client/invitation.proto}
534
+ */
535
+ export enum Kind {
536
+ DEVICE = 0,
537
+ SPACE = 1
538
+ }
539
+ /**
540
+ * Defined in:
541
+ * {@link file://./../../../dxos/client/invitation.proto}
542
+ */
543
+ export enum AuthMethod {
544
+ NONE = 0,
545
+ SHARED_SECRET = 1,
546
+ KNOWN_PUBLIC_KEY = 2
547
+ }
548
+ /**
549
+ * Defined in:
550
+ * {@link file://./../../../dxos/client/invitation.proto}
551
+ */
552
+ export enum State {
553
+ INIT = 0,
554
+ CONNECTING = 1,
555
+ CONNECTED = 2,
556
+ READY_FOR_AUTHENTICATION = 3,
557
+ AUTHENTICATING = 4,
558
+ SUCCESS = 5,
559
+ CANCELLED = 6,
560
+ TIMEOUT = 7,
561
+ ERROR = 8,
562
+ EXPIRED = 9
563
+ }
564
+ }
438
565
  /**
439
566
  * Defined in:
440
567
  * {@link file://./../../../dxos/client/services.proto}
@@ -555,7 +682,8 @@ export namespace Platform {
555
682
  export enum PLATFORM_TYPE {
556
683
  BROWSER = 0,
557
684
  SHARED_WORKER = 1,
558
- NODE = 2
685
+ NODE = 2,
686
+ DEDICATED_WORKER = 3
559
687
  }
560
688
  }
561
689
  /**
@@ -1399,9 +1527,36 @@ export interface EdgeAgentService {
1399
1527
  * Defined in:
1400
1528
  * {@link file://./../../../dxos/client/services.proto}
1401
1529
  */
1402
- export enum EdgeStatus {
1403
- NOT_CONNECTED = 0,
1404
- CONNECTED = 1
1530
+ export interface EdgeStatus {
1531
+ state: EdgeStatus.ConnectionState;
1532
+ /**
1533
+ * Latency in ms
1534
+ */
1535
+ rtt: number;
1536
+ /**
1537
+ * How long the connection has been up
1538
+ */
1539
+ uptime: number;
1540
+ /**
1541
+ * Upload rate in bytes per second
1542
+ */
1543
+ rateBytesUp: number;
1544
+ /**
1545
+ * Download rate in bytes per second
1546
+ */
1547
+ rateBytesDown: number;
1548
+ messagesSent: number;
1549
+ messagesReceived: number;
1550
+ }
1551
+ export namespace EdgeStatus {
1552
+ /**
1553
+ * Defined in:
1554
+ * {@link file://./../../../dxos/client/services.proto}
1555
+ */
1556
+ export enum ConnectionState {
1557
+ NOT_CONNECTED = 0,
1558
+ CONNECTED = 1
1559
+ }
1405
1560
  }
1406
1561
  /**
1407
1562
  * Defined in:
@@ -65,37 +65,6 @@ import * as dxos_value from "../value.js";
65
65
  import * as example_testing_data from "../../example/testing/data.js";
66
66
  import * as example_testing_rpc from "../../example/testing/rpc.js";
67
67
  import * as google_protobuf from "../../google/protobuf.js";
68
- /**
69
- * Defined in:
70
- * {@link file://./../../../dxos/devtools/diagnostics.proto}
71
- */
72
- export interface Services {
73
- spaces?: SpaceStats[];
74
- }
75
- /**
76
- * Defined in:
77
- * {@link file://./../../../dxos/devtools/diagnostics.proto}
78
- */
79
- export interface SpaceStats {
80
- key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
81
- peers?: PeerStats[];
82
- }
83
- /**
84
- * Defined in:
85
- * {@link file://./../../../dxos/devtools/diagnostics.proto}
86
- */
87
- export interface PeerStats {
88
- controlFeed: FeedStats;
89
- dataFeed: FeedStats;
90
- }
91
- /**
92
- * Defined in:
93
- * {@link file://./../../../dxos/devtools/diagnostics.proto}
94
- */
95
- export interface FeedStats {
96
- key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
97
- length: number;
98
- }
99
68
  /**
100
69
  * Defined in:
101
70
  * {@link file://./../../../dxos/devtools/host.proto}
@@ -531,3 +500,34 @@ export interface SubscribeToSwarmInfoRequest {
531
500
  export interface SubscribeToSwarmInfoResponse {
532
501
  data?: dxos_devtools_swarm.SwarmInfo[];
533
502
  }
503
+ /**
504
+ * Defined in:
505
+ * {@link file://./../../../dxos/devtools/diagnostics.proto}
506
+ */
507
+ export interface Services {
508
+ spaces?: SpaceStats[];
509
+ }
510
+ /**
511
+ * Defined in:
512
+ * {@link file://./../../../dxos/devtools/diagnostics.proto}
513
+ */
514
+ export interface SpaceStats {
515
+ key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
516
+ peers?: PeerStats[];
517
+ }
518
+ /**
519
+ * Defined in:
520
+ * {@link file://./../../../dxos/devtools/diagnostics.proto}
521
+ */
522
+ export interface PeerStats {
523
+ controlFeed: FeedStats;
524
+ dataFeed: FeedStats;
525
+ }
526
+ /**
527
+ * Defined in:
528
+ * {@link file://./../../../dxos/devtools/diagnostics.proto}
529
+ */
530
+ export interface FeedStats {
531
+ key: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
532
+ length: number;
533
+ }
@@ -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.