@ai-switch/tauri-plugin-runtime 0.1.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 (77) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +327 -0
  3. package/THIRD_PARTY_NOTICES.md +210 -0
  4. package/dist/bridge/handshake.d.ts +11 -0
  5. package/dist/bridge/json-codec.d.ts +4 -0
  6. package/dist/bridge/rpc-peer.d.ts +7 -0
  7. package/dist/bridge/rpc-types.d.ts +20 -0
  8. package/dist/chunk-CFQSUF5W.js +1794 -0
  9. package/dist/chunk-JSBRDJBE.js +30 -0
  10. package/dist/chunk-K5YWIJN6.js +389 -0
  11. package/dist/chunk-PW7XHHWG.js +403 -0
  12. package/dist/chunk-RKQEK7DY.js +13879 -0
  13. package/dist/chunk-WT62GTMC.js +18 -0
  14. package/dist/chunk-YI6NQ6WR.js +513 -0
  15. package/dist/host/event-router.d.ts +19 -0
  16. package/dist/host/file-handles.d.ts +15 -0
  17. package/dist/host/host.d.ts +2 -0
  18. package/dist/host/index.d.ts +4 -0
  19. package/dist/host/index.js +791 -0
  20. package/dist/host/policy.d.ts +7 -0
  21. package/dist/host/requests.d.ts +13 -0
  22. package/dist/host/types.d.ts +19 -0
  23. package/dist/host/view.d.ts +18 -0
  24. package/dist/index.d.ts +2 -0
  25. package/dist/index.js +9 -0
  26. package/dist/node/buffer.d.ts +7 -0
  27. package/dist/node/buffer.js +8 -0
  28. package/dist/node/events.d.ts +12 -0
  29. package/dist/node/events.js +458 -0
  30. package/dist/node/fs/backend.d.ts +8 -0
  31. package/dist/node/fs/callback-types.d.ts +43 -0
  32. package/dist/node/fs/callbacks.d.ts +3 -0
  33. package/dist/node/fs/client.d.ts +3 -0
  34. package/dist/node/fs/errors.d.ts +5 -0
  35. package/dist/node/fs/lifecycle.d.ts +11 -0
  36. package/dist/node/fs/options.d.ts +7 -0
  37. package/dist/node/fs/promises.d.ts +33 -0
  38. package/dist/node/fs/promises.js +30 -0
  39. package/dist/node/fs/transfer.d.ts +7 -0
  40. package/dist/node/fs/types.d.ts +86 -0
  41. package/dist/node/fs.d.ts +36 -0
  42. package/dist/node/fs.js +92 -0
  43. package/dist/node/path.d.ts +20 -0
  44. package/dist/node/path.js +434 -0
  45. package/dist/plugin/client.d.ts +4 -0
  46. package/dist/plugin/connection.d.ts +6 -0
  47. package/dist/plugin/errors.d.ts +3 -0
  48. package/dist/plugin/index.d.ts +6 -0
  49. package/dist/plugin/index.js +12 -0
  50. package/dist/plugin/types.d.ts +28 -0
  51. package/dist/protocol/capabilities.d.ts +8 -0
  52. package/dist/protocol/errors.d.ts +14 -0
  53. package/dist/protocol/generated/capabilities.generated.d.ts +56 -0
  54. package/dist/protocol/generated/fs.generated.d.ts +178 -0
  55. package/dist/protocol/generated/host-event.generated.d.ts +17 -0
  56. package/dist/protocol/generated/manifest.generated.d.ts +64 -0
  57. package/dist/protocol/generated/session.generated.d.ts +93 -0
  58. package/dist/protocol/generated/types.generated.d.ts +6 -0
  59. package/dist/protocol/generated/validators.generated.d.mts +24 -0
  60. package/dist/protocol/generated/wire.generated.d.ts +63 -0
  61. package/dist/protocol/index.d.ts +18 -0
  62. package/dist/protocol/index.js +746 -0
  63. package/dist/protocol/json-safety.d.ts +3 -0
  64. package/dist/protocol/limits.d.ts +11 -0
  65. package/dist/protocol/manifest.d.ts +5 -0
  66. package/dist/protocol/path-policy.d.ts +2 -0
  67. package/dist/protocol/schema/capabilities.schema.json +301 -0
  68. package/dist/protocol/schema/fs.schema.json +900 -0
  69. package/dist/protocol/schema/host-event.schema.json +116 -0
  70. package/dist/protocol/schema/manifest.schema.json +60 -0
  71. package/dist/protocol/schema/session.schema.json +145 -0
  72. package/dist/protocol/schema/wire.schema.json +358 -0
  73. package/dist/protocol/session.d.ts +3 -0
  74. package/dist/protocol/types.d.ts +27 -0
  75. package/dist/protocol/validation.d.ts +2 -0
  76. package/dist/protocol/wire.d.ts +16 -0
  77. package/package.json +95 -0
@@ -0,0 +1,746 @@
1
+ import {
2
+ AplgError,
3
+ capabilities_schema_default,
4
+ errorCodes,
5
+ fs_schema_default,
6
+ normalizeArchivePath,
7
+ parseManifest,
8
+ satisfiesApiRange,
9
+ standardCapabilities,
10
+ toErrorPayload,
11
+ validateCapabilityRequest,
12
+ validateCapabilityResult,
13
+ validateHostEvent,
14
+ validateManifest,
15
+ validateSessionDescriptor,
16
+ validateVirtualPath,
17
+ validateWireMessage
18
+ } from "../chunk-RKQEK7DY.js";
19
+ import {
20
+ apiVersion,
21
+ limits,
22
+ protocolVersion
23
+ } from "../chunk-WT62GTMC.js";
24
+ import "../chunk-JSBRDJBE.js";
25
+
26
+ // src/protocol/schema/manifest.schema.json
27
+ var manifest_schema_default = {
28
+ $schema: "http://json-schema.org/draft-07/schema#",
29
+ $id: "https://ai-switch.github.io/aplg/schema/v1/manifest.schema.json",
30
+ title: "Manifest",
31
+ type: "object",
32
+ additionalProperties: false,
33
+ required: ["manifestVersion", "id", "name", "version", "description", "license", "engines", "entry", "activation", "requires", "optional", "permissions", "contributes"],
34
+ properties: {
35
+ manifestVersion: { const: 1 },
36
+ id: { type: "string", minLength: 3, maxLength: 160, pattern: "^[a-z0-9]+(?:[.-][a-z0-9]+)+$" },
37
+ name: { type: "string", minLength: 1, maxLength: 160 },
38
+ version: { type: "string", minLength: 1, maxLength: 128 },
39
+ description: { type: "string", maxLength: 8192 },
40
+ license: { type: "string", minLength: 1, maxLength: 256 },
41
+ engines: { type: "object", additionalProperties: false, required: ["aplg"], properties: { aplg: { $ref: "#/definitions/range" } } },
42
+ entry: { type: "string", minLength: 1, maxLength: 1024 },
43
+ activation: { const: "view" },
44
+ requires: { $ref: "#/definitions/capabilityRanges" },
45
+ optional: { $ref: "#/definitions/capabilityRanges" },
46
+ permissions: {
47
+ type: "object",
48
+ additionalProperties: false,
49
+ required: ["filesystem", "network", "native"],
50
+ properties: {
51
+ filesystem: {
52
+ type: "array",
53
+ maxItems: 2,
54
+ items: { type: "object", additionalProperties: false, required: ["root", "access"], properties: {
55
+ root: { enum: ["plugin-data", "user-selected"] },
56
+ access: { type: "array", minItems: 1, maxItems: 2, uniqueItems: true, items: { enum: ["read", "write"] } }
57
+ } }
58
+ },
59
+ network: {
60
+ type: "array",
61
+ maxItems: 64,
62
+ items: { type: "object", additionalProperties: false, required: ["origins", "methods"], properties: {
63
+ origins: { type: "array", minItems: 1, maxItems: 64, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 2048 } },
64
+ methods: { type: "array", minItems: 1, maxItems: 9, uniqueItems: true, items: { enum: ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "CONNECT", "TRACE"] } }
65
+ } }
66
+ },
67
+ native: { type: "boolean" }
68
+ }
69
+ },
70
+ contributes: {
71
+ type: "object",
72
+ additionalProperties: false,
73
+ required: ["views"],
74
+ properties: { views: { type: "array", minItems: 1, maxItems: 32, items: {
75
+ type: "object",
76
+ additionalProperties: false,
77
+ required: ["id", "title"],
78
+ properties: { id: { type: "string", pattern: "^[a-z0-9][a-z0-9-]{0,63}$" }, title: { type: "string", minLength: 1, maxLength: 160 } }
79
+ } } }
80
+ },
81
+ extensions: { type: "object", maxProperties: 64, propertyNames: { $ref: "#/definitions/capabilityName" }, additionalProperties: { $ref: "#/definitions/jsonValue" } }
82
+ },
83
+ definitions: {
84
+ range: { type: "string", minLength: 1, maxLength: 128 },
85
+ capabilityName: { type: "string", minLength: 3, maxLength: 128, pattern: "^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)+$" },
86
+ capabilityRanges: { type: "object", maxProperties: 128, propertyNames: { $ref: "#/definitions/capabilityName" }, additionalProperties: { $ref: "#/definitions/range" } },
87
+ jsonValue: { anyOf: [
88
+ { type: "null" },
89
+ { type: "boolean" },
90
+ { type: "number" },
91
+ { type: "string" },
92
+ { type: "array", items: { $ref: "#/definitions/jsonValue" } },
93
+ { type: "object", additionalProperties: { $ref: "#/definitions/jsonValue" } }
94
+ ] }
95
+ }
96
+ };
97
+
98
+ // src/protocol/schema/wire.schema.json
99
+ var wire_schema_default = {
100
+ $schema: "http://json-schema.org/draft-07/schema#",
101
+ $id: "https://ai-switch.github.io/aplg/schema/v1/wire.schema.json",
102
+ title: "WireMessage",
103
+ oneOf: [
104
+ {
105
+ type: "object",
106
+ additionalProperties: false,
107
+ required: [
108
+ "protocol",
109
+ "kind",
110
+ "id",
111
+ "operation",
112
+ "args"
113
+ ],
114
+ properties: {
115
+ protocol: {
116
+ const: "aplg/1"
117
+ },
118
+ kind: {
119
+ const: "request"
120
+ },
121
+ id: {
122
+ type: "string",
123
+ minLength: 1,
124
+ maxLength: 128,
125
+ pattern: "^[\\x21-\\x7e]+$"
126
+ },
127
+ operation: {
128
+ const: "capability.call"
129
+ },
130
+ args: {
131
+ type: "object",
132
+ additionalProperties: false,
133
+ required: [
134
+ "capability",
135
+ "method",
136
+ "params"
137
+ ],
138
+ properties: {
139
+ capability: {
140
+ type: "string",
141
+ minLength: 3,
142
+ maxLength: 128,
143
+ pattern: "^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)+$"
144
+ },
145
+ method: {
146
+ type: "string",
147
+ minLength: 1,
148
+ maxLength: 128,
149
+ pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
150
+ },
151
+ params: {
152
+ $ref: "#/definitions/jsonValue"
153
+ }
154
+ }
155
+ }
156
+ }
157
+ },
158
+ {
159
+ type: "object",
160
+ additionalProperties: false,
161
+ required: [
162
+ "protocol",
163
+ "kind",
164
+ "id",
165
+ "operation",
166
+ "args"
167
+ ],
168
+ properties: {
169
+ protocol: {
170
+ const: "aplg/1"
171
+ },
172
+ kind: {
173
+ const: "request"
174
+ },
175
+ id: {
176
+ type: "string",
177
+ minLength: 1,
178
+ maxLength: 128,
179
+ pattern: "^[\\x21-\\x7e]+$"
180
+ },
181
+ operation: {
182
+ const: "subscription.open"
183
+ },
184
+ args: {
185
+ type: "object",
186
+ additionalProperties: false,
187
+ required: [
188
+ "capability",
189
+ "topic"
190
+ ],
191
+ properties: {
192
+ capability: {
193
+ type: "string",
194
+ minLength: 3,
195
+ maxLength: 128,
196
+ pattern: "^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)+$"
197
+ },
198
+ topic: {
199
+ type: "string",
200
+ minLength: 1,
201
+ maxLength: 128,
202
+ pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
203
+ }
204
+ }
205
+ }
206
+ }
207
+ },
208
+ {
209
+ type: "object",
210
+ additionalProperties: false,
211
+ required: [
212
+ "protocol",
213
+ "kind",
214
+ "id",
215
+ "operation",
216
+ "args"
217
+ ],
218
+ properties: {
219
+ protocol: {
220
+ const: "aplg/1"
221
+ },
222
+ kind: {
223
+ const: "request"
224
+ },
225
+ id: {
226
+ type: "string",
227
+ minLength: 1,
228
+ maxLength: 128,
229
+ pattern: "^[\\x21-\\x7e]+$"
230
+ },
231
+ operation: {
232
+ const: "subscription.close"
233
+ },
234
+ args: {
235
+ type: "object",
236
+ additionalProperties: false,
237
+ required: [
238
+ "subscriptionId"
239
+ ],
240
+ properties: {
241
+ subscriptionId: {
242
+ type: "string",
243
+ minLength: 1,
244
+ maxLength: 128,
245
+ pattern: "^[\\x21-\\x7e]+$"
246
+ }
247
+ }
248
+ }
249
+ }
250
+ },
251
+ {
252
+ type: "object",
253
+ additionalProperties: false,
254
+ required: [
255
+ "protocol",
256
+ "kind",
257
+ "id",
258
+ "operation",
259
+ "args"
260
+ ],
261
+ properties: {
262
+ protocol: {
263
+ const: "aplg/1"
264
+ },
265
+ kind: {
266
+ const: "request"
267
+ },
268
+ id: {
269
+ type: "string",
270
+ minLength: 1,
271
+ maxLength: 128,
272
+ pattern: "^[\\x21-\\x7e]+$"
273
+ },
274
+ operation: {
275
+ const: "request.cancel"
276
+ },
277
+ args: {
278
+ type: "object",
279
+ additionalProperties: false,
280
+ required: [
281
+ "requestId"
282
+ ],
283
+ properties: {
284
+ requestId: {
285
+ type: "string",
286
+ minLength: 1,
287
+ maxLength: 128,
288
+ pattern: "^[\\x21-\\x7e]+$"
289
+ }
290
+ }
291
+ }
292
+ }
293
+ },
294
+ {
295
+ type: "object",
296
+ additionalProperties: false,
297
+ required: [
298
+ "protocol",
299
+ "kind",
300
+ "id",
301
+ "value"
302
+ ],
303
+ properties: {
304
+ protocol: {
305
+ const: "aplg/1"
306
+ },
307
+ kind: {
308
+ const: "result"
309
+ },
310
+ id: {
311
+ type: "string",
312
+ minLength: 1,
313
+ maxLength: 128,
314
+ pattern: "^[\\x21-\\x7e]+$"
315
+ },
316
+ value: {
317
+ $ref: "#/definitions/jsonValue"
318
+ }
319
+ }
320
+ },
321
+ {
322
+ type: "object",
323
+ additionalProperties: false,
324
+ required: [
325
+ "protocol",
326
+ "kind",
327
+ "id",
328
+ "error"
329
+ ],
330
+ properties: {
331
+ protocol: {
332
+ const: "aplg/1"
333
+ },
334
+ kind: {
335
+ const: "error"
336
+ },
337
+ id: {
338
+ type: "string",
339
+ minLength: 1,
340
+ maxLength: 128,
341
+ pattern: "^[\\x21-\\x7e]+$"
342
+ },
343
+ error: {
344
+ type: "object",
345
+ additionalProperties: false,
346
+ required: [
347
+ "code",
348
+ "message"
349
+ ],
350
+ properties: {
351
+ code: {
352
+ type: "string",
353
+ minLength: 1,
354
+ maxLength: 128,
355
+ pattern: "^[A-Z][A-Z0-9_]*$"
356
+ },
357
+ message: {
358
+ type: "string",
359
+ maxLength: 8192
360
+ },
361
+ details: {
362
+ $ref: "#/definitions/jsonValue"
363
+ }
364
+ }
365
+ }
366
+ }
367
+ },
368
+ {
369
+ type: "object",
370
+ additionalProperties: false,
371
+ required: [
372
+ "protocol",
373
+ "kind",
374
+ "subscriptionId",
375
+ "seq",
376
+ "payload"
377
+ ],
378
+ properties: {
379
+ protocol: {
380
+ const: "aplg/1"
381
+ },
382
+ kind: {
383
+ const: "event"
384
+ },
385
+ subscriptionId: {
386
+ type: "string",
387
+ minLength: 1,
388
+ maxLength: 128,
389
+ pattern: "^[\\x21-\\x7e]+$"
390
+ },
391
+ seq: {
392
+ type: "integer",
393
+ minimum: 1,
394
+ maximum: 9007199254740991
395
+ },
396
+ payload: {
397
+ $ref: "#/definitions/jsonValue"
398
+ }
399
+ }
400
+ },
401
+ {
402
+ type: "object",
403
+ additionalProperties: false,
404
+ required: [
405
+ "protocol",
406
+ "kind",
407
+ "state"
408
+ ],
409
+ properties: {
410
+ protocol: {
411
+ const: "aplg/1"
412
+ },
413
+ kind: {
414
+ const: "connection"
415
+ },
416
+ state: {
417
+ enum: [
418
+ "connected",
419
+ "disconnected",
420
+ "closed"
421
+ ]
422
+ }
423
+ }
424
+ }
425
+ ],
426
+ definitions: {
427
+ jsonValue: {
428
+ anyOf: [
429
+ {
430
+ type: "null"
431
+ },
432
+ {
433
+ type: "boolean"
434
+ },
435
+ {
436
+ type: "number"
437
+ },
438
+ {
439
+ type: "string"
440
+ },
441
+ {
442
+ type: "array",
443
+ items: {
444
+ $ref: "#/definitions/jsonValue"
445
+ }
446
+ },
447
+ {
448
+ type: "object",
449
+ additionalProperties: {
450
+ $ref: "#/definitions/jsonValue"
451
+ }
452
+ }
453
+ ]
454
+ }
455
+ }
456
+ };
457
+
458
+ // src/protocol/schema/session.schema.json
459
+ var session_schema_default = {
460
+ $schema: "http://json-schema.org/draft-07/schema#",
461
+ $id: "https://ai-switch.github.io/aplg/schema/v1/session.schema.json",
462
+ title: "SessionDescriptor",
463
+ type: "object",
464
+ additionalProperties: false,
465
+ required: [
466
+ "sessionId",
467
+ "manifest",
468
+ "assetUrl",
469
+ "info"
470
+ ],
471
+ properties: {
472
+ sessionId: {
473
+ type: "string",
474
+ minLength: 1,
475
+ maxLength: 128,
476
+ pattern: "^[\\x21-\\x7e]+$"
477
+ },
478
+ manifest: {
479
+ $ref: "manifest.schema.json"
480
+ },
481
+ assetUrl: {
482
+ type: "string",
483
+ minLength: 1,
484
+ maxLength: 8192
485
+ },
486
+ info: {
487
+ type: "object",
488
+ additionalProperties: false,
489
+ required: [
490
+ "protocol",
491
+ "apiVersion",
492
+ "plugin",
493
+ "capabilities",
494
+ "limits"
495
+ ],
496
+ properties: {
497
+ protocol: {
498
+ const: "aplg/1"
499
+ },
500
+ apiVersion: {
501
+ type: "string",
502
+ minLength: 1,
503
+ maxLength: 128
504
+ },
505
+ plugin: {
506
+ type: "object",
507
+ additionalProperties: false,
508
+ required: [
509
+ "id",
510
+ "version",
511
+ "packageSha256"
512
+ ],
513
+ properties: {
514
+ id: {
515
+ type: "string",
516
+ minLength: 3,
517
+ maxLength: 160,
518
+ pattern: "^[a-z0-9]+(?:[.-][a-z0-9]+)+$"
519
+ },
520
+ version: {
521
+ type: "string",
522
+ minLength: 1,
523
+ maxLength: 128
524
+ },
525
+ packageSha256: {
526
+ type: "string",
527
+ pattern: "^[a-f0-9]{64}$"
528
+ }
529
+ }
530
+ },
531
+ capabilities: {
532
+ type: "object",
533
+ maxProperties: 128,
534
+ propertyNames: {
535
+ type: "string",
536
+ minLength: 3,
537
+ maxLength: 128,
538
+ pattern: "^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)+$"
539
+ },
540
+ additionalProperties: {
541
+ type: "object",
542
+ additionalProperties: false,
543
+ required: [
544
+ "version",
545
+ "methods"
546
+ ],
547
+ properties: {
548
+ version: {
549
+ type: "string",
550
+ minLength: 1,
551
+ maxLength: 128
552
+ },
553
+ methods: {
554
+ type: "array",
555
+ maxItems: 128,
556
+ minItems: 1,
557
+ uniqueItems: true,
558
+ items: {
559
+ type: "string",
560
+ minLength: 1,
561
+ maxLength: 128,
562
+ pattern: "^[a-zA-Z][a-zA-Z0-9_.-]*$"
563
+ }
564
+ }
565
+ }
566
+ }
567
+ },
568
+ limits: {
569
+ type: "object",
570
+ additionalProperties: false,
571
+ required: [
572
+ "controlBytes",
573
+ "fileChunkBytes",
574
+ "fileBytes",
575
+ "fileTransfers"
576
+ ],
577
+ properties: {
578
+ controlBytes: {
579
+ type: "integer",
580
+ minimum: 1,
581
+ maximum: 1048576
582
+ },
583
+ fileChunkBytes: {
584
+ type: "integer",
585
+ minimum: 1,
586
+ maximum: 262144
587
+ },
588
+ fileBytes: {
589
+ type: "integer",
590
+ minimum: 1,
591
+ maximum: 8388608
592
+ },
593
+ fileTransfers: {
594
+ type: "integer",
595
+ minimum: 1,
596
+ maximum: 2
597
+ }
598
+ }
599
+ }
600
+ }
601
+ }
602
+ }
603
+ };
604
+
605
+ // src/protocol/schema/host-event.schema.json
606
+ var host_event_schema_default = {
607
+ $schema: "http://json-schema.org/draft-07/schema#",
608
+ $id: "https://ai-switch.github.io/aplg/schema/v1/host-event.schema.json",
609
+ title: "HostEvent",
610
+ oneOf: [
611
+ {
612
+ type: "object",
613
+ additionalProperties: false,
614
+ required: [
615
+ "kind",
616
+ "sessionId",
617
+ "subscriptionId",
618
+ "seq",
619
+ "payload"
620
+ ],
621
+ properties: {
622
+ kind: {
623
+ const: "capability.event"
624
+ },
625
+ sessionId: {
626
+ type: "string",
627
+ minLength: 1,
628
+ maxLength: 128,
629
+ pattern: "^[\\x21-\\x7e]+$"
630
+ },
631
+ subscriptionId: {
632
+ type: "string",
633
+ minLength: 1,
634
+ maxLength: 128,
635
+ pattern: "^[\\x21-\\x7e]+$"
636
+ },
637
+ seq: {
638
+ type: "integer",
639
+ minimum: 1,
640
+ maximum: 9007199254740991
641
+ },
642
+ payload: {
643
+ $ref: "#/definitions/jsonValue"
644
+ }
645
+ }
646
+ },
647
+ {
648
+ type: "object",
649
+ additionalProperties: false,
650
+ required: [
651
+ "kind",
652
+ "sessionId",
653
+ "reason"
654
+ ],
655
+ properties: {
656
+ kind: {
657
+ const: "session.closed"
658
+ },
659
+ sessionId: {
660
+ type: "string",
661
+ minLength: 1,
662
+ maxLength: 128,
663
+ pattern: "^[\\x21-\\x7e]+$"
664
+ },
665
+ reason: {
666
+ type: "string",
667
+ maxLength: 8192
668
+ }
669
+ }
670
+ },
671
+ {
672
+ type: "object",
673
+ additionalProperties: false,
674
+ required: [
675
+ "kind",
676
+ "state"
677
+ ],
678
+ properties: {
679
+ kind: {
680
+ const: "transport.state"
681
+ },
682
+ state: {
683
+ enum: [
684
+ "connected",
685
+ "disconnected"
686
+ ]
687
+ }
688
+ }
689
+ }
690
+ ],
691
+ definitions: {
692
+ jsonValue: {
693
+ anyOf: [
694
+ {
695
+ type: "null"
696
+ },
697
+ {
698
+ type: "boolean"
699
+ },
700
+ {
701
+ type: "number"
702
+ },
703
+ {
704
+ type: "string"
705
+ },
706
+ {
707
+ type: "array",
708
+ items: {
709
+ $ref: "#/definitions/jsonValue"
710
+ }
711
+ },
712
+ {
713
+ type: "object",
714
+ additionalProperties: {
715
+ $ref: "#/definitions/jsonValue"
716
+ }
717
+ }
718
+ ]
719
+ }
720
+ }
721
+ };
722
+ export {
723
+ AplgError,
724
+ apiVersion,
725
+ capabilities_schema_default as capabilitySchema,
726
+ errorCodes,
727
+ fs_schema_default as fsSchema,
728
+ host_event_schema_default as hostEventSchema,
729
+ limits,
730
+ manifest_schema_default as manifestSchema,
731
+ normalizeArchivePath,
732
+ parseManifest,
733
+ protocolVersion,
734
+ satisfiesApiRange,
735
+ session_schema_default as sessionSchema,
736
+ standardCapabilities,
737
+ toErrorPayload,
738
+ validateCapabilityRequest,
739
+ validateCapabilityResult,
740
+ validateHostEvent,
741
+ validateManifest,
742
+ validateSessionDescriptor,
743
+ validateVirtualPath,
744
+ validateWireMessage,
745
+ wire_schema_default as wireSchema
746
+ };