@floegence/redevplugin-contracts 3.23.2 → 3.24.1

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.
@@ -71,15 +71,12 @@ export const repositoryIndexJSONSchema = {
71
71
  "type": "object",
72
72
  "additionalProperties": false,
73
73
  "required": [
74
- "plugin_id",
74
+ "slug",
75
75
  "path",
76
76
  "manifest",
77
77
  "release"
78
78
  ],
79
79
  "properties": {
80
- "plugin_id": {
81
- "$ref": "#/$defs/identifier"
82
- },
83
80
  "path": {
84
81
  "$ref": "#/$defs/relativePath"
85
82
  },
@@ -97,6 +94,12 @@ export const repositoryIndexJSONSchema = {
97
94
  },
98
95
  "release": {
99
96
  "$ref": "#/$defs/release"
97
+ },
98
+ "slug": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "maxLength": 80,
102
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
100
103
  }
101
104
  }
102
105
  },
@@ -163,3 +166,2272 @@ export const repositoryIdentityJSONSchema = {
163
166
  }
164
167
  }
165
168
  };
169
+ export const sourceManifestJSONSchema = {
170
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
171
+ "$id": "https://schemas.redevplugin.dev/plugin-api/1/source-manifest.schema.json",
172
+ "title": "ReDevPlugin author source manifest",
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": [
176
+ "schema_version",
177
+ "plugin",
178
+ "api",
179
+ "permissions",
180
+ "presentation",
181
+ "surfaces",
182
+ "workers",
183
+ "methods"
184
+ ],
185
+ "properties": {
186
+ "schema_version": {
187
+ "const": "redevplugin.source.v1"
188
+ },
189
+ "publisher": {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": [],
193
+ "properties": {
194
+ "display_name": {
195
+ "type": "string",
196
+ "minLength": 1,
197
+ "maxLength": 128
198
+ }
199
+ }
200
+ },
201
+ "plugin": {
202
+ "type": "object",
203
+ "additionalProperties": false,
204
+ "required": [
205
+ "slug",
206
+ "display_name",
207
+ "version"
208
+ ],
209
+ "properties": {
210
+ "display_name": {
211
+ "type": "string",
212
+ "minLength": 1,
213
+ "maxLength": 128
214
+ },
215
+ "version": {
216
+ "$ref": "#/$defs/semver"
217
+ },
218
+ "slug": {
219
+ "type": "string",
220
+ "minLength": 1,
221
+ "maxLength": 80,
222
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
223
+ }
224
+ }
225
+ },
226
+ "presentation": {
227
+ "type": "object",
228
+ "additionalProperties": false,
229
+ "required": [
230
+ "locales"
231
+ ],
232
+ "properties": {
233
+ "locales": {
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "required": [
237
+ "default"
238
+ ],
239
+ "properties": {
240
+ "default": {
241
+ "$ref": "#/$defs/locale"
242
+ }
243
+ }
244
+ },
245
+ "icon": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": [
249
+ "path"
250
+ ],
251
+ "properties": {
252
+ "path": {
253
+ "type": "string",
254
+ "minLength": 1,
255
+ "maxLength": 512
256
+ }
257
+ }
258
+ }
259
+ }
260
+ },
261
+ "surfaces": {
262
+ "type": "array",
263
+ "items": {
264
+ "type": "object",
265
+ "additionalProperties": false,
266
+ "required": [
267
+ "surface_id",
268
+ "kind",
269
+ "label",
270
+ "entry",
271
+ "web"
272
+ ],
273
+ "properties": {
274
+ "surface_id": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ },
278
+ "kind": {
279
+ "enum": [
280
+ "view",
281
+ "command",
282
+ "background"
283
+ ]
284
+ },
285
+ "intent": {
286
+ "enum": [
287
+ "primary",
288
+ "secondary",
289
+ "utility"
290
+ ]
291
+ },
292
+ "label": {
293
+ "type": "string",
294
+ "minLength": 1
295
+ },
296
+ "entry": {
297
+ "type": "string",
298
+ "minLength": 1
299
+ },
300
+ "icon": {
301
+ "type": "string",
302
+ "minLength": 1,
303
+ "pattern": "^[A-Za-z0-9_][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_][A-Za-z0-9_.-]*)*\\.(?:[Pp][Nn][Gg]|[Jj][Pp][Gg]|[Jj][Pp][Ee][Gg]|[Gg][Ii][Ff]|[Ww][Ee][Bb][Pp]|[Ii][Cc][Oo])$"
304
+ },
305
+ "default_size": {
306
+ "type": "object",
307
+ "additionalProperties": false,
308
+ "required": [
309
+ "width",
310
+ "height"
311
+ ],
312
+ "properties": {
313
+ "width": {
314
+ "type": "integer",
315
+ "minimum": 1
316
+ },
317
+ "height": {
318
+ "type": "integer",
319
+ "minimum": 1
320
+ }
321
+ }
322
+ },
323
+ "required_methods": {
324
+ "description": "Methods required to open this surface. Omitted retains aggregate authorization. An empty array allows opening without method grants; calls remain individually authorized. Requires authorization.scoped.v1.",
325
+ "type": "array",
326
+ "uniqueItems": true,
327
+ "items": {
328
+ "type": "string",
329
+ "minLength": 1
330
+ }
331
+ },
332
+ "web": {
333
+ "type": "object",
334
+ "additionalProperties": false,
335
+ "required": [
336
+ "root",
337
+ "spa"
338
+ ],
339
+ "properties": {
340
+ "root": {
341
+ "type": "string",
342
+ "minLength": 1,
343
+ "maxLength": 512
344
+ },
345
+ "spa": {
346
+ "type": "boolean"
347
+ },
348
+ "network": {
349
+ "type": "array",
350
+ "items": {
351
+ "allOf": [
352
+ {
353
+ "$ref": "#/$defs/network_access"
354
+ },
355
+ {
356
+ "properties": {
357
+ "transport": {
358
+ "enum": [
359
+ "http",
360
+ "websocket"
361
+ ]
362
+ }
363
+ }
364
+ }
365
+ ]
366
+ }
367
+ },
368
+ "storage": {
369
+ "type": "array",
370
+ "uniqueItems": true,
371
+ "items": {
372
+ "type": "object",
373
+ "additionalProperties": false,
374
+ "required": [
375
+ "store_id",
376
+ "operations"
377
+ ],
378
+ "properties": {
379
+ "store_id": {
380
+ "type": "string",
381
+ "minLength": 1,
382
+ "maxLength": 128
383
+ },
384
+ "operations": {
385
+ "type": "array",
386
+ "minItems": 1,
387
+ "uniqueItems": true,
388
+ "items": {
389
+ "enum": [
390
+ "read",
391
+ "write",
392
+ "delete",
393
+ "list",
394
+ "get",
395
+ "put",
396
+ "query",
397
+ "exec"
398
+ ]
399
+ }
400
+ }
401
+ }
402
+ }
403
+ },
404
+ "settings": {
405
+ "type": "array",
406
+ "uniqueItems": true,
407
+ "items": {
408
+ "enum": [
409
+ "get",
410
+ "patch"
411
+ ]
412
+ }
413
+ }
414
+ }
415
+ }
416
+ }
417
+ }
418
+ },
419
+ "capability_bindings": {
420
+ "type": "array",
421
+ "items": {
422
+ "type": "object",
423
+ "additionalProperties": false,
424
+ "required": [
425
+ "binding_id",
426
+ "contract"
427
+ ],
428
+ "properties": {
429
+ "binding_id": {
430
+ "type": "string",
431
+ "minLength": 1
432
+ },
433
+ "contract": {
434
+ "$ref": "host-capability-pin-v1.schema.json"
435
+ }
436
+ }
437
+ }
438
+ },
439
+ "methods": {
440
+ "type": "array",
441
+ "items": {
442
+ "type": "object",
443
+ "additionalProperties": false,
444
+ "required": [
445
+ "method",
446
+ "route"
447
+ ],
448
+ "properties": {
449
+ "method": {
450
+ "type": "string",
451
+ "minLength": 1
452
+ },
453
+ "effect": {
454
+ "enum": [
455
+ "read",
456
+ "write",
457
+ "delete",
458
+ "execute",
459
+ "admin"
460
+ ]
461
+ },
462
+ "execution": {
463
+ "enum": [
464
+ "sync",
465
+ "operation",
466
+ "subscription"
467
+ ]
468
+ },
469
+ "dangerous": {
470
+ "type": "boolean"
471
+ },
472
+ "preflight_only": {
473
+ "type": "boolean"
474
+ },
475
+ "broker_access": {
476
+ "type": "object",
477
+ "additionalProperties": false,
478
+ "properties": {
479
+ "storage": {
480
+ "type": "array",
481
+ "uniqueItems": true,
482
+ "items": {
483
+ "type": "object",
484
+ "additionalProperties": false,
485
+ "required": [
486
+ "store_id",
487
+ "operations"
488
+ ],
489
+ "properties": {
490
+ "store_id": {
491
+ "type": "string",
492
+ "minLength": 1,
493
+ "maxLength": 128
494
+ },
495
+ "operations": {
496
+ "type": "array",
497
+ "minItems": 1,
498
+ "uniqueItems": true,
499
+ "items": {
500
+ "enum": [
501
+ "read",
502
+ "write",
503
+ "delete",
504
+ "list",
505
+ "get",
506
+ "put",
507
+ "query",
508
+ "exec"
509
+ ]
510
+ }
511
+ }
512
+ }
513
+ }
514
+ },
515
+ "network": {
516
+ "type": "array",
517
+ "uniqueItems": true,
518
+ "items": {
519
+ "$ref": "#/$defs/network_access"
520
+ }
521
+ },
522
+ "process": {
523
+ "description": "Host process grants never widen authenticated read/write ceilings. Mutating operations require a non-read method and a readable, writable session; output and status operations require read access. The Host enforces this without rewriting package manifests.",
524
+ "type": "array",
525
+ "minItems": 1,
526
+ "uniqueItems": true,
527
+ "items": {
528
+ "type": "object",
529
+ "additionalProperties": false,
530
+ "required": [
531
+ "operations"
532
+ ],
533
+ "properties": {
534
+ "operations": {
535
+ "type": "array",
536
+ "minItems": 1,
537
+ "uniqueItems": true,
538
+ "items": {
539
+ "enum": [
540
+ "start",
541
+ "attach",
542
+ "status",
543
+ "write_stdin",
544
+ "close_stdin",
545
+ "read_stdout",
546
+ "read_stderr",
547
+ "wait",
548
+ "terminate",
549
+ "kill",
550
+ "close"
551
+ ]
552
+ }
553
+ }
554
+ }
555
+ }
556
+ }
557
+ }
558
+ },
559
+ "route": {
560
+ "type": "object",
561
+ "additionalProperties": false,
562
+ "required": [
563
+ "kind"
564
+ ],
565
+ "properties": {
566
+ "kind": {
567
+ "enum": [
568
+ "capability",
569
+ "worker",
570
+ "core_action",
571
+ "surface"
572
+ ]
573
+ },
574
+ "binding_id": {
575
+ "type": "string",
576
+ "minLength": 1
577
+ },
578
+ "target_method": {
579
+ "type": "string",
580
+ "minLength": 1
581
+ },
582
+ "worker_id": {
583
+ "type": "string",
584
+ "minLength": 1
585
+ },
586
+ "action_id": {
587
+ "type": "string",
588
+ "minLength": 1
589
+ },
590
+ "surface_id": {
591
+ "type": "string",
592
+ "minLength": 1
593
+ }
594
+ },
595
+ "allOf": [
596
+ {
597
+ "if": {
598
+ "properties": {
599
+ "kind": {
600
+ "const": "capability"
601
+ }
602
+ },
603
+ "required": [
604
+ "kind"
605
+ ]
606
+ },
607
+ "then": {
608
+ "required": [
609
+ "binding_id",
610
+ "target_method"
611
+ ],
612
+ "not": {
613
+ "anyOf": [
614
+ {
615
+ "required": [
616
+ "worker_id"
617
+ ]
618
+ },
619
+ {
620
+ "required": [
621
+ "action_id"
622
+ ]
623
+ },
624
+ {
625
+ "required": [
626
+ "surface_id"
627
+ ]
628
+ }
629
+ ]
630
+ }
631
+ }
632
+ },
633
+ {
634
+ "if": {
635
+ "properties": {
636
+ "kind": {
637
+ "const": "worker"
638
+ }
639
+ },
640
+ "required": [
641
+ "kind"
642
+ ]
643
+ },
644
+ "then": {
645
+ "required": [
646
+ "worker_id"
647
+ ],
648
+ "not": {
649
+ "anyOf": [
650
+ {
651
+ "required": [
652
+ "binding_id"
653
+ ]
654
+ },
655
+ {
656
+ "required": [
657
+ "target_method"
658
+ ]
659
+ },
660
+ {
661
+ "required": [
662
+ "action_id"
663
+ ]
664
+ },
665
+ {
666
+ "required": [
667
+ "surface_id"
668
+ ]
669
+ }
670
+ ]
671
+ }
672
+ }
673
+ },
674
+ {
675
+ "if": {
676
+ "properties": {
677
+ "kind": {
678
+ "const": "core_action"
679
+ }
680
+ },
681
+ "required": [
682
+ "kind"
683
+ ]
684
+ },
685
+ "then": {
686
+ "required": [
687
+ "action_id"
688
+ ],
689
+ "not": {
690
+ "anyOf": [
691
+ {
692
+ "required": [
693
+ "binding_id"
694
+ ]
695
+ },
696
+ {
697
+ "required": [
698
+ "target_method"
699
+ ]
700
+ },
701
+ {
702
+ "required": [
703
+ "worker_id"
704
+ ]
705
+ },
706
+ {
707
+ "required": [
708
+ "surface_id"
709
+ ]
710
+ }
711
+ ]
712
+ }
713
+ }
714
+ },
715
+ {
716
+ "if": {
717
+ "properties": {
718
+ "kind": {
719
+ "const": "surface"
720
+ }
721
+ },
722
+ "required": [
723
+ "kind"
724
+ ]
725
+ },
726
+ "then": {
727
+ "required": [
728
+ "surface_id"
729
+ ],
730
+ "not": {
731
+ "anyOf": [
732
+ {
733
+ "required": [
734
+ "binding_id"
735
+ ]
736
+ },
737
+ {
738
+ "required": [
739
+ "target_method"
740
+ ]
741
+ },
742
+ {
743
+ "required": [
744
+ "worker_id"
745
+ ]
746
+ },
747
+ {
748
+ "required": [
749
+ "action_id"
750
+ ]
751
+ }
752
+ ]
753
+ }
754
+ }
755
+ }
756
+ ]
757
+ },
758
+ "confirmation": {
759
+ "type": "object",
760
+ "additionalProperties": false,
761
+ "required": [
762
+ "mode"
763
+ ],
764
+ "properties": {
765
+ "mode": {
766
+ "enum": [
767
+ "none",
768
+ "required",
769
+ "risk_based"
770
+ ]
771
+ },
772
+ "preflight_method": {
773
+ "type": [
774
+ "string",
775
+ "null"
776
+ ]
777
+ },
778
+ "request_hash_fields": {
779
+ "type": "array",
780
+ "items": {
781
+ "type": "string"
782
+ }
783
+ },
784
+ "plan_hash_required": {
785
+ "type": "boolean"
786
+ }
787
+ }
788
+ },
789
+ "cancel_policy": {
790
+ "type": "object",
791
+ "additionalProperties": false,
792
+ "required": [
793
+ "cancelable"
794
+ ],
795
+ "properties": {
796
+ "cancelable": {
797
+ "type": "boolean"
798
+ },
799
+ "disable_behavior": {
800
+ "enum": [
801
+ "cancel",
802
+ "orphan",
803
+ "wait"
804
+ ]
805
+ },
806
+ "uninstall_behavior": {
807
+ "enum": [
808
+ "cancel_then_block_delete",
809
+ "force_cleanup_allowed"
810
+ ]
811
+ },
812
+ "ack_timeout_ms": {
813
+ "type": "integer",
814
+ "minimum": 0
815
+ }
816
+ },
817
+ "allOf": [
818
+ {
819
+ "if": {
820
+ "properties": {
821
+ "cancelable": {
822
+ "const": true
823
+ }
824
+ },
825
+ "required": [
826
+ "cancelable"
827
+ ]
828
+ },
829
+ "then": {
830
+ "required": [
831
+ "ack_timeout_ms"
832
+ ],
833
+ "properties": {
834
+ "ack_timeout_ms": {
835
+ "type": "integer",
836
+ "minimum": 1
837
+ }
838
+ }
839
+ }
840
+ },
841
+ {
842
+ "if": {
843
+ "properties": {
844
+ "cancelable": {
845
+ "const": false
846
+ }
847
+ },
848
+ "required": [
849
+ "cancelable"
850
+ ]
851
+ },
852
+ "then": {
853
+ "properties": {
854
+ "ack_timeout_ms": {
855
+ "const": 0
856
+ }
857
+ }
858
+ }
859
+ }
860
+ ]
861
+ },
862
+ "request_schema": {
863
+ "allOf": [
864
+ {
865
+ "$ref": "#/$defs/method_schema"
866
+ },
867
+ {
868
+ "type": "object",
869
+ "required": [
870
+ "type",
871
+ "additionalProperties"
872
+ ],
873
+ "properties": {
874
+ "type": {
875
+ "const": "object"
876
+ },
877
+ "additionalProperties": {
878
+ "const": false
879
+ }
880
+ }
881
+ }
882
+ ]
883
+ },
884
+ "response_schema": {
885
+ "allOf": [
886
+ {
887
+ "$ref": "#/$defs/method_schema"
888
+ },
889
+ {
890
+ "type": "object",
891
+ "required": [
892
+ "type",
893
+ "additionalProperties"
894
+ ],
895
+ "properties": {
896
+ "type": {
897
+ "const": "object"
898
+ },
899
+ "additionalProperties": {
900
+ "const": false
901
+ }
902
+ }
903
+ }
904
+ ]
905
+ },
906
+ "permissions": {
907
+ "description": "Explicit Worker permission ceiling. Omitted retains the package ceiling; an empty array grants no resource permissions. Requires authorization.scoped.v1.",
908
+ "type": "array",
909
+ "uniqueItems": true,
910
+ "items": {
911
+ "enum": [
912
+ "fs.workspace.read",
913
+ "fs.workspace.write",
914
+ "fs.home.read",
915
+ "fs.home.write",
916
+ "fs.environment.read",
917
+ "fs.environment.write",
918
+ "network.client",
919
+ "network.listen",
920
+ "process.local",
921
+ "fs.selected.read",
922
+ "fs.selected.write"
923
+ ]
924
+ }
925
+ }
926
+ },
927
+ "allOf": [
928
+ {
929
+ "if": {
930
+ "properties": {
931
+ "dangerous": {
932
+ "const": true
933
+ }
934
+ },
935
+ "required": [
936
+ "dangerous"
937
+ ]
938
+ },
939
+ "then": {
940
+ "required": [
941
+ "confirmation"
942
+ ],
943
+ "properties": {
944
+ "confirmation": {
945
+ "properties": {
946
+ "mode": {
947
+ "enum": [
948
+ "required",
949
+ "risk_based"
950
+ ]
951
+ }
952
+ }
953
+ }
954
+ }
955
+ }
956
+ },
957
+ {
958
+ "if": {
959
+ "properties": {
960
+ "route": {
961
+ "properties": {
962
+ "kind": {
963
+ "const": "capability"
964
+ }
965
+ },
966
+ "required": [
967
+ "kind"
968
+ ]
969
+ }
970
+ },
971
+ "required": [
972
+ "route"
973
+ ]
974
+ },
975
+ "then": {
976
+ "not": {
977
+ "anyOf": [
978
+ {
979
+ "required": [
980
+ "effect"
981
+ ]
982
+ },
983
+ {
984
+ "required": [
985
+ "execution"
986
+ ]
987
+ },
988
+ {
989
+ "required": [
990
+ "dangerous"
991
+ ]
992
+ },
993
+ {
994
+ "required": [
995
+ "preflight_only"
996
+ ]
997
+ },
998
+ {
999
+ "required": [
1000
+ "confirmation"
1001
+ ]
1002
+ },
1003
+ {
1004
+ "required": [
1005
+ "cancel_policy"
1006
+ ]
1007
+ },
1008
+ {
1009
+ "required": [
1010
+ "request_schema"
1011
+ ]
1012
+ },
1013
+ {
1014
+ "required": [
1015
+ "response_schema"
1016
+ ]
1017
+ },
1018
+ {
1019
+ "required": [
1020
+ "broker_access"
1021
+ ]
1022
+ }
1023
+ ]
1024
+ }
1025
+ },
1026
+ "else": {
1027
+ "required": [
1028
+ "effect",
1029
+ "execution",
1030
+ "request_schema",
1031
+ "response_schema"
1032
+ ]
1033
+ }
1034
+ },
1035
+ {
1036
+ "if": {
1037
+ "properties": {
1038
+ "preflight_only": {
1039
+ "const": true
1040
+ }
1041
+ },
1042
+ "required": [
1043
+ "preflight_only"
1044
+ ]
1045
+ },
1046
+ "then": {
1047
+ "properties": {
1048
+ "effect": {
1049
+ "const": "read"
1050
+ },
1051
+ "execution": {
1052
+ "const": "sync"
1053
+ },
1054
+ "dangerous": {
1055
+ "const": false
1056
+ }
1057
+ }
1058
+ }
1059
+ },
1060
+ {
1061
+ "if": {
1062
+ "properties": {
1063
+ "execution": {
1064
+ "enum": [
1065
+ "operation",
1066
+ "subscription"
1067
+ ]
1068
+ }
1069
+ },
1070
+ "required": [
1071
+ "execution"
1072
+ ]
1073
+ },
1074
+ "then": {
1075
+ "required": [
1076
+ "cancel_policy"
1077
+ ]
1078
+ }
1079
+ },
1080
+ {
1081
+ "if": {
1082
+ "required": [
1083
+ "permissions"
1084
+ ]
1085
+ },
1086
+ "then": {
1087
+ "properties": {
1088
+ "route": {
1089
+ "properties": {
1090
+ "kind": {
1091
+ "const": "worker"
1092
+ }
1093
+ }
1094
+ }
1095
+ }
1096
+ }
1097
+ },
1098
+ {
1099
+ "if": {
1100
+ "properties": {
1101
+ "route": {
1102
+ "properties": {
1103
+ "kind": {
1104
+ "const": "surface"
1105
+ }
1106
+ },
1107
+ "required": [
1108
+ "kind"
1109
+ ]
1110
+ }
1111
+ },
1112
+ "required": [
1113
+ "route"
1114
+ ]
1115
+ },
1116
+ "then": {
1117
+ "properties": {
1118
+ "execution": {
1119
+ "enum": [
1120
+ "sync",
1121
+ "operation"
1122
+ ]
1123
+ }
1124
+ }
1125
+ }
1126
+ }
1127
+ ]
1128
+ }
1129
+ },
1130
+ "workers": {
1131
+ "type": "array",
1132
+ "items": {
1133
+ "type": "object",
1134
+ "additionalProperties": false,
1135
+ "required": [
1136
+ "worker_id",
1137
+ "artifact",
1138
+ "mode",
1139
+ "scope",
1140
+ "memory_limit_bytes"
1141
+ ],
1142
+ "properties": {
1143
+ "worker_id": {
1144
+ "type": "string",
1145
+ "minLength": 1
1146
+ },
1147
+ "artifact": {
1148
+ "type": "string",
1149
+ "minLength": 1
1150
+ },
1151
+ "mode": {
1152
+ "const": "job"
1153
+ },
1154
+ "scope": {
1155
+ "enum": [
1156
+ "user",
1157
+ "environment"
1158
+ ]
1159
+ },
1160
+ "memory_limit_bytes": {
1161
+ "type": "integer",
1162
+ "minimum": 1,
1163
+ "maximum": 268435456
1164
+ }
1165
+ }
1166
+ }
1167
+ },
1168
+ "storage": {
1169
+ "type": "object",
1170
+ "additionalProperties": false,
1171
+ "properties": {
1172
+ "stores": {
1173
+ "type": "array",
1174
+ "maxItems": 16,
1175
+ "items": {
1176
+ "type": "object",
1177
+ "additionalProperties": false,
1178
+ "required": [
1179
+ "store_id",
1180
+ "kind",
1181
+ "scope",
1182
+ "quota_bytes",
1183
+ "schema_version"
1184
+ ],
1185
+ "properties": {
1186
+ "store_id": {
1187
+ "type": "string",
1188
+ "minLength": 1
1189
+ },
1190
+ "kind": {
1191
+ "enum": [
1192
+ "kv",
1193
+ "files",
1194
+ "sqlite"
1195
+ ]
1196
+ },
1197
+ "scope": {
1198
+ "enum": [
1199
+ "user",
1200
+ "environment"
1201
+ ]
1202
+ },
1203
+ "quota_bytes": {
1204
+ "type": "integer",
1205
+ "minimum": 1,
1206
+ "maximum": 1073741824
1207
+ },
1208
+ "quota_files": {
1209
+ "type": "integer",
1210
+ "minimum": 1,
1211
+ "maximum": 100000
1212
+ },
1213
+ "schema_version": {
1214
+ "type": "integer",
1215
+ "minimum": 1
1216
+ }
1217
+ }
1218
+ }
1219
+ }
1220
+ }
1221
+ },
1222
+ "network_access": {
1223
+ "type": "object",
1224
+ "additionalProperties": false,
1225
+ "properties": {
1226
+ "connectors": {
1227
+ "type": "array",
1228
+ "items": {
1229
+ "type": "object",
1230
+ "additionalProperties": false,
1231
+ "required": [
1232
+ "connector_id",
1233
+ "transport",
1234
+ "scope"
1235
+ ],
1236
+ "properties": {
1237
+ "connector_id": {
1238
+ "type": "string",
1239
+ "minLength": 1,
1240
+ "maxLength": 128,
1241
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,127}$"
1242
+ },
1243
+ "transport": {
1244
+ "enum": [
1245
+ "http",
1246
+ "websocket",
1247
+ "tcp",
1248
+ "udp"
1249
+ ]
1250
+ },
1251
+ "scope": {
1252
+ "enum": [
1253
+ "user",
1254
+ "environment"
1255
+ ]
1256
+ },
1257
+ "destinations": {
1258
+ "type": "array",
1259
+ "items": {
1260
+ "type": "string",
1261
+ "minLength": 1
1262
+ }
1263
+ },
1264
+ "auth": {
1265
+ "type": "object"
1266
+ },
1267
+ "tls": {
1268
+ "type": "object"
1269
+ },
1270
+ "configurable": {
1271
+ "type": "boolean",
1272
+ "description": "The Host must approve an exact user-configured target. Destinations must be empty when true."
1273
+ }
1274
+ },
1275
+ "allOf": [
1276
+ {
1277
+ "if": {
1278
+ "properties": {
1279
+ "configurable": {
1280
+ "const": true
1281
+ }
1282
+ },
1283
+ "required": [
1284
+ "configurable"
1285
+ ]
1286
+ },
1287
+ "then": {
1288
+ "properties": {
1289
+ "destinations": {
1290
+ "maxItems": 0
1291
+ }
1292
+ }
1293
+ },
1294
+ "else": {
1295
+ "required": [
1296
+ "destinations"
1297
+ ],
1298
+ "properties": {
1299
+ "destinations": {
1300
+ "minItems": 1
1301
+ }
1302
+ }
1303
+ }
1304
+ }
1305
+ ]
1306
+ }
1307
+ }
1308
+ }
1309
+ },
1310
+ "process": {
1311
+ "type": "object",
1312
+ "additionalProperties": false,
1313
+ "properties": {
1314
+ "resource_limits": {
1315
+ "type": "object",
1316
+ "additionalProperties": false,
1317
+ "properties": {
1318
+ "output_buffer_bytes": {
1319
+ "type": "integer",
1320
+ "minimum": 0,
1321
+ "maximum": 16777216
1322
+ },
1323
+ "max_runtime_ms": {
1324
+ "type": "integer",
1325
+ "minimum": 0,
1326
+ "maximum": 86400000
1327
+ }
1328
+ }
1329
+ }
1330
+ }
1331
+ },
1332
+ "background": {
1333
+ "type": "object",
1334
+ "additionalProperties": false,
1335
+ "required": [
1336
+ "strategy",
1337
+ "worker_id"
1338
+ ],
1339
+ "properties": {
1340
+ "strategy": {
1341
+ "enum": [
1342
+ "runtime_start",
1343
+ "on_demand",
1344
+ "interval"
1345
+ ]
1346
+ },
1347
+ "worker_id": {
1348
+ "type": "string",
1349
+ "minLength": 1
1350
+ },
1351
+ "method": {
1352
+ "type": "string",
1353
+ "minLength": 1
1354
+ },
1355
+ "params": {
1356
+ "type": "object"
1357
+ },
1358
+ "interval_ms": {
1359
+ "type": "integer",
1360
+ "minimum": 1000,
1361
+ "maximum": 86400000
1362
+ },
1363
+ "max_runtime_ms": {
1364
+ "type": "integer",
1365
+ "minimum": 1,
1366
+ "maximum": 300000
1367
+ }
1368
+ },
1369
+ "dependentRequired": {
1370
+ "params": [
1371
+ "method"
1372
+ ]
1373
+ },
1374
+ "allOf": [
1375
+ {
1376
+ "if": {
1377
+ "properties": {
1378
+ "strategy": {
1379
+ "const": "interval"
1380
+ }
1381
+ }
1382
+ },
1383
+ "then": {
1384
+ "required": [
1385
+ "method",
1386
+ "interval_ms",
1387
+ "max_runtime_ms"
1388
+ ]
1389
+ },
1390
+ "else": {
1391
+ "not": {
1392
+ "anyOf": [
1393
+ {
1394
+ "required": [
1395
+ "interval_ms"
1396
+ ]
1397
+ },
1398
+ {
1399
+ "required": [
1400
+ "max_runtime_ms"
1401
+ ]
1402
+ }
1403
+ ]
1404
+ }
1405
+ }
1406
+ }
1407
+ ]
1408
+ },
1409
+ "settings": {
1410
+ "type": "object",
1411
+ "additionalProperties": false,
1412
+ "required": [
1413
+ "schema_version"
1414
+ ],
1415
+ "properties": {
1416
+ "schema_version": {
1417
+ "type": "integer",
1418
+ "minimum": 1
1419
+ },
1420
+ "fields": {
1421
+ "type": "array",
1422
+ "items": {
1423
+ "type": "object",
1424
+ "additionalProperties": false,
1425
+ "required": [
1426
+ "key",
1427
+ "type",
1428
+ "scope",
1429
+ "label"
1430
+ ],
1431
+ "properties": {
1432
+ "key": {
1433
+ "type": "string",
1434
+ "minLength": 1
1435
+ },
1436
+ "type": {
1437
+ "type": "string",
1438
+ "minLength": 1
1439
+ },
1440
+ "scope": {
1441
+ "enum": [
1442
+ "user",
1443
+ "environment"
1444
+ ]
1445
+ },
1446
+ "label": {
1447
+ "type": "string",
1448
+ "minLength": 1
1449
+ },
1450
+ "default": true,
1451
+ "secret_ref": {
1452
+ "type": "string"
1453
+ },
1454
+ "options": {
1455
+ "type": "array",
1456
+ "items": {
1457
+ "$ref": "#/$defs/setting_option"
1458
+ }
1459
+ },
1460
+ "validation": {
1461
+ "type": "object"
1462
+ }
1463
+ }
1464
+ }
1465
+ }
1466
+ }
1467
+ },
1468
+ "intents": {
1469
+ "type": "array",
1470
+ "items": {
1471
+ "type": "object",
1472
+ "additionalProperties": false,
1473
+ "required": [
1474
+ "intent_id",
1475
+ "method"
1476
+ ],
1477
+ "properties": {
1478
+ "intent_id": {
1479
+ "type": "string",
1480
+ "minLength": 1
1481
+ },
1482
+ "method": {
1483
+ "type": "string",
1484
+ "minLength": 1
1485
+ },
1486
+ "payload_schema": {
1487
+ "type": "object"
1488
+ }
1489
+ }
1490
+ }
1491
+ },
1492
+ "api": {
1493
+ "type": "object",
1494
+ "additionalProperties": false,
1495
+ "required": [
1496
+ "major"
1497
+ ],
1498
+ "properties": {
1499
+ "major": {
1500
+ "const": 1
1501
+ },
1502
+ "required_features": {
1503
+ "$ref": "#/$defs/required_features"
1504
+ },
1505
+ "optional_features": {
1506
+ "$ref": "#/$defs/optional_features"
1507
+ }
1508
+ }
1509
+ },
1510
+ "permissions": {
1511
+ "type": "array",
1512
+ "uniqueItems": true,
1513
+ "items": {
1514
+ "enum": [
1515
+ "fs.workspace.read",
1516
+ "fs.workspace.write",
1517
+ "fs.home.read",
1518
+ "fs.home.write",
1519
+ "fs.environment.read",
1520
+ "fs.environment.write",
1521
+ "network.client",
1522
+ "network.listen",
1523
+ "process.local",
1524
+ "fs.selected.read",
1525
+ "fs.selected.write"
1526
+ ]
1527
+ }
1528
+ },
1529
+ "data_upgrade": {
1530
+ "type": "object",
1531
+ "additionalProperties": false,
1532
+ "required": [
1533
+ "from",
1534
+ "method",
1535
+ "max_bytes",
1536
+ "max_runtime_ms"
1537
+ ],
1538
+ "properties": {
1539
+ "from": {
1540
+ "type": "array",
1541
+ "minItems": 1,
1542
+ "maxItems": 32,
1543
+ "uniqueItems": true,
1544
+ "items": {
1545
+ "type": "object",
1546
+ "additionalProperties": false,
1547
+ "required": [
1548
+ "version",
1549
+ "shape_sha256"
1550
+ ],
1551
+ "properties": {
1552
+ "version": {
1553
+ "$ref": "#/$defs/semver"
1554
+ },
1555
+ "shape_sha256": {
1556
+ "type": "string",
1557
+ "pattern": "^[0-9a-f]{64}$"
1558
+ }
1559
+ }
1560
+ }
1561
+ },
1562
+ "method": {
1563
+ "type": "string",
1564
+ "minLength": 1,
1565
+ "maxLength": 255
1566
+ },
1567
+ "max_bytes": {
1568
+ "type": "integer",
1569
+ "minimum": 1,
1570
+ "maximum": 4294967296
1571
+ },
1572
+ "max_runtime_ms": {
1573
+ "type": "integer",
1574
+ "minimum": 1,
1575
+ "maximum": 300000
1576
+ }
1577
+ }
1578
+ }
1579
+ },
1580
+ "$defs": {
1581
+ "locale": {
1582
+ "type": "string",
1583
+ "minLength": 2,
1584
+ "maxLength": 64,
1585
+ "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$"
1586
+ },
1587
+ "summary": {
1588
+ "type": "string",
1589
+ "minLength": 1,
1590
+ "maxLength": 240
1591
+ },
1592
+ "description": {
1593
+ "type": "array",
1594
+ "minItems": 1,
1595
+ "maxItems": 12,
1596
+ "items": {
1597
+ "type": "string",
1598
+ "minLength": 1,
1599
+ "maxLength": 1000
1600
+ }
1601
+ },
1602
+ "highlights": {
1603
+ "type": "array",
1604
+ "maxItems": 8,
1605
+ "items": {
1606
+ "type": "string",
1607
+ "minLength": 1,
1608
+ "maxLength": 240
1609
+ }
1610
+ },
1611
+ "keywords": {
1612
+ "type": "array",
1613
+ "minItems": 1,
1614
+ "maxItems": 12,
1615
+ "items": {
1616
+ "type": "string",
1617
+ "minLength": 1,
1618
+ "maxLength": 64
1619
+ }
1620
+ },
1621
+ "setting_option": {
1622
+ "type": "object",
1623
+ "additionalProperties": false,
1624
+ "required": [
1625
+ "value",
1626
+ "label"
1627
+ ],
1628
+ "properties": {
1629
+ "value": {
1630
+ "type": "string",
1631
+ "minLength": 1,
1632
+ "maxLength": 128
1633
+ },
1634
+ "label": {
1635
+ "type": "string",
1636
+ "minLength": 1,
1637
+ "maxLength": 128
1638
+ }
1639
+ }
1640
+ },
1641
+ "localized_surface": {
1642
+ "type": "object",
1643
+ "additionalProperties": false,
1644
+ "required": [
1645
+ "surface_id",
1646
+ "label"
1647
+ ],
1648
+ "properties": {
1649
+ "surface_id": {
1650
+ "type": "string",
1651
+ "minLength": 1
1652
+ },
1653
+ "label": {
1654
+ "type": "string",
1655
+ "minLength": 1,
1656
+ "maxLength": 128
1657
+ }
1658
+ }
1659
+ },
1660
+ "localized_setting": {
1661
+ "type": "object",
1662
+ "additionalProperties": false,
1663
+ "required": [
1664
+ "key",
1665
+ "label",
1666
+ "options"
1667
+ ],
1668
+ "properties": {
1669
+ "key": {
1670
+ "type": "string",
1671
+ "minLength": 1
1672
+ },
1673
+ "label": {
1674
+ "type": "string",
1675
+ "minLength": 1,
1676
+ "maxLength": 128
1677
+ },
1678
+ "options": {
1679
+ "type": "array",
1680
+ "items": {
1681
+ "$ref": "#/$defs/setting_option"
1682
+ }
1683
+ }
1684
+ }
1685
+ },
1686
+ "localization": {
1687
+ "type": "object",
1688
+ "additionalProperties": false,
1689
+ "required": [
1690
+ "locale",
1691
+ "plugin_name",
1692
+ "summary",
1693
+ "description",
1694
+ "highlights",
1695
+ "keywords",
1696
+ "surfaces",
1697
+ "settings"
1698
+ ],
1699
+ "properties": {
1700
+ "locale": {
1701
+ "$ref": "#/$defs/locale"
1702
+ },
1703
+ "plugin_name": {
1704
+ "type": "string",
1705
+ "minLength": 1,
1706
+ "maxLength": 128
1707
+ },
1708
+ "publisher_name": {
1709
+ "type": "string",
1710
+ "minLength": 1,
1711
+ "maxLength": 128
1712
+ },
1713
+ "summary": {
1714
+ "$ref": "#/$defs/summary"
1715
+ },
1716
+ "description": {
1717
+ "$ref": "#/$defs/description"
1718
+ },
1719
+ "highlights": {
1720
+ "$ref": "#/$defs/highlights"
1721
+ },
1722
+ "keywords": {
1723
+ "$ref": "#/$defs/keywords"
1724
+ },
1725
+ "surfaces": {
1726
+ "type": "array",
1727
+ "items": {
1728
+ "$ref": "#/$defs/localized_surface"
1729
+ }
1730
+ },
1731
+ "settings": {
1732
+ "type": "array",
1733
+ "items": {
1734
+ "$ref": "#/$defs/localized_setting"
1735
+ }
1736
+ }
1737
+ }
1738
+ },
1739
+ "semver": {
1740
+ "type": "string",
1741
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$"
1742
+ },
1743
+ "method_schema": {
1744
+ "oneOf": [
1745
+ {
1746
+ "const": false
1747
+ },
1748
+ {
1749
+ "type": "object",
1750
+ "additionalProperties": false,
1751
+ "properties": {
1752
+ "$comment": {
1753
+ "type": "string"
1754
+ },
1755
+ "title": {
1756
+ "type": "string"
1757
+ },
1758
+ "description": {
1759
+ "type": "string"
1760
+ },
1761
+ "readOnly": {
1762
+ "type": "boolean"
1763
+ },
1764
+ "writeOnly": {
1765
+ "type": "boolean"
1766
+ },
1767
+ "$ref": {
1768
+ "type": "string",
1769
+ "pattern": "^#/\\$defs/[A-Za-z0-9._-]+$"
1770
+ },
1771
+ "$defs": {
1772
+ "type": "object",
1773
+ "additionalProperties": {
1774
+ "$ref": "#/$defs/method_schema"
1775
+ }
1776
+ },
1777
+ "type": {
1778
+ "oneOf": [
1779
+ {
1780
+ "enum": [
1781
+ "null",
1782
+ "boolean",
1783
+ "object",
1784
+ "array",
1785
+ "number",
1786
+ "integer",
1787
+ "string"
1788
+ ]
1789
+ },
1790
+ {
1791
+ "type": "array",
1792
+ "minItems": 1,
1793
+ "uniqueItems": true,
1794
+ "items": {
1795
+ "enum": [
1796
+ "null",
1797
+ "boolean",
1798
+ "object",
1799
+ "array",
1800
+ "number",
1801
+ "integer",
1802
+ "string"
1803
+ ]
1804
+ }
1805
+ }
1806
+ ]
1807
+ },
1808
+ "properties": {
1809
+ "type": "object",
1810
+ "additionalProperties": {
1811
+ "$ref": "#/$defs/method_schema"
1812
+ }
1813
+ },
1814
+ "patternProperties": {
1815
+ "type": "object",
1816
+ "additionalProperties": {
1817
+ "$ref": "#/$defs/method_schema"
1818
+ }
1819
+ },
1820
+ "required": {
1821
+ "type": "array",
1822
+ "uniqueItems": true,
1823
+ "items": {
1824
+ "type": "string"
1825
+ }
1826
+ },
1827
+ "additionalProperties": {
1828
+ "const": false
1829
+ },
1830
+ "items": {
1831
+ "$ref": "#/$defs/method_schema"
1832
+ },
1833
+ "allOf": {
1834
+ "type": "array",
1835
+ "minItems": 1,
1836
+ "items": {
1837
+ "$ref": "#/$defs/method_schema"
1838
+ }
1839
+ },
1840
+ "anyOf": {
1841
+ "type": "array",
1842
+ "minItems": 1,
1843
+ "items": {
1844
+ "$ref": "#/$defs/method_schema"
1845
+ }
1846
+ },
1847
+ "oneOf": {
1848
+ "type": "array",
1849
+ "minItems": 1,
1850
+ "items": {
1851
+ "$ref": "#/$defs/method_schema"
1852
+ }
1853
+ },
1854
+ "enum": {
1855
+ "type": "array",
1856
+ "minItems": 1,
1857
+ "uniqueItems": true
1858
+ },
1859
+ "const": true,
1860
+ "default": true,
1861
+ "examples": {
1862
+ "type": "array"
1863
+ },
1864
+ "minimum": {
1865
+ "type": "number"
1866
+ },
1867
+ "maximum": {
1868
+ "type": "number"
1869
+ },
1870
+ "exclusiveMinimum": {
1871
+ "type": "number"
1872
+ },
1873
+ "exclusiveMaximum": {
1874
+ "type": "number"
1875
+ },
1876
+ "multipleOf": {
1877
+ "type": "number",
1878
+ "exclusiveMinimum": 0
1879
+ },
1880
+ "minLength": {
1881
+ "type": "integer",
1882
+ "minimum": 0
1883
+ },
1884
+ "maxLength": {
1885
+ "type": "integer",
1886
+ "minimum": 0
1887
+ },
1888
+ "pattern": {
1889
+ "type": "string"
1890
+ },
1891
+ "format": {
1892
+ "type": "string"
1893
+ },
1894
+ "minItems": {
1895
+ "type": "integer",
1896
+ "minimum": 0
1897
+ },
1898
+ "maxItems": {
1899
+ "type": "integer",
1900
+ "minimum": 0
1901
+ },
1902
+ "uniqueItems": {
1903
+ "type": "boolean"
1904
+ },
1905
+ "minProperties": {
1906
+ "type": "integer",
1907
+ "minimum": 0
1908
+ },
1909
+ "maxProperties": {
1910
+ "type": "integer",
1911
+ "minimum": 0
1912
+ }
1913
+ },
1914
+ "anyOf": [
1915
+ {
1916
+ "required": [
1917
+ "type"
1918
+ ]
1919
+ },
1920
+ {
1921
+ "required": [
1922
+ "$ref"
1923
+ ]
1924
+ },
1925
+ {
1926
+ "required": [
1927
+ "properties"
1928
+ ]
1929
+ },
1930
+ {
1931
+ "required": [
1932
+ "patternProperties"
1933
+ ]
1934
+ },
1935
+ {
1936
+ "required": [
1937
+ "required"
1938
+ ]
1939
+ },
1940
+ {
1941
+ "required": [
1942
+ "additionalProperties"
1943
+ ]
1944
+ },
1945
+ {
1946
+ "required": [
1947
+ "minProperties"
1948
+ ]
1949
+ },
1950
+ {
1951
+ "required": [
1952
+ "maxProperties"
1953
+ ]
1954
+ },
1955
+ {
1956
+ "required": [
1957
+ "allOf"
1958
+ ]
1959
+ },
1960
+ {
1961
+ "required": [
1962
+ "anyOf"
1963
+ ]
1964
+ },
1965
+ {
1966
+ "required": [
1967
+ "oneOf"
1968
+ ]
1969
+ },
1970
+ {
1971
+ "required": [
1972
+ "enum"
1973
+ ]
1974
+ },
1975
+ {
1976
+ "required": [
1977
+ "const"
1978
+ ]
1979
+ }
1980
+ ],
1981
+ "allOf": [
1982
+ {
1983
+ "if": {
1984
+ "required": [
1985
+ "type"
1986
+ ],
1987
+ "properties": {
1988
+ "type": {
1989
+ "anyOf": [
1990
+ {
1991
+ "const": "object"
1992
+ },
1993
+ {
1994
+ "type": "array",
1995
+ "contains": {
1996
+ "const": "object"
1997
+ }
1998
+ }
1999
+ ]
2000
+ }
2001
+ }
2002
+ },
2003
+ "then": {
2004
+ "required": [
2005
+ "additionalProperties"
2006
+ ],
2007
+ "properties": {
2008
+ "additionalProperties": {
2009
+ "const": false
2010
+ }
2011
+ }
2012
+ }
2013
+ },
2014
+ {
2015
+ "if": {
2016
+ "anyOf": [
2017
+ {
2018
+ "required": [
2019
+ "properties"
2020
+ ]
2021
+ },
2022
+ {
2023
+ "required": [
2024
+ "patternProperties"
2025
+ ]
2026
+ },
2027
+ {
2028
+ "required": [
2029
+ "required"
2030
+ ]
2031
+ },
2032
+ {
2033
+ "required": [
2034
+ "additionalProperties"
2035
+ ]
2036
+ },
2037
+ {
2038
+ "required": [
2039
+ "minProperties"
2040
+ ]
2041
+ },
2042
+ {
2043
+ "required": [
2044
+ "maxProperties"
2045
+ ]
2046
+ }
2047
+ ]
2048
+ },
2049
+ "then": {
2050
+ "required": [
2051
+ "additionalProperties"
2052
+ ],
2053
+ "properties": {
2054
+ "additionalProperties": {
2055
+ "const": false
2056
+ }
2057
+ }
2058
+ }
2059
+ }
2060
+ ]
2061
+ }
2062
+ ]
2063
+ },
2064
+ "required_features": {
2065
+ "type": "array",
2066
+ "uniqueItems": true,
2067
+ "items": {
2068
+ "enum": [
2069
+ "io.stream.v1",
2070
+ "fs.workspace.v1",
2071
+ "fs.home.v1",
2072
+ "fs.environment.v1",
2073
+ "fs.watch.v1",
2074
+ "net.http.v1",
2075
+ "net.websocket.v1",
2076
+ "net.tcp.v1",
2077
+ "net.udp.v1",
2078
+ "process.local.v1",
2079
+ "authorization.scoped.v1",
2080
+ "background.method.v1",
2081
+ "fs.selected.v1",
2082
+ "data.upgrade.v1",
2083
+ "background.interval.v1",
2084
+ "surface.resources.v1",
2085
+ "storage.transactions.v1"
2086
+ ]
2087
+ }
2088
+ },
2089
+ "optional_features": {
2090
+ "type": "array",
2091
+ "uniqueItems": true,
2092
+ "items": {
2093
+ "type": "string",
2094
+ "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)+$",
2095
+ "maxLength": 128
2096
+ }
2097
+ },
2098
+ "network_access": {
2099
+ "type": "object",
2100
+ "additionalProperties": false,
2101
+ "required": [
2102
+ "connector_id",
2103
+ "transport",
2104
+ "operations"
2105
+ ],
2106
+ "properties": {
2107
+ "connector_id": {
2108
+ "type": "string",
2109
+ "minLength": 1,
2110
+ "maxLength": 128,
2111
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,127}$"
2112
+ },
2113
+ "transport": {
2114
+ "enum": [
2115
+ "http",
2116
+ "websocket",
2117
+ "tcp",
2118
+ "udp"
2119
+ ]
2120
+ },
2121
+ "operations": {
2122
+ "type": "array",
2123
+ "minItems": 1,
2124
+ "uniqueItems": true,
2125
+ "items": {
2126
+ "enum": [
2127
+ "http",
2128
+ "http_stream",
2129
+ "websocket",
2130
+ "tcp",
2131
+ "udp"
2132
+ ]
2133
+ }
2134
+ },
2135
+ "http_methods": {
2136
+ "type": "array",
2137
+ "minItems": 1,
2138
+ "uniqueItems": true,
2139
+ "items": {
2140
+ "enum": [
2141
+ "GET",
2142
+ "HEAD",
2143
+ "POST",
2144
+ "PUT",
2145
+ "PATCH",
2146
+ "DELETE",
2147
+ "OPTIONS"
2148
+ ]
2149
+ }
2150
+ }
2151
+ },
2152
+ "allOf": [
2153
+ {
2154
+ "if": {
2155
+ "properties": {
2156
+ "transport": {
2157
+ "const": "http"
2158
+ }
2159
+ },
2160
+ "required": [
2161
+ "transport"
2162
+ ]
2163
+ },
2164
+ "then": {
2165
+ "required": [
2166
+ "http_methods"
2167
+ ]
2168
+ },
2169
+ "else": {
2170
+ "not": {
2171
+ "required": [
2172
+ "http_methods"
2173
+ ]
2174
+ }
2175
+ }
2176
+ }
2177
+ ]
2178
+ }
2179
+ },
2180
+ "allOf": [
2181
+ {
2182
+ "if": {
2183
+ "properties": {
2184
+ "methods": {
2185
+ "contains": {
2186
+ "required": [
2187
+ "permissions"
2188
+ ]
2189
+ }
2190
+ }
2191
+ },
2192
+ "required": [
2193
+ "methods"
2194
+ ]
2195
+ },
2196
+ "then": {
2197
+ "properties": {
2198
+ "api": {
2199
+ "required": [
2200
+ "required_features"
2201
+ ],
2202
+ "properties": {
2203
+ "required_features": {
2204
+ "contains": {
2205
+ "const": "authorization.scoped.v1"
2206
+ }
2207
+ }
2208
+ }
2209
+ }
2210
+ }
2211
+ }
2212
+ },
2213
+ {
2214
+ "if": {
2215
+ "properties": {
2216
+ "surfaces": {
2217
+ "contains": {
2218
+ "required": [
2219
+ "required_methods"
2220
+ ]
2221
+ }
2222
+ }
2223
+ },
2224
+ "required": [
2225
+ "surfaces"
2226
+ ]
2227
+ },
2228
+ "then": {
2229
+ "properties": {
2230
+ "api": {
2231
+ "required": [
2232
+ "required_features"
2233
+ ],
2234
+ "properties": {
2235
+ "required_features": {
2236
+ "contains": {
2237
+ "const": "authorization.scoped.v1"
2238
+ }
2239
+ }
2240
+ }
2241
+ }
2242
+ }
2243
+ }
2244
+ },
2245
+ {
2246
+ "if": {
2247
+ "required": [
2248
+ "background"
2249
+ ],
2250
+ "properties": {
2251
+ "background": {
2252
+ "required": [
2253
+ "method"
2254
+ ]
2255
+ }
2256
+ }
2257
+ },
2258
+ "then": {
2259
+ "properties": {
2260
+ "api": {
2261
+ "required": [
2262
+ "required_features"
2263
+ ],
2264
+ "properties": {
2265
+ "required_features": {
2266
+ "contains": {
2267
+ "const": "background.method.v1"
2268
+ }
2269
+ }
2270
+ }
2271
+ }
2272
+ }
2273
+ }
2274
+ },
2275
+ {
2276
+ "if": {
2277
+ "required": [
2278
+ "data_upgrade"
2279
+ ]
2280
+ },
2281
+ "then": {
2282
+ "properties": {
2283
+ "api": {
2284
+ "required": [
2285
+ "required_features"
2286
+ ],
2287
+ "properties": {
2288
+ "required_features": {
2289
+ "contains": {
2290
+ "const": "data.upgrade.v1"
2291
+ }
2292
+ }
2293
+ }
2294
+ }
2295
+ }
2296
+ }
2297
+ },
2298
+ {
2299
+ "if": {
2300
+ "required": [
2301
+ "background"
2302
+ ],
2303
+ "properties": {
2304
+ "background": {
2305
+ "properties": {
2306
+ "strategy": {
2307
+ "const": "interval"
2308
+ }
2309
+ }
2310
+ }
2311
+ }
2312
+ },
2313
+ "then": {
2314
+ "properties": {
2315
+ "api": {
2316
+ "required": [
2317
+ "required_features"
2318
+ ],
2319
+ "properties": {
2320
+ "required_features": {
2321
+ "contains": {
2322
+ "const": "background.interval.v1"
2323
+ }
2324
+ }
2325
+ }
2326
+ }
2327
+ }
2328
+ }
2329
+ },
2330
+ {
2331
+ "if": {
2332
+ "properties": {
2333
+ "surfaces": {
2334
+ "contains": {
2335
+ "properties": {
2336
+ "web": {
2337
+ "anyOf": [
2338
+ {
2339
+ "required": [
2340
+ "storage"
2341
+ ],
2342
+ "properties": {
2343
+ "storage": {
2344
+ "minItems": 1
2345
+ }
2346
+ }
2347
+ },
2348
+ {
2349
+ "required": [
2350
+ "settings"
2351
+ ],
2352
+ "properties": {
2353
+ "settings": {
2354
+ "minItems": 1
2355
+ }
2356
+ }
2357
+ }
2358
+ ]
2359
+ }
2360
+ },
2361
+ "required": [
2362
+ "web"
2363
+ ]
2364
+ }
2365
+ }
2366
+ }
2367
+ },
2368
+ "then": {
2369
+ "properties": {
2370
+ "api": {
2371
+ "properties": {
2372
+ "required_features": {
2373
+ "contains": {
2374
+ "const": "surface.resources.v1"
2375
+ }
2376
+ }
2377
+ },
2378
+ "required": [
2379
+ "required_features"
2380
+ ]
2381
+ }
2382
+ }
2383
+ }
2384
+ },
2385
+ {
2386
+ "if": {
2387
+ "properties": {
2388
+ "surfaces": {
2389
+ "contains": {
2390
+ "properties": {
2391
+ "web": {
2392
+ "properties": {
2393
+ "network": {
2394
+ "contains": {
2395
+ "properties": {
2396
+ "transport": {
2397
+ "const": "websocket"
2398
+ }
2399
+ },
2400
+ "required": [
2401
+ "transport"
2402
+ ]
2403
+ }
2404
+ }
2405
+ },
2406
+ "required": [
2407
+ "network"
2408
+ ]
2409
+ }
2410
+ },
2411
+ "required": [
2412
+ "web"
2413
+ ]
2414
+ }
2415
+ }
2416
+ }
2417
+ },
2418
+ "then": {
2419
+ "properties": {
2420
+ "api": {
2421
+ "properties": {
2422
+ "required_features": {
2423
+ "contains": {
2424
+ "const": "surface.resources.v1"
2425
+ }
2426
+ }
2427
+ },
2428
+ "required": [
2429
+ "required_features"
2430
+ ]
2431
+ }
2432
+ }
2433
+ }
2434
+ }
2435
+ ],
2436
+ "description": "Editable plugin source. Authors declare a repository-local slug; the platform compiles package identity before bindings, build and hashing. This document is not installable."
2437
+ };