@dxos/client 2.26.2-dev.96e7d25d → 2.27.0

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 (49) hide show
  1. package/dist/src/client/client.d.ts +5 -15
  2. package/dist/src/client/client.d.ts.map +1 -1
  3. package/dist/src/client/client.js +6 -89
  4. package/dist/src/client/client.js.map +1 -1
  5. package/dist/src/client/client.test.js.map +1 -1
  6. package/dist/src/client/local-client.test.js +0 -10
  7. package/dist/src/client/local-client.test.js.map +1 -1
  8. package/dist/src/client/service-host/services/system.d.ts.map +1 -1
  9. package/dist/src/client/service-host/services/system.js +1 -7
  10. package/dist/src/client/service-host/services/system.js.map +1 -1
  11. package/dist/src/client/service-host/storage.d.ts +1 -1
  12. package/dist/src/client/service-host/storage.d.ts.map +1 -1
  13. package/dist/src/client/service-host/storage.js +15 -14
  14. package/dist/src/client/service-host/storage.js.map +1 -1
  15. package/dist/src/proto/gen/dxos/config.d.ts +175 -253
  16. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
  17. package/dist/src/proto/gen/dxos/config.js +26 -23
  18. package/dist/src/proto/gen/dxos/config.js.map +1 -1
  19. package/dist/src/proto/gen/dxos/devtools.d.ts +2 -2
  20. package/dist/src/proto/gen/dxos/devtools.d.ts.map +1 -1
  21. package/dist/src/proto/gen/dxos/echo/service.d.ts +1 -0
  22. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  23. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +12 -4
  24. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
  25. package/dist/src/proto/gen/google/protobuf.d.ts +0 -2
  26. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  27. package/dist/src/proto/gen/google/protobuf.js.map +1 -1
  28. package/dist/src/proto/gen/index.d.ts +26 -22
  29. package/dist/src/proto/gen/index.d.ts.map +1 -1
  30. package/dist/src/proto/gen/index.js +1 -1
  31. package/dist/src/proto/gen/index.js.map +1 -1
  32. package/dist/src/proto/substitutions.d.ts +16 -21
  33. package/dist/src/proto/substitutions.d.ts.map +1 -1
  34. package/dist/src/proto/substitutions.js +6 -46
  35. package/dist/src/proto/substitutions.js.map +1 -1
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +19 -19
  38. package/src/client/client.test.ts +2 -2
  39. package/src/client/client.ts +13 -106
  40. package/src/client/local-client.test.ts +2 -16
  41. package/src/client/service-host/services/system.ts +1 -7
  42. package/src/client/service-host/storage.ts +18 -17
  43. package/src/proto/gen/dxos/config.ts +175 -253
  44. package/src/proto/gen/dxos/devtools.ts +2 -2
  45. package/src/proto/gen/dxos/echo/service.ts +1 -0
  46. package/src/proto/gen/dxos/echo/snapshot.ts +12 -4
  47. package/src/proto/gen/google/protobuf.ts +0 -2
  48. package/src/proto/gen/index.ts +27 -23
  49. package/src/proto/substitutions.ts +9 -51
@@ -11,281 +11,203 @@ import * as dxos_halo_keys from "./halo/keys";
11
11
  import * as dxos_rpc from "./rpc";
12
12
  import * as google_protobuf from "../google/protobuf";
13
13
  export interface Config {
14
- /**
15
- * Options:
16
- * - (env) = "SYSTEM"
17
- */
18
- system?: System;
19
- services?: Services;
20
- /**
21
- * Build metdata
22
- */
14
+ version?: number;
15
+ module?: Module;
23
16
  build?: Build;
24
- /**
25
- * App configuration. Incuded if this configuration is for an app.
26
- *
27
- * Options:
28
- * - (env) = "APP"
29
- */
30
- app?: App;
31
- /**
32
- * App configuration. Incuded if this configuration is for a bot.
33
- *
34
- * Options:
35
- * - (env) = "BOT"
36
- */
37
- bot?: Bot;
38
- /**
39
- * CLI configuration.
40
- */
41
- cli?: CLI;
42
- /**
43
- * Custom configuration as string key-value pairs.
44
- */
45
- custom?: Partial<Record<string, string>>;
17
+ runtime?: Runtime;
46
18
  }
47
- export interface System {
48
- certEndpoint?: string;
49
- /**
50
- * Options:
51
- * - (env) = "DEBUG"
52
- */
53
- debug?: string;
54
- storage?: System.Storage;
55
- enableSnapshots?: boolean;
56
- /**
57
- * Milliseconds
58
- */
59
- snapshotInterval?: number;
60
- /**
61
- * Milliseconds
62
- */
63
- invitationExpiration?: number;
64
- mode?: System.Mode;
19
+ export interface Module {
20
+ name?: string;
21
+ type?: string;
22
+ version?: string;
23
+ author?: string;
24
+ license?: string;
25
+ description?: string;
26
+ repository?: string;
27
+ repositoryVersion?: string;
28
+ keywords?: string[];
29
+ displayName?: string;
30
+ npmUrl?: string;
31
+ build?: Module.Build;
32
+ record?: Module.Record;
65
33
  }
66
- export namespace System {
67
- export interface Storage {
68
- persistent?: boolean;
69
- storageType?: System.Storage.StorageDriver;
70
- keyStorage?: System.Storage.StorageDriver;
71
- path?: string;
34
+ export namespace Module {
35
+ export interface Record {
36
+ app?: Module.Record.App;
72
37
  }
73
- export namespace Storage {
74
- export enum StorageDriver {
75
- RAM = 0,
76
- IDB = 1,
77
- CHROME = 2,
78
- FIREFOX = 3,
79
- NODE = 4,
80
- LEVELJS = 11,
81
- JSONDOWN = 12
38
+ export namespace Record {
39
+ export interface App {
40
+ contentType?: string[];
82
41
  }
83
42
  }
84
- export enum Mode {
85
- AUTOMATIC = 0,
86
- LOCAL = 1,
87
- REMOTE = 2
43
+ export interface Build {
44
+ version?: string;
45
+ commitHash?: string;
46
+ timestamp?: ReturnType<typeof substitutions["google.protobuf.Timestamp"]["decode"]>;
88
47
  }
89
48
  }
90
- /**
91
- * Services provided to all DXOS agents
92
- */
93
- export interface Services {
94
- kube?: Services.Kube;
95
- app?: Services.AppServer;
96
- dxns?: Services.Dxns;
97
- ipfs?: Services.Ipfs;
98
- signal?: Services.Signal;
99
- ice?: Services.Ice[];
100
- machine?: Services.Machine;
101
- bot?: Services.BotFactoryClient;
102
- }
103
- export namespace Services {
104
- export interface Kube {
105
- endpoints?: Services.Kube.Endpoints;
106
- publicUrl?: string;
107
- }
108
- export namespace Kube {
109
- export interface Endpoints {
110
- logs?: string;
111
- services?: string;
112
- }
113
- }
114
- export interface AppServer {
115
- prefix?: string;
116
- server?: string;
117
- }
118
- export interface Dxns {
119
- /**
120
- * DXNS endpoint.
121
- */
122
- server?: string;
123
- /**
124
- * Substrate account URI. This is a secret.
125
- * KUBEs do not serve this with the config but we store it in profile.yml.
126
- *
127
- * TODO(dmaretskyi): Deprecate this and move it to keyring.
128
- */
129
- accountUri?: string;
130
- }
131
- export interface Ipfs {
132
- server?: string;
133
- gateway?: string;
134
- }
135
- export interface Signal {
136
- server?: string;
137
- api?: string;
138
- }
139
- export interface Ice {
140
- urls?: string;
141
- username?: string;
142
- credential?: string;
143
- }
144
- export interface Machine {
145
- doAccessToken?: string;
146
- githubAccessToken?: string;
147
- githubUsername?: string;
148
- dnsDomain?: string;
149
- npmAccessToken?: string;
150
- }
151
- export interface BotFactoryClient {
152
- topic?: string;
153
- }
154
- }
155
- /**
156
- * Build metadata
157
- */
158
49
  export interface Build {
159
- version?: string;
160
- commitHash?: string;
161
- timestamp?: ReturnType<typeof substitutions["google.protobuf.Timestamp"]["decode"]>;
50
+ command?: string;
51
+ out?: string;
162
52
  }
163
- /**
164
- * App configuration
165
- */
166
- export interface App {
167
- title?: string;
168
- org?: string;
169
- theme?: string;
170
- website?: string;
171
- /**
172
- * Options:
173
- * - (env) = "PUBLIC_URL"
174
- */
175
- publicUrl?: string;
53
+ export interface Runtime {
54
+ client?: Runtime.Client;
55
+ app?: Runtime.App;
56
+ cli?: Runtime.CLI;
57
+ props?: Runtime.Props;
58
+ services?: Runtime.Services;
59
+ system?: Runtime.System;
176
60
  }
177
- /**
178
- * Bot configuration
179
- */
180
- export interface Bot {
181
- /**
182
- * Options:
183
- * - (env) = "UID"
184
- */
185
- uid?: string;
186
- /**
187
- * Options:
188
- * - (env) = "NAME"
189
- */
190
- name?: string;
191
- /**
192
- * Options:
193
- * - (env) = "CWD"
194
- */
195
- cwd?: string;
196
- /**
197
- * Options:
198
- * - (env) = "RESTARTED"
199
- */
200
- restarted?: boolean;
201
- /**
202
- * Options:
203
- * - (env) = "RESET"
204
- */
205
- reset?: boolean;
206
- /**
207
- * Options:
208
- * - (env) = "PEER_ID"
209
- */
210
- peerId?: string;
211
- /**
212
- * Options:
213
- * - (env) = "TOPIC"
214
- */
215
- topic?: string;
216
- /**
217
- * Options:
218
- * - (env) = "SECRET_KEY"
219
- */
220
- secretKey?: string;
221
- /**
222
- * Options:
223
- * - (env) = "LOCAL_DEV"
224
- */
225
- localDev?: boolean;
226
- /**
227
- * Options:
228
- * - (env) = "NODE_PATH"
229
- */
230
- nodePath?: string;
231
- /**
232
- * Options:
233
- * - (env) = "CONTROL_TOPIC"
234
- */
235
- controlTopic?: string;
236
- /**
237
- * Options:
238
- * - (env) = "DUMP_FILE"
239
- */
240
- dumpFile?: string;
241
- /**
242
- * Options:
243
- * - (env) = "IPC"
244
- */
245
- ipc?: Bot.Ipc;
246
- }
247
- export namespace Bot {
248
- export interface Ipc {
61
+ export namespace Runtime {
62
+ export interface Client {
249
63
  /**
250
64
  * Options:
251
- * - (env) = "PORT_FROM"
65
+ * - (env) = "DEBUG"
252
66
  */
253
- portFrom?: number;
67
+ debug?: string;
68
+ storage?: Runtime.Client.Storage;
69
+ enableSnapshots?: boolean;
254
70
  /**
255
- * Options:
256
- * - (env) = "PORT_TO"
71
+ * Milliseconds
257
72
  */
258
- portTo?: number;
73
+ snapshotInterval?: number;
74
+ /**
75
+ * Milliseconds
76
+ */
77
+ invitationExpiration?: number;
78
+ mode?: Runtime.Client.Mode;
79
+ }
80
+ export namespace Client {
81
+ export enum Mode {
82
+ AUTOMATIC = 0,
83
+ LOCAL = 1,
84
+ REMOTE = 2
85
+ }
86
+ export interface Storage {
87
+ persistent?: boolean;
88
+ storageType?: Runtime.Client.Storage.StorageDriver;
89
+ keyStorage?: Runtime.Client.Storage.StorageDriver;
90
+ path?: string;
91
+ }
92
+ export namespace Storage {
93
+ export enum StorageDriver {
94
+ RAM = 0,
95
+ IDB = 1,
96
+ CHROME = 2,
97
+ FIREFOX = 3,
98
+ NODE = 4,
99
+ LEVELJS = 11,
100
+ JSONDOWN = 12
101
+ }
102
+ }
103
+ }
104
+ export interface App {
105
+ org?: string;
106
+ theme?: string;
107
+ website?: string;
259
108
  /**
260
109
  * Options:
261
- * - (env) = "SERVER_ID"
110
+ * - (env) = "PUBLIC_URL"
262
111
  */
263
- serverId?: string;
112
+ publicUrl?: string;
264
113
  }
265
- }
266
- export interface CLI {
267
- nodePath?: string;
268
- app?: CLI.AppServe;
269
- console?: CLI.Package;
270
- mdns?: CLI.Package;
271
- signal?: CLI.Package;
272
- npmClient?: string;
273
- channel?: string;
274
- }
275
- export namespace CLI {
276
- export interface AppServe {
277
- serve?: CLI.AppServe.Serve;
114
+ export interface CLI {
115
+ nodePath?: string;
116
+ app?: Runtime.CLI.AppServe;
117
+ console?: Runtime.CLI.Package;
118
+ mdns?: Runtime.CLI.Package;
119
+ signal?: Runtime.CLI.Package;
120
+ npmClient?: string;
121
+ channel?: string;
278
122
  }
279
- export namespace AppServe {
280
- export interface Serve {
281
- config?: string;
282
- loginApp?: string;
283
- keyPhrase?: string;
123
+ export namespace CLI {
124
+ export interface AppServe {
125
+ serve?: Runtime.CLI.AppServe.Serve;
126
+ }
127
+ export namespace AppServe {
128
+ export interface Serve {
129
+ config?: string;
130
+ loginApp?: string;
131
+ keyPhrase?: string;
132
+ }
133
+ }
134
+ export interface Package {
135
+ package?: string;
136
+ channel?: string;
137
+ bin?: string;
284
138
  }
285
139
  }
286
- export interface Package {
287
- package?: string;
288
- channel?: string;
289
- bin?: string;
140
+ export interface Props {
141
+ title?: string;
142
+ }
143
+ export interface System {
144
+ debug?: string;
145
+ }
146
+ export interface Services {
147
+ kube?: Runtime.Services.Kube;
148
+ app?: Runtime.Services.AppServer;
149
+ dxns?: Runtime.Services.Dxns;
150
+ ipfs?: Runtime.Services.Ipfs;
151
+ signal?: Runtime.Services.Signal;
152
+ ice?: Runtime.Services.Ice[];
153
+ machine?: Runtime.Services.Machine;
154
+ bot?: Runtime.Services.BotFactory;
155
+ }
156
+ export namespace Services {
157
+ export interface Kube {
158
+ endpoints?: Runtime.Services.Kube.Endpoints;
159
+ publicUrl?: string;
160
+ }
161
+ export namespace Kube {
162
+ export interface Endpoints {
163
+ logs?: string;
164
+ services?: string;
165
+ }
166
+ }
167
+ export interface AppServer {
168
+ prefix?: string;
169
+ server?: string;
170
+ }
171
+ export interface Dxns {
172
+ /**
173
+ * DXNS endpoint.
174
+ */
175
+ server?: string;
176
+ /**
177
+ * Substrate account URI. This is a secret.
178
+ * KUBEs do not serve this with the config but we store it in profile.yml.
179
+ *
180
+ * TODO(dmaretskyi): Deprecate this and move it to keyring.
181
+ */
182
+ accountUri?: string;
183
+ /**
184
+ * Public address of the DXNS Account - not a secret.
185
+ */
186
+ account?: string;
187
+ }
188
+ export interface Ipfs {
189
+ server?: string;
190
+ gateway?: string;
191
+ }
192
+ export interface Signal {
193
+ server?: string;
194
+ api?: string;
195
+ status?: string;
196
+ }
197
+ export interface Ice {
198
+ urls?: string;
199
+ username?: string;
200
+ credential?: string;
201
+ }
202
+ export interface Machine {
203
+ doAccessToken?: string;
204
+ githubAccessToken?: string;
205
+ githubUsername?: string;
206
+ dnsDomain?: string;
207
+ npmAccessToken?: string;
208
+ }
209
+ export interface BotFactory {
210
+ topic?: string;
211
+ }
290
212
  }
291
213
  }
@@ -156,8 +156,8 @@ export namespace SubscribeToSignalStatusResponse {
156
156
  state?: string;
157
157
  error?: string;
158
158
  reconnectIn?: number;
159
- connectionStarted?: ReturnType<typeof substitutions["google.protobuf.Timestamp"]["decode"]>;
160
- lastStateChange?: ReturnType<typeof substitutions["google.protobuf.Timestamp"]["decode"]>;
159
+ connectionStarted?: number;
160
+ lastStateChange?: number;
161
161
  }
162
162
  }
163
163
  export interface SubscribeToSignalTraceResponse {
@@ -35,6 +35,7 @@ export namespace SubscribeEntityStreamResponse {
35
35
  feedKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
36
36
  memberKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
37
37
  seq?: number;
38
+ timeframe?: ReturnType<typeof substitutions["dxos.echo.feed.TimeframeVector"]["decode"]>;
38
39
  }
39
40
  }
40
41
  }
@@ -32,10 +32,18 @@ export interface ItemSnapshot {
32
32
  model?: ModelSnapshot;
33
33
  }
34
34
  export interface ModelSnapshot {
35
- custom?: Uint8Array;
36
- array?: ModelMutationArray;
37
- }
38
- export interface ModelMutationArray {
35
+ /**
36
+ * Encoded model snapshot. Encoding is defined by model's codec.
37
+ *
38
+ * Can be missing. In that case the state machine is to be initialized in it's default state.
39
+ *
40
+ * Options:
41
+ * - proto3_optional = true
42
+ */
43
+ snapshot?: Uint8Array;
44
+ /**
45
+ * Mutations to be applied on top of the snapshotted state, or on top of initial state if the snapshot is missing.
46
+ */
39
47
  mutations?: ModelMutation[];
40
48
  }
41
49
  export interface ModelMutation {
@@ -184,8 +184,6 @@ export interface FieldOptions {
184
184
  deprecated?: boolean;
185
185
  weak?: boolean;
186
186
  uninterpretedOption?: UninterpretedOption[];
187
- ".dxos.config.env"?: string;
188
- ".dxos.config.regex"?: string;
189
187
  }
190
188
  export namespace FieldOptions {
191
189
  export enum CType {