@mhome/app-facade-protocol 1.90.1 → 1.93.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.
@@ -0,0 +1,548 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mhome.ai/protocol/storage/v1",
4
+ "$defs": {
5
+ "decimalU64": {
6
+ "type": "string",
7
+ "pattern": "^(0|[1-9][0-9]{0,18}|1[0-7][0-9]{18}|18[0-3][0-9]{17}|184[0-3][0-9]{16}|1844[0-5][0-9]{15}|18446[0-6][0-9]{14}|184467[0-3][0-9]{13}|1844674[0-3][0-9]{12}|184467440[0-6][0-9]{10}|1844674407[0-2][0-9]{9}|18446744073[0-6][0-9]{8}|1844674407370[0-8][0-9]{6}|18446744073709[0-4][0-9]{5}|184467440737095[0-4][0-9]{4}|18446744073709550[0-9]{3}|18446744073709551[0-5][0-9]{2}|1844674407370955160[0-9]{1}|1844674407370955161[0-4]|18446744073709551615)$",
8
+ "maxLength": 20
9
+ },
10
+ "writeState": {
11
+ "enum": [
12
+ "writable",
13
+ "lowSpace",
14
+ "blockedByPhysicalSpace"
15
+ ]
16
+ },
17
+ "createFolder": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "properties": {
21
+ "folderId": {
22
+ "$ref": "#/$defs/folderPath"
23
+ }
24
+ },
25
+ "required": [
26
+ "folderId"
27
+ ]
28
+ },
29
+ "sessionRequest": {
30
+ "type": "object",
31
+ "properties": {
32
+ "folderId": {
33
+ "$ref": "#/$defs/folderPath"
34
+ },
35
+ "expectedIncarnation": {
36
+ "type": "string",
37
+ "minLength": 1
38
+ }
39
+ },
40
+ "required": [
41
+ "folderId"
42
+ ],
43
+ "additionalProperties": false
44
+ },
45
+ "folder": {
46
+ "type": "object",
47
+ "properties": {
48
+ "id": {
49
+ "$ref": "#/$defs/folderPath"
50
+ },
51
+ "system": {
52
+ "type": "boolean"
53
+ },
54
+ "usedBytes": {
55
+ "$ref": "#/$defs/decimalU64"
56
+ },
57
+ "reservedBytes": {
58
+ "$ref": "#/$defs/decimalU64"
59
+ },
60
+ "objectCount": {
61
+ "$ref": "#/$defs/decimalU64"
62
+ },
63
+ "createdAtMs": {
64
+ "$ref": "#/$defs/decimalU64"
65
+ },
66
+ "updatedAtMs": {
67
+ "$ref": "#/$defs/decimalU64"
68
+ },
69
+ "deleting": {
70
+ "type": "boolean"
71
+ },
72
+ "quota": {
73
+ "$ref": "#/$defs/folderQuota"
74
+ }
75
+ },
76
+ "required": [
77
+ "id",
78
+ "system",
79
+ "usedBytes",
80
+ "reservedBytes",
81
+ "objectCount",
82
+ "createdAtMs",
83
+ "updatedAtMs",
84
+ "deleting",
85
+ "quota"
86
+ ],
87
+ "additionalProperties": false
88
+ },
89
+ "object": {
90
+ "type": "object",
91
+ "properties": {
92
+ "key": {
93
+ "type": "string"
94
+ },
95
+ "objectId": {
96
+ "type": "string"
97
+ },
98
+ "sizeBytes": {
99
+ "type": "integer",
100
+ "minimum": 0,
101
+ "maximum": 18446744073709551615
102
+ },
103
+ "sha256": {
104
+ "type": "string",
105
+ "pattern": "^[0-9a-f]{64}$"
106
+ },
107
+ "contentType": {
108
+ "type": [
109
+ "string",
110
+ "null"
111
+ ]
112
+ },
113
+ "committedAtMs": {
114
+ "type": "integer",
115
+ "minimum": 0,
116
+ "maximum": 18446744073709551615
117
+ }
118
+ },
119
+ "required": [
120
+ "key",
121
+ "objectId",
122
+ "sizeBytes",
123
+ "sha256",
124
+ "contentType",
125
+ "committedAtMs"
126
+ ],
127
+ "additionalProperties": false
128
+ },
129
+ "objectList": {
130
+ "type": "object",
131
+ "properties": {
132
+ "objects": {
133
+ "type": "array",
134
+ "items": {
135
+ "$ref": "#/$defs/object"
136
+ }
137
+ },
138
+ "nextCursor": {
139
+ "type": [
140
+ "string",
141
+ "null"
142
+ ]
143
+ }
144
+ },
145
+ "required": [
146
+ "objects",
147
+ "nextCursor"
148
+ ],
149
+ "additionalProperties": false
150
+ },
151
+ "blob": {
152
+ "type": "object",
153
+ "properties": {
154
+ "id": {
155
+ "type": "string"
156
+ },
157
+ "sizeBytes": {
158
+ "type": "integer",
159
+ "minimum": 0,
160
+ "maximum": 18446744073709551615
161
+ },
162
+ "sha256": {
163
+ "type": "string",
164
+ "pattern": "^[0-9a-f]{64}$"
165
+ }
166
+ },
167
+ "required": [
168
+ "id",
169
+ "sizeBytes",
170
+ "sha256"
171
+ ],
172
+ "additionalProperties": false
173
+ },
174
+ "capacity": {
175
+ "type": "object",
176
+ "properties": {
177
+ "repositoryId": {
178
+ "type": "string"
179
+ },
180
+ "volumeId": {
181
+ "type": "string"
182
+ },
183
+ "totalBytes": {
184
+ "type": "integer",
185
+ "minimum": 0,
186
+ "maximum": 18446744073709551615
187
+ },
188
+ "availableBytes": {
189
+ "type": "integer",
190
+ "minimum": 0,
191
+ "maximum": 18446744073709551615
192
+ },
193
+ "stopAtAvailableBytes": {
194
+ "type": "integer",
195
+ "minimum": 0,
196
+ "maximum": 18446744073709551615
197
+ },
198
+ "warningAtAvailableBytes": {
199
+ "type": "integer",
200
+ "minimum": 0,
201
+ "maximum": 18446744073709551615
202
+ }
203
+ },
204
+ "required": [
205
+ "repositoryId",
206
+ "volumeId",
207
+ "totalBytes",
208
+ "availableBytes",
209
+ "stopAtAvailableBytes",
210
+ "warningAtAvailableBytes"
211
+ ],
212
+ "additionalProperties": false
213
+ },
214
+ "error": {
215
+ "type": "object",
216
+ "properties": {
217
+ "code": {
218
+ "enum": [
219
+ "INVALID_INPUT",
220
+ "NOT_FOUND",
221
+ "CONFLICT",
222
+ "VOLUME_FULL",
223
+ "INTEGRITY",
224
+ "UNAUTHORIZED",
225
+ "UNAVAILABLE",
226
+ "SCOPE_REMOVING",
227
+ "SYSTEM_FOLDER_PROTECTED",
228
+ "REPOSITORY_IDENTITY_MISMATCH",
229
+ "PROTOCOL_MISMATCH",
230
+ "INTERNAL",
231
+ "SESSION_EXPIRED",
232
+ "QUOTA_EXCEEDED"
233
+ ]
234
+ },
235
+ "detail": {
236
+ "type": "string"
237
+ },
238
+ "outcome": {
239
+ "enum": [
240
+ "notApplied",
241
+ "partial",
242
+ "unknown"
243
+ ]
244
+ },
245
+ "deletedObjects": {
246
+ "type": "integer",
247
+ "minimum": 0,
248
+ "maximum": 18446744073709551615
249
+ }
250
+ },
251
+ "required": [
252
+ "code",
253
+ "detail",
254
+ "outcome"
255
+ ],
256
+ "additionalProperties": false
257
+ },
258
+ "folderIdRequest": {
259
+ "type": "object",
260
+ "properties": {
261
+ "folderId": {
262
+ "$ref": "#/$defs/folderPath"
263
+ }
264
+ },
265
+ "required": [
266
+ "folderId"
267
+ ],
268
+ "additionalProperties": false
269
+ },
270
+ "folderList": {
271
+ "type": "object",
272
+ "properties": {
273
+ "folders": {
274
+ "type": "array",
275
+ "items": {
276
+ "$ref": "#/$defs/folder"
277
+ }
278
+ }
279
+ },
280
+ "required": [
281
+ "folders"
282
+ ],
283
+ "additionalProperties": false
284
+ },
285
+ "filesystemCapacity": {
286
+ "type": "object",
287
+ "properties": {
288
+ "totalBytes": {
289
+ "$ref": "#/$defs/decimalU64"
290
+ },
291
+ "availableBytes": {
292
+ "$ref": "#/$defs/decimalU64"
293
+ }
294
+ },
295
+ "required": [
296
+ "totalBytes",
297
+ "availableBytes"
298
+ ],
299
+ "additionalProperties": false
300
+ },
301
+ "usage": {
302
+ "type": "object",
303
+ "properties": {
304
+ "usedBytes": {
305
+ "$ref": "#/$defs/decimalU64"
306
+ },
307
+ "reservedBytes": {
308
+ "$ref": "#/$defs/decimalU64"
309
+ },
310
+ "writableBytes": {
311
+ "$ref": "#/$defs/decimalU64"
312
+ }
313
+ },
314
+ "required": [
315
+ "usedBytes",
316
+ "reservedBytes",
317
+ "writableBytes"
318
+ ],
319
+ "additionalProperties": false
320
+ },
321
+ "safety": {
322
+ "type": "object",
323
+ "properties": {
324
+ "warningAtAvailableBytes": {
325
+ "$ref": "#/$defs/decimalU64"
326
+ },
327
+ "stopAtAvailableBytes": {
328
+ "$ref": "#/$defs/decimalU64"
329
+ }
330
+ },
331
+ "required": [
332
+ "warningAtAvailableBytes",
333
+ "stopAtAvailableBytes"
334
+ ],
335
+ "additionalProperties": false
336
+ },
337
+ "backend": {
338
+ "type": "object",
339
+ "properties": {
340
+ "kind": {
341
+ "enum": [
342
+ "internal",
343
+ "external"
344
+ ]
345
+ },
346
+ "repositoryId": {
347
+ "type": "string"
348
+ },
349
+ "online": {
350
+ "type": "boolean"
351
+ },
352
+ "capacity": {
353
+ "anyOf": [
354
+ {
355
+ "$ref": "#/$defs/filesystemCapacity"
356
+ },
357
+ {
358
+ "type": "null"
359
+ }
360
+ ]
361
+ }
362
+ },
363
+ "required": [
364
+ "kind",
365
+ "repositoryId",
366
+ "online",
367
+ "capacity"
368
+ ],
369
+ "additionalProperties": false
370
+ },
371
+ "overview": {
372
+ "type": "object",
373
+ "properties": {
374
+ "backends": {
375
+ "type": "array",
376
+ "items": {
377
+ "$ref": "#/$defs/backend"
378
+ }
379
+ },
380
+ "protocolVersion": {
381
+ "const": "storage.v1"
382
+ },
383
+ "writeState": {
384
+ "$ref": "#/$defs/writeState"
385
+ },
386
+ "writeAvailable": {
387
+ "type": "boolean"
388
+ },
389
+ "filesystem": {
390
+ "$ref": "#/$defs/filesystemCapacity"
391
+ },
392
+ "storage": {
393
+ "$ref": "#/$defs/usage"
394
+ },
395
+ "safety": {
396
+ "$ref": "#/$defs/safety"
397
+ },
398
+ "folderCount": {
399
+ "$ref": "#/$defs/decimalU64"
400
+ },
401
+ "objectCount": {
402
+ "$ref": "#/$defs/decimalU64"
403
+ },
404
+ "currentSpaceFolderCount": {
405
+ "$ref": "#/$defs/decimalU64"
406
+ },
407
+ "currentSpaceObjectCount": {
408
+ "$ref": "#/$defs/decimalU64"
409
+ },
410
+ "currentSpaceUsedBytes": {
411
+ "$ref": "#/$defs/decimalU64"
412
+ },
413
+ "currentSpaceReservedBytes": {
414
+ "$ref": "#/$defs/decimalU64"
415
+ },
416
+ "otherSpacesUsedBytes": {
417
+ "$ref": "#/$defs/decimalU64"
418
+ },
419
+ "activeUploadCount": {
420
+ "$ref": "#/$defs/decimalU64"
421
+ },
422
+ "pendingDeletionCount": {
423
+ "$ref": "#/$defs/decimalU64"
424
+ }
425
+ },
426
+ "required": [
427
+ "backends",
428
+ "protocolVersion",
429
+ "writeState",
430
+ "writeAvailable",
431
+ "filesystem",
432
+ "storage",
433
+ "safety",
434
+ "folderCount",
435
+ "objectCount",
436
+ "currentSpaceFolderCount",
437
+ "currentSpaceObjectCount",
438
+ "currentSpaceUsedBytes",
439
+ "currentSpaceReservedBytes",
440
+ "otherSpacesUsedBytes",
441
+ "activeUploadCount",
442
+ "pendingDeletionCount"
443
+ ],
444
+ "additionalProperties": false
445
+ },
446
+ "folderPath": {
447
+ "type": "string",
448
+ "minLength": 1,
449
+ "maxLength": 1024,
450
+ "description": "Exact case-sensitive logical path, never normalized. At most 1024 UTF-8 bytes (validated by the service), 16 segments and 80 Unicode characters per segment; no edge whitespace, empty/dot/dot-dot segments, backslash or controls. Namespace roots are virtual; artifact is reserved.",
451
+ "pattern": "^(?:artifact|home/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?(?:/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?){0,14}|plugin/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?(?:/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?){0,12}|core/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?(?:/(?!\\.{1,2}(?:/|$))[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f](?:[^/\\\\\\x00-\\x1f\\x7f-\\x9f]{0,78}[^/\\\\\\s\\x00-\\x1f\\x7f-\\x9f])?){0,13})$"
452
+ },
453
+ "deleteFolder": {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "properties": {
457
+ "folderId": {
458
+ "$ref": "#/$defs/folderPath"
459
+ },
460
+ "recursive": {
461
+ "type": "boolean",
462
+ "default": false
463
+ }
464
+ },
465
+ "required": [
466
+ "folderId"
467
+ ]
468
+ },
469
+ "deleteFolderResponse": {
470
+ "type": "object",
471
+ "additionalProperties": false,
472
+ "properties": {
473
+ "deleted": {
474
+ "type": "boolean"
475
+ }
476
+ },
477
+ "required": [
478
+ "deleted"
479
+ ]
480
+ },
481
+ "setFolderLimit": {
482
+ "type": "object",
483
+ "additionalProperties": false,
484
+ "properties": {
485
+ "folderId": {
486
+ "$ref": "#/$defs/folderPath"
487
+ },
488
+ "maxBytes": {
489
+ "anyOf": [
490
+ {
491
+ "type": "string",
492
+ "pattern": "^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-6]|9223372036854775807)$"
493
+ },
494
+ {
495
+ "type": "null"
496
+ }
497
+ ]
498
+ }
499
+ },
500
+ "required": [
501
+ "folderId",
502
+ "maxBytes"
503
+ ]
504
+ },
505
+ "folderQuota": {
506
+ "type": "object",
507
+ "additionalProperties": false,
508
+ "properties": {
509
+ "maxBytes": {
510
+ "anyOf": [
511
+ {
512
+ "$ref": "#/$defs/decimalU64"
513
+ },
514
+ {
515
+ "type": "null"
516
+ }
517
+ ]
518
+ },
519
+ "usedBytes": {
520
+ "$ref": "#/$defs/decimalU64"
521
+ },
522
+ "reservedBytes": {
523
+ "$ref": "#/$defs/decimalU64"
524
+ },
525
+ "remainingBytes": {
526
+ "anyOf": [
527
+ {
528
+ "$ref": "#/$defs/decimalU64"
529
+ },
530
+ {
531
+ "type": "null"
532
+ }
533
+ ]
534
+ },
535
+ "exceeded": {
536
+ "type": "boolean"
537
+ }
538
+ },
539
+ "required": [
540
+ "maxBytes",
541
+ "usedBytes",
542
+ "reservedBytes",
543
+ "remainingBytes",
544
+ "exceeded"
545
+ ]
546
+ }
547
+ }
548
+ }