@k2b/cloud 0.23.0 → 0.24.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 (45) hide show
  1. package/package.json +2 -2
  2. package/src/_internal/capabilities.ts +230 -75
  3. package/src/_internal/define-app.ts +12 -3
  4. package/src/_internal/fixtures/filesv2-manifest-cloud-v0.29.0.json +887 -0
  5. package/src/_internal/page-responses.ts +1 -1
  6. package/src/_internal/registry.ts +78 -3
  7. package/src/ai/chat/blocks.tsx +2 -1
  8. package/src/ai/chat/messages.ts +6 -0
  9. package/src/ai/client/controller.ts +65 -20
  10. package/src/ai/client/transport.ts +5 -5
  11. package/src/ai/code-mode-skill.ts +2 -2
  12. package/src/ai/index.ts +0 -7
  13. package/src/ai/live-events.ts +1 -262
  14. package/src/ai/live.ts +31 -2
  15. package/src/ai/migrate.ts +35 -16
  16. package/src/ai/runtime.ts +1 -6
  17. package/src/ai/solid.ts +0 -5
  18. package/src/api/help.ts +2 -2
  19. package/src/api/pwa-phone.ts +10 -3
  20. package/src/api/search/schemas.ts +34 -0
  21. package/src/api/search.ts +118 -50
  22. package/src/browser/CloudResourceSearch.browser-harness.tsx +11 -0
  23. package/src/browser/CloudResourceSearch.tsx +208 -80
  24. package/src/browser/resource-search-messages.ts +15 -2
  25. package/src/browser/search-stream.ts +151 -0
  26. package/src/contracts/capabilities.ts +89 -24
  27. package/src/contracts/capability-compatibility.ts +28 -14
  28. package/src/contracts/file-provider.ts +158 -0
  29. package/src/contracts/index.ts +1 -0
  30. package/src/events/live-engine.ts +11 -7
  31. package/src/events/live.ts +32 -32
  32. package/src/server/help.ts +3 -3
  33. package/src/services/index.ts +1 -1
  34. package/src/services/outbox.ts +29 -115
  35. package/src/services/pdf/markdown.ts +22 -2
  36. package/src/services/pwa-devices.ts +74 -8
  37. package/src/shared/markdown/formula.ts +122 -26
  38. package/src/shared/markdown/index.ts +27 -14
  39. package/src/ssr/PwaLayout.tsx +2 -1
  40. package/src/styles/resource-search.css +19 -0
  41. package/src/ai/client/live-connection.ts +0 -141
  42. package/src/ai/live-messages.ts +0 -45
  43. package/src/ai/live-outbox.ts +0 -102
  44. package/src/ai/live-routes.ts +0 -412
  45. package/src/shared/markdown/extensions/info-blocks.ts +0 -79
@@ -0,0 +1,887 @@
1
+ {
2
+ "protocolVersion": 2,
3
+ "appId": "filesv2",
4
+ "manifestHash": "c0ccc3b2c8736e8a9a94e3d4bf37a48ce6f9bfd084bb79a48bd3015c90f04822",
5
+ "types": [
6
+ {
7
+ "localId": "entry",
8
+ "title": "File or folder",
9
+ "description": "One file or folder in an accessible Cloud or FreeIPA storage base.",
10
+ "icon": "ti ti-folders",
11
+ "reader": "entry.read"
12
+ }
13
+ ],
14
+ "queries": [
15
+ {
16
+ "localId": "bases.list",
17
+ "title": "List storage bases",
18
+ "description": "List accessible homes and group storage. Use the returned base IDs for browsing; unavailable bases include their state.",
19
+ "inputSchema": {
20
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
21
+ "type": "object",
22
+ "properties": {
23
+ "after": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." }
24
+ },
25
+ "additionalProperties": false
26
+ },
27
+ "dataSchema": {
28
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
29
+ "type": "object",
30
+ "properties": {
31
+ "items": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "properties": {
36
+ "id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
37
+ "name": { "type": "string" },
38
+ "area": { "type": "string", "enum": ["cloud", "freeipa"] },
39
+ "kind": { "type": "string", "enum": ["users", "groups"] },
40
+ "status": { "type": "string" }
41
+ },
42
+ "required": ["id", "name", "area", "kind", "status"],
43
+ "additionalProperties": false
44
+ }
45
+ },
46
+ "next": { "type": ["string", "null"] }
47
+ },
48
+ "required": ["items", "next"],
49
+ "additionalProperties": false
50
+ },
51
+ "schemaHash": "6e94a0f7aa333d68e16f2b3c287867e80092549222c287750615f2c6f4c88996",
52
+ "openWorld": false
53
+ },
54
+ {
55
+ "localId": "content.download",
56
+ "title": "Get file download link",
57
+ "description": "Request a direct single-file download lease only when the user downloads a filesv2.entry from listing or search. Rechecks current access. Returns a bearer URL valid for 60 seconds; never store it in a list or shared data. Use content.read for processing bytes in code.",
58
+ "inputSchema": {
59
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
60
+ "type": "object",
61
+ "properties": {
62
+ "id": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "maxLength": 512,
66
+ "description": "Exact ID from a filesv2.entry ref returned by listing or search."
67
+ }
68
+ },
69
+ "required": ["id"],
70
+ "additionalProperties": false
71
+ },
72
+ "dataSchema": {
73
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
74
+ "type": "object",
75
+ "properties": {
76
+ "url": {
77
+ "type": "string",
78
+ "description": "Private bearer URL from the download service. Use unchanged without Cloud credentials."
79
+ },
80
+ "method": { "type": "string", "const": "GET" },
81
+ "expires": { "type": "string", "description": "Lease expiry timestamp returned by storage. Request a fresh lease after expiry." }
82
+ },
83
+ "required": ["url", "method", "expires"],
84
+ "additionalProperties": false
85
+ },
86
+ "schemaHash": "0811b86f2bc2e69d792fc6003c8b4dc1167b5f8a74c6c56e5d29dcd43b630ff1",
87
+ "openWorld": false
88
+ },
89
+ {
90
+ "localId": "content.read",
91
+ "title": "Read file content",
92
+ "description": "Open one file as an authenticated binary stream. Use its filesv2.entry ID from search or listing. No text truncation.",
93
+ "inputSchema": {
94
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
95
+ "type": "object",
96
+ "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Entry ID from listing or search." } },
97
+ "required": ["id"],
98
+ "additionalProperties": false
99
+ },
100
+ "dataSchema": {
101
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
102
+ "type": "object",
103
+ "properties": {
104
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
105
+ "entry": {
106
+ "type": "object",
107
+ "properties": {
108
+ "name": { "type": "string" },
109
+ "path": { "type": "string" },
110
+ "directory": { "type": "boolean" },
111
+ "size": { "type": "number" },
112
+ "modified": { "type": "string" },
113
+ "revision": { "type": "string" },
114
+ "ref": {
115
+ "type": "object",
116
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
117
+ "required": ["type", "id"],
118
+ "additionalProperties": false
119
+ }
120
+ },
121
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
122
+ "additionalProperties": false
123
+ },
124
+ "uploadId": { "type": "string" }
125
+ },
126
+ "required": ["baseId"],
127
+ "additionalProperties": false
128
+ },
129
+ "stream": { "direction": "read", "maxBytes": 52428800 },
130
+ "schemaHash": "ac3dc9ffe3df386efc0f5e14960da4018e714aad59129539641c832cb439f5e3",
131
+ "openWorld": false
132
+ },
133
+ {
134
+ "localId": "entry.list",
135
+ "title": "List folder entries",
136
+ "description": "Read one page of immediate children of a known folder. Continue with next until null, including empty filtered pages.",
137
+ "inputSchema": {
138
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
139
+ "type": "object",
140
+ "properties": {
141
+ "sort": {
142
+ "default": "name",
143
+ "description": "Sort entries by this field.",
144
+ "type": "string",
145
+ "enum": ["name", "modified", "size"]
146
+ },
147
+ "order": { "default": "asc", "description": "Ascending or descending order.", "type": "string", "enum": ["asc", "desc"] },
148
+ "type": {
149
+ "default": "all",
150
+ "description": "Include all entries, files or directories.",
151
+ "type": "string",
152
+ "enum": ["all", "files", "directories"]
153
+ },
154
+ "groupFolders": {
155
+ "description": "Group directories before files.",
156
+ "anyOf": [{ "type": "boolean" }, { "type": "string", "enum": ["true", "false"] }]
157
+ },
158
+ "path": { "default": "", "description": "Folder path relative to the storage base.", "type": "string", "maxLength": 4096 },
159
+ "after": { "description": "Cursor from the previous page; omit for the first page.", "type": "string", "maxLength": 16384 },
160
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." }
161
+ },
162
+ "required": ["baseId"],
163
+ "additionalProperties": false
164
+ },
165
+ "dataSchema": {
166
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
167
+ "type": "object",
168
+ "properties": {
169
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
170
+ "path": { "type": "string", "maxLength": 4096, "description": "Path relative to this storage base; empty means its root." },
171
+ "items": {
172
+ "type": "array",
173
+ "items": {
174
+ "type": "object",
175
+ "properties": {
176
+ "name": { "type": "string" },
177
+ "path": { "type": "string" },
178
+ "directory": { "type": "boolean" },
179
+ "size": { "type": "number" },
180
+ "modified": { "type": "string" },
181
+ "revision": { "type": "string" },
182
+ "ref": {
183
+ "type": "object",
184
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
185
+ "required": ["type", "id"],
186
+ "additionalProperties": false
187
+ }
188
+ },
189
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
190
+ "additionalProperties": false
191
+ }
192
+ },
193
+ "next": { "type": ["string", "null"] }
194
+ },
195
+ "required": ["baseId", "path", "items", "next"],
196
+ "additionalProperties": false
197
+ },
198
+ "schemaHash": "39d084b2ed129fffbcb2417113761de66b6f8608ca921b812e37148c762afad4",
199
+ "openWorld": false
200
+ },
201
+ {
202
+ "localId": "entry.read",
203
+ "title": "Read file entry",
204
+ "description": "Read the current metadata of one filesv2.entry ref after checking access.",
205
+ "inputSchema": {
206
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
207
+ "type": "object",
208
+ "properties": {
209
+ "id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Entry ID from a filesv2.entry ref or search result." }
210
+ },
211
+ "required": ["id"],
212
+ "additionalProperties": false
213
+ },
214
+ "dataSchema": {
215
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
216
+ "type": "object",
217
+ "properties": {
218
+ "id": { "type": "string" },
219
+ "base": {
220
+ "type": "object",
221
+ "properties": {
222
+ "id": { "type": "string" },
223
+ "name": { "type": "string" },
224
+ "area": { "type": "string", "enum": ["cloud", "freeipa"] }
225
+ },
226
+ "required": ["id", "name", "area"],
227
+ "additionalProperties": false
228
+ },
229
+ "path": { "type": "string" },
230
+ "name": { "type": "string" },
231
+ "directory": { "type": "boolean" },
232
+ "size": { "type": "number" },
233
+ "modified": { "type": "string" },
234
+ "revision": { "type": "string" },
235
+ "href": { "type": "string" }
236
+ },
237
+ "required": ["id", "base", "path", "name", "directory", "size", "modified", "href"],
238
+ "additionalProperties": false
239
+ },
240
+ "schemaHash": "c51da9502a28decbea84d5b2408a86dcd61eb580216e7062fba4a617985f1b30",
241
+ "openWorld": false
242
+ },
243
+ {
244
+ "localId": "entry.search",
245
+ "title": "Search files",
246
+ "description": "Find file and folder names in up to 10 accessible storage bases, one bounded source page each. The summary reports omitted bases or further results; browse Files for complete results.",
247
+ "inputSchema": {
248
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
249
+ "type": "object",
250
+ "properties": {
251
+ "query": {
252
+ "type": "string",
253
+ "maxLength": 500,
254
+ "description": "User-entered search text. Empty text is allowed when a facet narrows the query."
255
+ },
256
+ "tags": {
257
+ "maxItems": 20,
258
+ "type": "array",
259
+ "items": { "type": "string", "minLength": 1, "maxLength": 64 },
260
+ "description": "Canonical search facets supported by this query."
261
+ },
262
+ "scope": {
263
+ "description": "Optional resource containing the search results; must be an explicitly supported scope type.",
264
+ "type": "object",
265
+ "properties": {
266
+ "type": {
267
+ "type": "string",
268
+ "minLength": 3,
269
+ "maxLength": 180,
270
+ "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
271
+ "description": "Namespaced resource type declared by the owning app."
272
+ },
273
+ "id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Stable app-owned resource identifier." }
274
+ },
275
+ "required": ["type", "id"],
276
+ "additionalProperties": false
277
+ },
278
+ "limit": { "type": "integer", "minimum": 1, "maximum": 100, "description": "Maximum number of results to return." }
279
+ },
280
+ "required": ["query", "tags", "limit"],
281
+ "additionalProperties": false
282
+ },
283
+ "dataSchema": {
284
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
285
+ "maxItems": 100,
286
+ "type": "array",
287
+ "items": {
288
+ "type": "object",
289
+ "properties": {
290
+ "ref": {
291
+ "type": "object",
292
+ "properties": {
293
+ "type": {
294
+ "type": "string",
295
+ "minLength": 3,
296
+ "maxLength": 180,
297
+ "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
298
+ "description": "Namespaced resource type declared by the owning app."
299
+ },
300
+ "id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Stable app-owned resource identifier." }
301
+ },
302
+ "required": ["type", "id"],
303
+ "additionalProperties": false,
304
+ "description": "Stable identity of the result."
305
+ },
306
+ "title": { "type": "string", "minLength": 1, "maxLength": 500, "description": "Primary result label." },
307
+ "preview": { "description": "Short plain-text result preview.", "type": "string", "maxLength": 2000 },
308
+ "icon": { "description": "Optional presentation icon.", "type": "string", "minLength": 1, "maxLength": 120 },
309
+ "priority": { "description": "App-local relevance hint from zero to nine.", "type": "integer", "minimum": 0, "maximum": 9 },
310
+ "metadata": {
311
+ "description": "Small structured metadata shown with the result.",
312
+ "maxItems": 20,
313
+ "type": "array",
314
+ "items": {
315
+ "type": "object",
316
+ "properties": {
317
+ "label": { "type": "string", "minLength": 1, "maxLength": 120 },
318
+ "value": { "type": "string", "maxLength": 1000 }
319
+ },
320
+ "required": ["label", "value"],
321
+ "additionalProperties": false
322
+ }
323
+ },
324
+ "links": {
325
+ "minItems": 1,
326
+ "maxItems": 10,
327
+ "type": "array",
328
+ "items": {
329
+ "type": "object",
330
+ "properties": {
331
+ "rel": {
332
+ "type": "string",
333
+ "enum": ["open", "edit", "status", "preview", "download"],
334
+ "description": "Semantic relationship; clients decide how to present it."
335
+ },
336
+ "href": {
337
+ "type": "string",
338
+ "minLength": 1,
339
+ "maxLength": 2048,
340
+ "pattern": "^\\/(?![\\\\/])[^\\\\\\u0000-\\u001f\\u007f]*$",
341
+ "description": "Root-relative Cloud URL."
342
+ },
343
+ "title": { "description": "Optional human-readable link label.", "type": "string", "minLength": 1, "maxLength": 120 }
344
+ },
345
+ "required": ["rel", "href"],
346
+ "additionalProperties": false
347
+ },
348
+ "description": "Semantic links for the resource."
349
+ }
350
+ },
351
+ "required": ["ref", "title", "links"],
352
+ "additionalProperties": false
353
+ }
354
+ },
355
+ "schemaHash": "5b78e710d3729f50c18b549cedce82e88fbd22757c37d87a0e245682c8d1608e",
356
+ "openWorld": false,
357
+ "universalSearch": {
358
+ "tags": [
359
+ { "tag": "file", "title": "Files", "description": "Search file and folder names.", "aliases": ["files", "folder", "folders"] }
360
+ ]
361
+ }
362
+ },
363
+ {
364
+ "localId": "entry.search-in-base",
365
+ "title": "Search within storage",
366
+ "description": "Find names in one known storage base or folder, with complete cursor traversal. Does not search file contents.",
367
+ "inputSchema": {
368
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
369
+ "type": "object",
370
+ "properties": {
371
+ "sort": {
372
+ "default": "name",
373
+ "description": "Sort entries by this field.",
374
+ "type": "string",
375
+ "enum": ["name", "modified", "size"]
376
+ },
377
+ "order": { "default": "asc", "description": "Ascending or descending order.", "type": "string", "enum": ["asc", "desc"] },
378
+ "type": {
379
+ "default": "all",
380
+ "description": "Include all entries, files or directories.",
381
+ "type": "string",
382
+ "enum": ["all", "files", "directories"]
383
+ },
384
+ "groupFolders": {
385
+ "description": "Group directories before files.",
386
+ "anyOf": [{ "type": "boolean" }, { "type": "string", "enum": ["true", "false"] }]
387
+ },
388
+ "path": { "default": "", "description": "Folder path relative to the storage base.", "type": "string", "maxLength": 4096 },
389
+ "after": { "description": "Cursor from the previous page; omit for the first page.", "type": "string", "maxLength": 16384 },
390
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
391
+ "q": { "type": "string", "minLength": 1, "maxLength": 500, "description": "File or folder name to find." }
392
+ },
393
+ "required": ["baseId", "q"],
394
+ "additionalProperties": false
395
+ },
396
+ "dataSchema": {
397
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
398
+ "type": "object",
399
+ "properties": {
400
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
401
+ "path": { "type": "string", "maxLength": 4096, "description": "Path relative to this storage base; empty means its root." },
402
+ "items": {
403
+ "type": "array",
404
+ "items": {
405
+ "type": "object",
406
+ "properties": {
407
+ "name": { "type": "string" },
408
+ "path": { "type": "string" },
409
+ "directory": { "type": "boolean" },
410
+ "size": { "type": "number" },
411
+ "modified": { "type": "string" },
412
+ "revision": { "type": "string" },
413
+ "ref": {
414
+ "type": "object",
415
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
416
+ "required": ["type", "id"],
417
+ "additionalProperties": false
418
+ }
419
+ },
420
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
421
+ "additionalProperties": false
422
+ }
423
+ },
424
+ "next": { "type": ["string", "null"] }
425
+ },
426
+ "required": ["baseId", "path", "items", "next"],
427
+ "additionalProperties": false
428
+ },
429
+ "schemaHash": "0136c2ee602012f9a34ca5ec6359d899c96f87080565036e7386bcf4a1b7476c",
430
+ "openWorld": false
431
+ },
432
+ {
433
+ "localId": "trash.list",
434
+ "title": "List trash",
435
+ "description": "List one page of recoverable entries; next is the cursor for the following page.",
436
+ "inputSchema": {
437
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
438
+ "type": "object",
439
+ "properties": {
440
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
441
+ "after": { "description": "Cursor returned by the previous page.", "type": "string", "maxLength": 16384 }
442
+ },
443
+ "required": ["baseId"],
444
+ "additionalProperties": false
445
+ },
446
+ "dataSchema": {
447
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
448
+ "type": "object",
449
+ "properties": {
450
+ "base": {
451
+ "type": "object",
452
+ "properties": {
453
+ "id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
454
+ "name": { "type": "string" }
455
+ },
456
+ "required": ["id", "name"],
457
+ "additionalProperties": false
458
+ },
459
+ "entries": {
460
+ "type": "array",
461
+ "items": {
462
+ "type": "object",
463
+ "properties": {
464
+ "id": { "type": "string" },
465
+ "original": { "type": ["string", "null"] },
466
+ "name": { "type": "string" },
467
+ "directory": { "type": "boolean" },
468
+ "deletedAt": { "type": ["string", "null"] },
469
+ "state": { "type": "string" },
470
+ "error": { "type": "string" }
471
+ },
472
+ "required": ["id", "original", "name", "directory", "deletedAt"],
473
+ "additionalProperties": false
474
+ }
475
+ },
476
+ "next": { "type": ["string", "null"] }
477
+ },
478
+ "required": ["base", "entries", "next"],
479
+ "additionalProperties": false
480
+ },
481
+ "schemaHash": "93a0becb3dd94d8e9569af5db9be425b7975941ce5270520e507577c0219313d",
482
+ "openWorld": false
483
+ }
484
+ ],
485
+ "actions": [
486
+ {
487
+ "localId": "content.create",
488
+ "title": "Write file content",
489
+ "description": "Prepare one binary upload at an exact base-relative path. Default: create only. Replacing requires an expectedRevision obtained from current metadata.",
490
+ "inputSchema": {
491
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
492
+ "type": "object",
493
+ "properties": {
494
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
495
+ "path": {
496
+ "type": "string",
497
+ "minLength": 1,
498
+ "maxLength": 4096,
499
+ "description": "Path relative to this storage base; empty means its root."
500
+ },
501
+ "size": { "type": "integer", "minimum": 0, "maximum": 52428800, "description": "Exact byte count of the new content." },
502
+ "mediaType": {
503
+ "default": "application/octet-stream",
504
+ "description": "Media type of the binary payload.",
505
+ "type": "string",
506
+ "minLength": 1,
507
+ "maxLength": 255,
508
+ "pattern": "^[\\x20-\\x7e]+$"
509
+ },
510
+ "onConflict": {
511
+ "default": "error",
512
+ "description": "Create only, or explicitly replace an existing file.",
513
+ "type": "string",
514
+ "enum": ["error", "overwrite"]
515
+ },
516
+ "expectedRevision": {
517
+ "description": "Current revision from entry metadata; required when replacing.",
518
+ "type": "string",
519
+ "maxLength": 512
520
+ }
521
+ },
522
+ "required": ["baseId", "path", "size"],
523
+ "additionalProperties": false
524
+ },
525
+ "dataSchema": {
526
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
527
+ "type": "object",
528
+ "properties": {
529
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
530
+ "entry": {
531
+ "type": "object",
532
+ "properties": {
533
+ "name": { "type": "string" },
534
+ "path": { "type": "string" },
535
+ "directory": { "type": "boolean" },
536
+ "size": { "type": "number" },
537
+ "modified": { "type": "string" },
538
+ "revision": { "type": "string" },
539
+ "ref": {
540
+ "type": "object",
541
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
542
+ "required": ["type", "id"],
543
+ "additionalProperties": false
544
+ }
545
+ },
546
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
547
+ "additionalProperties": false
548
+ },
549
+ "uploadId": { "type": "string" }
550
+ },
551
+ "required": ["baseId"],
552
+ "additionalProperties": false
553
+ },
554
+ "stream": { "direction": "write", "maxBytes": 52428800 },
555
+ "schemaHash": "430a1090607fafcf1e615eb72c46b8ead4a210c0ade55bbefc4fa6a77ce6dea7",
556
+ "destructive": false,
557
+ "openWorld": false,
558
+ "idempotency": "required",
559
+ "review": true
560
+ },
561
+ {
562
+ "localId": "entry.copy",
563
+ "title": "Copy entry",
564
+ "description": "Copy entry using current storage permissions. Existing targets are not overwritten.",
565
+ "inputSchema": {
566
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
567
+ "type": "object",
568
+ "properties": {
569
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
570
+ "path": {
571
+ "type": "string",
572
+ "minLength": 1,
573
+ "maxLength": 4096,
574
+ "description": "Path relative to this storage base; empty means its root."
575
+ },
576
+ "targetBaseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
577
+ "folder": { "type": "string", "maxLength": 4096, "description": "Path relative to this storage base; empty means its root." }
578
+ },
579
+ "required": ["baseId", "path", "targetBaseId", "folder"],
580
+ "additionalProperties": false
581
+ },
582
+ "dataSchema": {
583
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
584
+ "type": "object",
585
+ "properties": {
586
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
587
+ "entry": {
588
+ "type": "object",
589
+ "properties": {
590
+ "name": { "type": "string" },
591
+ "path": { "type": "string" },
592
+ "directory": { "type": "boolean" },
593
+ "size": { "type": "number" },
594
+ "modified": { "type": "string" },
595
+ "revision": { "type": "string" },
596
+ "ref": {
597
+ "type": "object",
598
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
599
+ "required": ["type", "id"],
600
+ "additionalProperties": false
601
+ }
602
+ },
603
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
604
+ "additionalProperties": false
605
+ },
606
+ "uploadId": { "type": "string" }
607
+ },
608
+ "required": ["baseId"],
609
+ "additionalProperties": false
610
+ },
611
+ "schemaHash": "9b3dfa05b556872d7901348310f7f0c843c56023336c455b3e4c34bd4b0a770d",
612
+ "destructive": false,
613
+ "openWorld": false,
614
+ "idempotency": "required",
615
+ "review": true
616
+ },
617
+ {
618
+ "localId": "entry.move",
619
+ "title": "Move entry",
620
+ "description": "Move entry using current storage permissions. Existing targets are not overwritten.",
621
+ "inputSchema": {
622
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
623
+ "type": "object",
624
+ "properties": {
625
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
626
+ "path": {
627
+ "type": "string",
628
+ "minLength": 1,
629
+ "maxLength": 4096,
630
+ "description": "Path relative to this storage base; empty means its root."
631
+ },
632
+ "folder": { "type": "string", "maxLength": 4096, "description": "Path relative to this storage base; empty means its root." }
633
+ },
634
+ "required": ["baseId", "path", "folder"],
635
+ "additionalProperties": false
636
+ },
637
+ "dataSchema": {
638
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
639
+ "type": "object",
640
+ "properties": {
641
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
642
+ "entry": {
643
+ "type": "object",
644
+ "properties": {
645
+ "name": { "type": "string" },
646
+ "path": { "type": "string" },
647
+ "directory": { "type": "boolean" },
648
+ "size": { "type": "number" },
649
+ "modified": { "type": "string" },
650
+ "revision": { "type": "string" },
651
+ "ref": {
652
+ "type": "object",
653
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
654
+ "required": ["type", "id"],
655
+ "additionalProperties": false
656
+ }
657
+ },
658
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
659
+ "additionalProperties": false
660
+ },
661
+ "uploadId": { "type": "string" }
662
+ },
663
+ "required": ["baseId"],
664
+ "additionalProperties": false
665
+ },
666
+ "schemaHash": "9c8d60a357000660edd2f33909fee8f61b5bcfda8b52a408057cdf27eeda355b",
667
+ "destructive": false,
668
+ "openWorld": false,
669
+ "idempotency": "required",
670
+ "review": true
671
+ },
672
+ {
673
+ "localId": "entry.rename",
674
+ "title": "Rename entry",
675
+ "description": "Rename entry using current storage permissions. Existing targets are not overwritten.",
676
+ "inputSchema": {
677
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
678
+ "type": "object",
679
+ "properties": {
680
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
681
+ "path": {
682
+ "type": "string",
683
+ "minLength": 1,
684
+ "maxLength": 4096,
685
+ "description": "Path relative to this storage base; empty means its root."
686
+ },
687
+ "name": { "type": "string", "minLength": 1, "maxLength": 255, "description": "New name without directory separators." }
688
+ },
689
+ "required": ["baseId", "path", "name"],
690
+ "additionalProperties": false
691
+ },
692
+ "dataSchema": {
693
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
694
+ "type": "object",
695
+ "properties": {
696
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
697
+ "entry": {
698
+ "type": "object",
699
+ "properties": {
700
+ "name": { "type": "string" },
701
+ "path": { "type": "string" },
702
+ "directory": { "type": "boolean" },
703
+ "size": { "type": "number" },
704
+ "modified": { "type": "string" },
705
+ "revision": { "type": "string" },
706
+ "ref": {
707
+ "type": "object",
708
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
709
+ "required": ["type", "id"],
710
+ "additionalProperties": false
711
+ }
712
+ },
713
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
714
+ "additionalProperties": false
715
+ },
716
+ "uploadId": { "type": "string" }
717
+ },
718
+ "required": ["baseId"],
719
+ "additionalProperties": false
720
+ },
721
+ "schemaHash": "a909f361be13b7efd561e81ded4ddec7d54855b659a4a8e48516a39d2e71c4bf",
722
+ "destructive": false,
723
+ "openWorld": false,
724
+ "idempotency": "required",
725
+ "review": true
726
+ },
727
+ {
728
+ "localId": "entry.trash",
729
+ "title": "Move entry to trash",
730
+ "description": "Move entry to trash using current storage permissions. Existing targets are not overwritten.",
731
+ "inputSchema": {
732
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
733
+ "type": "object",
734
+ "properties": {
735
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
736
+ "path": {
737
+ "type": "string",
738
+ "minLength": 1,
739
+ "maxLength": 4096,
740
+ "description": "Path relative to this storage base; empty means its root."
741
+ }
742
+ },
743
+ "required": ["baseId", "path"],
744
+ "additionalProperties": false
745
+ },
746
+ "dataSchema": {
747
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
748
+ "type": "object",
749
+ "properties": {
750
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
751
+ "entry": {
752
+ "type": "object",
753
+ "properties": {
754
+ "name": { "type": "string" },
755
+ "path": { "type": "string" },
756
+ "directory": { "type": "boolean" },
757
+ "size": { "type": "number" },
758
+ "modified": { "type": "string" },
759
+ "revision": { "type": "string" },
760
+ "ref": {
761
+ "type": "object",
762
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
763
+ "required": ["type", "id"],
764
+ "additionalProperties": false
765
+ }
766
+ },
767
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
768
+ "additionalProperties": false
769
+ },
770
+ "uploadId": { "type": "string" }
771
+ },
772
+ "required": ["baseId"],
773
+ "additionalProperties": false
774
+ },
775
+ "schemaHash": "d67937f6a14aabe9bdf0416308d12a4c23499c11af68ed2f94aba09df911d2da",
776
+ "destructive": false,
777
+ "openWorld": false,
778
+ "idempotency": "required",
779
+ "review": true
780
+ },
781
+ {
782
+ "localId": "folder.create",
783
+ "title": "Create folder",
784
+ "description": "Create folder using current storage permissions. Existing targets are not overwritten.",
785
+ "inputSchema": {
786
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
787
+ "type": "object",
788
+ "properties": {
789
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
790
+ "path": {
791
+ "type": "string",
792
+ "minLength": 1,
793
+ "maxLength": 4096,
794
+ "description": "Path relative to this storage base; empty means its root."
795
+ }
796
+ },
797
+ "required": ["baseId", "path"],
798
+ "additionalProperties": false
799
+ },
800
+ "dataSchema": {
801
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
802
+ "type": "object",
803
+ "properties": {
804
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
805
+ "entry": {
806
+ "type": "object",
807
+ "properties": {
808
+ "name": { "type": "string" },
809
+ "path": { "type": "string" },
810
+ "directory": { "type": "boolean" },
811
+ "size": { "type": "number" },
812
+ "modified": { "type": "string" },
813
+ "revision": { "type": "string" },
814
+ "ref": {
815
+ "type": "object",
816
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
817
+ "required": ["type", "id"],
818
+ "additionalProperties": false
819
+ }
820
+ },
821
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
822
+ "additionalProperties": false
823
+ },
824
+ "uploadId": { "type": "string" }
825
+ },
826
+ "required": ["baseId"],
827
+ "additionalProperties": false
828
+ },
829
+ "schemaHash": "d67937f6a14aabe9bdf0416308d12a4c23499c11af68ed2f94aba09df911d2da",
830
+ "destructive": false,
831
+ "openWorld": false,
832
+ "idempotency": "required",
833
+ "review": true
834
+ },
835
+ {
836
+ "localId": "trash.restore",
837
+ "title": "Restore entry from trash",
838
+ "description": "Restore entry from trash using current storage permissions. Existing targets are not overwritten.",
839
+ "inputSchema": {
840
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
841
+ "type": "object",
842
+ "properties": {
843
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
844
+ "id": { "type": "string", "maxLength": 5500, "description": "ID returned by trash.list." },
845
+ "path": { "type": "string", "maxLength": 4096, "description": "Path relative to this storage base; empty means its root." }
846
+ },
847
+ "required": ["baseId", "id"],
848
+ "additionalProperties": false
849
+ },
850
+ "dataSchema": {
851
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
852
+ "type": "object",
853
+ "properties": {
854
+ "baseId": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Exact base ID returned by bases.list." },
855
+ "entry": {
856
+ "type": "object",
857
+ "properties": {
858
+ "name": { "type": "string" },
859
+ "path": { "type": "string" },
860
+ "directory": { "type": "boolean" },
861
+ "size": { "type": "number" },
862
+ "modified": { "type": "string" },
863
+ "revision": { "type": "string" },
864
+ "ref": {
865
+ "type": "object",
866
+ "properties": { "type": { "type": "string", "const": "filesv2.entry" }, "id": { "type": "string" } },
867
+ "required": ["type", "id"],
868
+ "additionalProperties": false
869
+ }
870
+ },
871
+ "required": ["name", "path", "directory", "size", "modified", "ref"],
872
+ "additionalProperties": false
873
+ },
874
+ "uploadId": { "type": "string" }
875
+ },
876
+ "required": ["baseId"],
877
+ "additionalProperties": false
878
+ },
879
+ "schemaHash": "704bb9a1bb1e2107d01d118d382a9025c1101bff4e6db876f7b508e0be3a48ec",
880
+ "destructive": false,
881
+ "openWorld": false,
882
+ "idempotency": "required",
883
+ "review": true
884
+ }
885
+ ],
886
+ "commands": []
887
+ }