Repository navigation
Expand file tree
/
Copy pathplugin-manifest.schema.json
More file actions
3921 lines (3921 loc) · 131 KB
/
Copy pathplugin-manifest.schema.json
File metadata and controls
3921 lines (3921 loc) · 131 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/Lithe-IDEA/Lithe-core-rust/main/shared/plugins/contract/v1/plugin-manifest.schema.json",
"title": "Lithe declarative plugin manifest (plugin contract v1)",
"description": "Shape of plugin.json for a declarative plugin. Semantic rules that JSON Schema cannot express (cross references, permissions, activation events, template variables) are defined in README.md and enforced by plugins.declarative.validate.",
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "id", "displayName", "version", "pluginAPIVersion", "requires", "vendor"],
"allOf": [
{"if": {"required": ["outputLinkMatchers"]}, "then": {"properties": {"requires": {"required": ["outputLinkMatchers"]}}}},
{"if": {"required": ["toolDefinitions"]}, "then": {"properties": {"requires": {"required": ["toolDefinitions"]}}}},
{"if": {"required": ["toolchainProviders"]}, "then": {"required": ["backend"], "properties": {"requires": {"required": ["toolchainProviders", "backend"]}, "permissions": {"allOf": [{"contains": {"const": "toolchains.provide"}}, {"contains": {"const": "backend.launch"}}]}}}},
{"if": {"required": ["pluginFunctions"]}, "then": {"required": ["backend"], "properties": {"requires": {"required": ["pluginFunctions", "backend"]}}}},
{"if": {"required": ["keymapImportProviders"]}, "then": {"required": ["backend", "permissions"], "properties": {"requires": {"required": ["keymapImportProviders", "backend"]}, "permissions": {"allOf": [{"contains": {"const": "keymaps.provide"}}, {"contains": {"const": "keymaps.readSelectedSources"}}, {"contains": {"const": "backend.launch"}}]}}}},
{"if": {"required": ["languageServers"], "properties": {"languageServers": {"contains": {"required": ["launch"], "properties": {"launch": {"required": ["kind"], "properties": {"kind": {"const": "backend"}}}}}}}}, "then": {"required": ["backend"], "properties": {"requires": {"required": ["backend"]}}}}
],
"properties": {
"schemaVersion": { "const": 0 },
"id": { "type": "string", "pattern": "^[a-z0-9.-]+$" },
"displayName": { "type": "string", "minLength": 1 },
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
"pluginAPIVersion": { "description": "Plugin API version of the manifest format. Always 0 in this contract; a host refuses any other value with plugin.api.unsupported.", "const": 0 },
"requires": {
"description": "Required: every capability the manifest uses, each with the version of that capability's contract it was written against. Every capability defines only version 0 today. Listing a capability the manifest does not use, or leaving out one it uses, is refused.",
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"backend": { "description": "Required exactly when backend is present: the plugin's own process. It serves its web pages, may also start on onWorkspaceOpen or a plugin command, receives workspace contexts through the litheFunctions protocol, and may be granted workspace.metadata.", "enum": [0] },
"buildModelInputs": {"description": "Optional public model sharing between already enabled workspace plugins; no installation, private function, or process authority. Required exactly when modelSharing or modelInputs is used. Consumers require buildProviders. A producer cannot also consume inputs.", "enum": [0]},
"buildProviders": { "description": "Required exactly when any buildSystems[].provider is present, including own-process and shared language-server providers. Declares host support for Provider orchestration (task execution, test execution and discovery, run preparation, native debug preparation, optional read-only model inputs, non-sensitive native configuration sources, inline test reports, opaque semantic test selectors, typed run options and service/task preparation, registry-selected adapters and host-owned connection targets for service debugging), independent of declarative buildSystems.", "enum": [0] },
"buildSystems": { "description": "Declarative build detection, models, and command plans, including the executable setting adapter, instance-scoped options, and declarative preparation roles; does not imply buildProviders support.", "enum": [0] },
"debugAdapters": { "description": "Required exactly when debugAdapters is non-empty. Covers bounded target argument and environment bindings and debugAdapters[].features and defaults. The DAP session itself is negotiated by the adapter in initialize.", "enum": [0] },
"executionProviders": { "enum": [0] },
"languageServers": { "description": "Required exactly when languageServers is non-empty. Covers languageServers[].workspaceConfiguration and the session fields requestMethods, commands, serializedCommands, forwardNotifications, state, and remote.", "enum": [0] },
"languages": { "description": "Required exactly when languages is non-empty. Covers languages[].grammar, a TextMate grammar, and languages[].configuration.", "enum": [0] },
"outputLinkMatchers": { "description": "Required exactly when outputLinkMatchers is non-empty.", "enum": [0] },
"packageTrust": { "description": "Required exactly when vendor.bundledSignatureRequirement is present.", "enum": [0] },
"projectGenerators": { "description": "Entries of the New Project window: fields, requirements, and steps, with tool fields that pick tool installations.", "enum": [0] },
"settings": { "description": "Required exactly when settings or settingActions is non-empty. Covers integer, enum, boolean, multiSelect, text, file, and directory options, scope, effect, page, section, and settingActions.", "enum": [0] },
"toolDefinitions": { "enum": [0] },
"toolchainProviders": { "enum": [0] },
"keymapImportProviders": { "enum": [0] },
"pluginFunctions": { "description": "Required exactly when pluginFunctions is present: functions this plugin's backend exports to other plugins, and exported functions it calls. Needs backend.", "enum": [0] },
"ui": { "description": "Required exactly when ui is present. Covers tool windows with text, web content, and native controls, and backend-only commands.", "enum": [0] },
"vcsProviders": { "description": "Required exactly when vcsProviders is non-empty. The provider protocol itself is negotiated in initialize (https://github.com/Lithe-IDEA/Lithe-core-rust/blob/main/rust/contracts/vcs-provider-v1.md).", "enum": [0] }
}
},
"vendor": {
"type": "object",
"additionalProperties": false,
"required": ["id", "displayName", "signatureRequirement"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"displayName": { "type": "string", "minLength": 1 },
"signatureRequirement": { "enum": ["sameTeamAsHost", "publisherPackage", "none"] },
"bundledSignatureRequirement": {
"description": "requires.packageTrust: host-pinned official packages may trust the host's sealed bundled copy; all other origins require publisherPackage.",
"const": "sameTeamAsHost"
}
}
},
"permissions": {
"type": "array",
"items": { "enum": ["backend.launch", "credentials.store", "debug.attach", "debug.launch", "languageServer.launch", "process.build", "process.run", "process.test", "process.vcs", "project.generate", "ui.contribute", "ui.web", "workspace.metadata",
"workspace.files.read",
"workspace.files.watch",
"workspace.search",
"documents.read",
"editor.edit",
"editor.actions",
"editor.providers",
"editor.open",
"preview.open",
"toolchains.provide",
"keymaps.provide",
"keymaps.readSelectedSources",
"browser.open",
"window.messages",
"terminal.create",
"run.start",
"debug.start",
"languageServer.request",
"documents.contentProvider"] }
},
"activationEvents": {
"type": "array",
"items": {
"type": "string",
"description": "onWorkspaceOpen names no ID and needs requires.backend; it starts the backend once a workspace is open.",
"pattern": "^((onLanguage|onRun|onTest|onView|onCommand|onBuildSystem|onVcsRoot|onDebug):[a-z0-9.+_-]+|onWorkspaceOpen)$"
}
},
"toolDefinitions": { "type": "array", "minItems": 1, "maxItems": 32, "items": { "$ref": "#/$defs/toolchainToolDefinition" } },
"requiresTools": {
"description": "Every tool definition the plugin starts or names, by ID. A runtime tool of a launch, a runtime dependency, a runSelectedRuntime tool, or the tool of a lithe/host/run/start must be listed here. An ID is short or <pluginID>:<id>; a short ID defined by more than one enabled plugin belongs to none of them.",
"type": "array",
"minItems": 1,
"maxItems": 32,
"uniqueItems": true,
"items": { "$ref": "#/$defs/toolchainToolID" }
},
"outputLinkMatchers": {
"description": "requires.outputLinkMatchers: patterns that turn Run and Test console text into links.",
"type": "array",
"minItems": 1,
"maxItems": 16,
"items": { "$ref": "#/$defs/outputLinkMatcher" }
},
"toolchainProviders": { "type": "array", "minItems": 1, "maxItems": 8, "items": { "$ref": "#/$defs/toolchainProvider" } },
"keymapImportProviders": { "type": "array", "minItems": 1, "maxItems": 8, "items": { "$ref": "#/$defs/keymapImportProvider" } },
"pluginFunctions": { "$ref": "#/$defs/pluginFunctions" },
"languages": {
"type": "array",
"minItems": 0,
"items": { "$ref": "#/$defs/language" }
},
"languageServers": {
"type": "array",
"items": { "$ref": "#/$defs/languageServer" }
},
"executionProviders": {
"type": "array",
"items": { "$ref": "#/$defs/executionProvider" }
},
"buildSystems": {
"description": "requires.buildSystems: build systems Core detects, models, and plans commands for. Requires process.build and one onBuildSystem:<id> activation event per build system.",
"type": "array",
"maxItems": 16,
"items": { "$ref": "#/$defs/buildSystem" }
},
"backend": {
"description": "requires.backend: the plugin's own LSP base-protocol process. The host keeps one process per plugin on the machine that runs Lithe, independent of any workspace, and ends it when the plugin is disabled, updated, or uninstalled. It starts on the first plugin-function call from one of the plugin's web pages, on onWorkspaceOpen, or on one of the plugin's commands, and the manifest declares at least one of those. Requires backend.launch; credentials.store lets it use the host's private credential store; workspace.metadata lets it list workspace contexts.",
"$ref": "#/$defs/backend"
},
"vcsProviders": {
"description": "requires.vcsProviders: version control systems the plugin provides, each through its own LSP base-protocol process. Requires languageServer.launch, process.vcs, and one onVcsRoot:<id> activation event per provider.",
"type": "array",
"maxItems": 8,
"items": { "$ref": "#/$defs/vcsProvider" }
},
"debugAdapters": {
"description": "requires.debugAdapters: debug adapters the plugin implements, each started as its own DAP process, or hosted by the plugin's own language server (transport tcpLanguageServer). Requires debug.launch (and debug.attach when an adapter serves attach) and one onDebug:<id> activation event per adapter.",
"type": "array",
"maxItems": 16,
"items": { "$ref": "#/$defs/debugAdapter" }
},
"projectGenerators": {
"description": "requires.projectGenerators: entries of the New Project window. Requires the project.generate permission.",
"type": "array",
"maxItems": 16,
"items": { "$ref": "#/$defs/projectGenerator" }
},
"ui": {
"type": "object",
"additionalProperties": false,
"description": "requires.ui: tool windows and commands. A command may be backend-only, without toolWindowID or tool windows.",
"properties": {
"toolWindows": {
"type": "array",
"minItems": 0,
"maxItems": 64,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"title",
"placement"
],
"oneOf": [
{ "required": ["text"] },
{ "required": ["web"] },
{ "required": ["native"] }
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9.-]+$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"placement": {
"enum": [
"left",
"bottom",
"right"
]
},
"order": {
"type": "integer"
},
"text": {
"type": "string",
"maxLength": 65536
},
"native": { "$ref": "native-ui.schema.json" },
"web": {
"description": "The plugin's own page, served from the package into a sandboxed host web view. Needs the ui.web permission.",
"type": "object",
"additionalProperties": false,
"required": ["entry"],
"properties": {
"entry": {
"description": "Package-relative path of the HTML entry page.",
"type": "string",
"maxLength": 256,
"pattern": "^(?!/)(?!.*(^|/)\\.{1,2}(/|$))[^:\\\\]+\\.html$"
}
}
},
"icon": {
"$ref": "#/$defs/uiIcon"
}
}
}
},
"commands": {
"type": "array",
"maxItems": 128,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"title",
"placements"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9.-]+$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"toolWindowID": {
"type": "string",
"pattern": "^[a-z0-9.-]+$"
},
"order": {
"type": "integer"
},
"placements": {
"type": "array",
"minItems": 1,
"items": {
"enum": [
"commandPalette",
"toolbar",
"menu"
]
}
},
"icon": {
"$ref": "#/$defs/uiIcon"
}
}
}
}
}
},
"settings": {
"description": "requires.settings: user-adjustable options with unique IDs.",
"type": "array",
"maxItems": 32,
"items": { "$ref": "#/$defs/setting" }
},
"settingActions": {
"description": "requires.settings: buttons on settings pages that invoke the plugin's own functions, with unique IDs.",
"type": "array",
"maxItems": 16,
"items": { "$ref": "#/$defs/settingAction" }
}
},
"$defs": {
"pluginFunctionID": {
"description": "Dot-separated lowerCamelCase segments, for example document.format.",
"type": "string",
"maxLength": 128,
"pattern": "^[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
},
"pluginFunctions": {
"description": "Functions this plugin exports to other plugins and exported functions it calls. A function is private to its plugin unless it is exported here and registered at runtime with lithe/function/register; calling it takes no permission, because the receiver's export and the caller's declaration are the consent. The called function runs with the receiver's own permissions.",
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"exports": { "type": "array", "minItems": 1, "maxItems": 32, "items": { "$ref": "#/$defs/pluginFunctionExport" } },
"calls": { "type": "array", "minItems": 1, "maxItems": 32, "items": { "$ref": "#/$defs/pluginFunctionCall" } }
}
},
"pluginFunctionExport": {
"type": "object",
"additionalProperties": false,
"required": ["id", "version", "context"],
"properties": {
"id": { "$ref": "#/$defs/pluginFunctionID" },
"version": { "description": "Version of the function's input and result contract; an incompatible change uses a new version.", "type": "integer", "minimum": 1, "maximum": 1000 },
"context": { "description": "The one calling context the function accepts. workspace: a local trusted workspace, scheduled by the host. An export without a context Lithe knows is refused.", "enum": ["workspace"] }
}
},
"pluginFunctionCall": {
"type": "object",
"additionalProperties": false,
"required": ["id", "version"],
"properties": {
"id": { "$ref": "#/$defs/pluginFunctionID" },
"version": { "description": "The export contract version this plugin was written for; Core refuses a provider that exports another version.", "type": "integer", "minimum": 1, "maximum": 1000 }
}
},
"keymapImportProvider": {
"type": "object",
"additionalProperties": false,
"required": ["id", "displayName", "recognition", "inputs"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
"displayName": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[^\\u0000-\\u001f\\u007f]+$" },
"recognition": { "type": "array", "minItems": 1, "maxItems": 16, "uniqueItems": true,
"items": { "$ref": "#/$defs/keymapImportRecognition" } },
"inputs": { "type": "array", "minItems": 1, "maxItems": 16, "uniqueItems": true,
"items": { "$ref": "#/$defs/keymapImportInput" } }
}
},
"keymapImportRecognition": {
"oneOf": [
{ "type": "object", "additionalProperties": false, "required": ["kind", "path"],
"properties": { "kind": { "enum": ["file", "directory"] }, "path": { "$ref": "#/$defs/keymapImportInput/properties/path" } } },
{ "type": "object", "additionalProperties": false, "required": ["kind", "base", "components"],
"properties": { "kind": { "const": "root" }, "base": { "const": "userConfig" },
"components": { "type": "array", "minItems": 1, "maxItems": 8,
"contains": { "const": "*" }, "minContains": 0, "maxContains": 1,
"items": { "type": "string", "maxLength": 256, "pattern": "^(?:\\*|(?!.*[. ]$)[^/\\\\:*?\\u0000-\\u001f\\u007f]+)$" } } } }
]
},
"keymapImportInput": {
"type": "object", "additionalProperties": false, "required": ["kind", "path"],
"properties": {
"kind": { "enum": ["file", "directory"] },
"path": { "type": "string", "minLength": 1, "maxLength": 256,
"pattern": "^(?!/)(?!.*(?:^|/)(?:\\.|\\.\\.)(?:/|$))(?!.*(?:^|/)[^/]*[. ](?:/|$))[^/\\\\:*?\\u0000-\\u001f\\u007f]+(?:/[^/\\\\:*?\\u0000-\\u001f\\u007f]+)*$" },
"extension": { "type": "string", "pattern": "^[a-z0-9]{1,16}$" }
},
"allOf": [
{ "if": { "properties": { "kind": { "const": "directory" } } }, "then": { "required": ["extension"] } },
{ "if": { "properties": { "kind": { "const": "file" } } }, "then": { "not": { "required": ["extension"] } } }
]
},
"debugLocalID": {
"type": "string",
"pattern": "^[a-z][a-z0-9._-]{0,63}$"
},
"debugPackagePath": {
"description": "Read-only package-relative path. Core must additionally reject escaping symlinks and platform-specific path escapes.",
"type": "string",
"minLength": 1,
"pattern": "^(?!/)(?!.*(?:^|/)[.]{1,2}(?:/|$))[^\\\\:\\u0000]+$"
},
"debugArgumentName": {
"description": "One DAP argument name or object key.",
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}$"
},
"debugArgumentPath": {
"description": "Dotted path to a DAP argument, up to four names, for example `hostName` or `connect.host`. Objects on the way are created; the path must not overlap another binding or an argument the configuration sets itself.",
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}(\\.[A-Za-z_][A-Za-z0-9_-]{0,63}){0,3}$"
},
"debugConnectionBinding": {
"type": "object",
"additionalProperties": false,
"properties": {
"host": {
"description": "Receives `target.host`, a string. Declared together with `port`.",
"$ref": "#/$defs/debugArgumentPath"
},
"port": {
"description": "Receives `target.port`, an integer 1-65535. Declared together with `host`.",
"$ref": "#/$defs/debugArgumentPath"
},
"address": {
"description": "Receives `host:port` as one string; an IPv6 host is written in brackets.",
"$ref": "#/$defs/debugArgumentPath"
},
"pathMappings": {
"description": "How local and remote source roots reach the adapter. Omit when the adapter takes none; the host then does not offer the choice.",
"oneOf": [
{
"description": "A list of objects at `argument`, each with the local root under `localKey` and the remote root under `remoteKey`.",
"type": "object",
"additionalProperties": false,
"required": ["shape", "argument", "localKey", "remoteKey"],
"properties": {
"shape": { "const": "objects" },
"argument": { "$ref": "#/$defs/debugArgumentPath" },
"localKey": { "$ref": "#/$defs/debugArgumentName" },
"remoteKey": { "$ref": "#/$defs/debugArgumentName" }
}
},
{
"description": "The first mapping only, as two strings at `local` and `remote`.",
"type": "object",
"additionalProperties": false,
"required": ["shape", "local", "remote"],
"properties": {
"shape": { "const": "first" },
"local": { "$ref": "#/$defs/debugArgumentPath" },
"remote": { "$ref": "#/$defs/debugArgumentPath" }
}
},
{
"description": "An object at `argument` with one root as the key and the other as the value, keyed by the `keyedBy` side. A target with the same root twice on that side is refused.",
"type": "object",
"additionalProperties": false,
"required": ["shape", "argument", "keyedBy"],
"properties": {
"shape": { "const": "dictionary" },
"argument": { "$ref": "#/$defs/debugArgumentPath" },
"keyedBy": { "enum": ["local", "remote"] }
}
},
{
"description": "A list of two-element arrays at `argument`, the roots in the given `order`.",
"type": "object",
"additionalProperties": false,
"required": ["shape", "argument", "order"],
"properties": {
"shape": { "const": "pairs" },
"argument": { "$ref": "#/$defs/debugArgumentPath" },
"order": { "enum": ["remoteLocal", "localRemote"] }
}
}
]
}
},
"dependentRequired": {
"host": ["port"],
"port": ["host"]
},
"anyOf": [
{ "required": ["host"] },
{ "required": ["address"] }
]
},
"debugServerProcess": {
"$ref": "#/$defs/processLaunch",
"description": "Reuse existing launch fields and validation. LSP initializationOptions have no meaning for a DAP transport and are excluded.",
"propertyNames": {
"enum": [
"launch",
"arguments",
"validationArguments",
"runtimeDependencies"
]
},
"unevaluatedProperties": false
},
"debugRunSelectedRuntimeProcess": {
"description": "Resolve through Run's selected runtime for this target, not a plugin dependency or a separate Debug runtime preference.",
"type": "object",
"additionalProperties": false,
"required": [
"launch"
],
"properties": {
"launch": {
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"tool"
],
"properties": {
"kind": {
"const": "runSelectedRuntime"
},
"tool": {
"description": "The ID of a tool definition listed in requiresTools.",
"$ref": "#/$defs/toolchainToolID"
}
}
},
"arguments": {
"$ref": "#/$defs/processLaunch/properties/arguments"
},
"validationArguments": {
"$ref": "#/$defs/processLaunch/properties/validationArguments"
}
}
},
"debugProcess": {
"oneOf": [
{
"$ref": "#/$defs/debugServerProcess"
},
{
"$ref": "#/$defs/debugRunSelectedRuntimeProcess"
}
]
},
"debugLaunch": {
"type": "object",
"required": [
"transport"
],
"properties": {
"process": {
"$ref": "#/$defs/debugProcess"
}
},
"oneOf": [
{
"required": [
"process"
],
"properties": {
"transport": {
"const": "stdio"
}
}
},
{
"required": [
"process",
"endpoint"
],
"properties": {
"transport": {
"const": "tcpAnnounced"
},
"endpoint": {
"description": "A bounded line decoder, not an executable-name-specific format or a regex engine. Only loopback endpoints are accepted.",
"type": "object",
"additionalProperties": false,
"required": [
"stream",
"prefix",
"value"
],
"properties": {
"stream": {
"enum": [
"stdout",
"stderr"
]
},
"prefix": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\r\\n]+$"
},
"value": {
"enum": [
"port",
"hostPort"
]
}
}
}
}
},
{
"required": [
"process",
"endpoint"
],
"properties": {
"transport": {
"const": "tcpPort"
},
"endpoint": {
"description": "A fixed loopback port for this adapter process, not the debuggee's attach port. Conflicts fail explicitly; no automatic port substitution.",
"type": "object",
"additionalProperties": false,
"required": [
"port"
],
"properties": {
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
}
}
}
}
},
{
"required": [
"endpoint"
],
"not": {
"required": [
"process"
]
},
"properties": {
"transport": {
"const": "tcpLanguageServer"
},
"endpoint": {
"description": "The adapter runs inside a language server this plugin declares in languageServers, which has no adapter process of its own. The host starts that server, sends workspace/executeCommand with command, and connects to the loopback port the server answers with (an integer or a numeric string).",
"type": "object",
"additionalProperties": false,
"required": [
"languageID",
"command"
],
"properties": {
"languageID": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9+_-]+$"
},
"command": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9._:-]+$"
}
}
}
}
}
],
"unevaluatedProperties": false
},
"debugSelector": {
"description": "Optional automatic matching: OR between selectors, AND between fields. Omission means explicit selection only, not a wildcard registration.",
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"targetKinds": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"enum": [
"file",
"executable",
"runTarget",
"process",
"connection"
]
}
},
"languageIDs": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[a-z0-9+_-]+$"
}
}
}
},
"debugConfiguration": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"arguments": {
"description": "Adapter-owned default DAP arguments. Ordinary JSON data; no embedded references, expressions or resource handles are interpreted.",
"type": "object"
},
"parametersSchema": {
"description": "Optional packaged schema for final merged DAP arguments, with local read-only refs only. Not a new Debug configuration file.",
"$ref": "#/$defs/debugPackagePath"
},
"targetBindings": {
"description": "Typed projections into known DAP fields. They only fill missing arguments; explicit values retain their existing precedence.",
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"program": {
"description": "`target.path` is the target's own path. `target.executable` is the program the host found through `executable`, which then must be declared.",
"enum": ["target.path", "target.executable"]
},
"processId": {
"const": "target.processID"
},
"cwd": {
"const": "target.workingDirectory"
},
"args": { "const": "target.arguments" },
"env": { "const": "target.environment" },
"connection": {
"description": "Attach only. Where the remote target's host and port go. Unlike the other bindings, each value is the destination argument path, because adapters name and nest these differently.",
"$ref": "#/$defs/debugConnectionBinding"
}
}
},
"executable": {
"description": "Launch only. Where a host finds the program a source file builds into: the user's `file` setting first, then the candidates. Required exactly when `targetBindings.program` is `target.executable`.",
"type": "object",
"additionalProperties": false,
"required": ["setting"],
"properties": {
"setting": {
"description": "ID of a `file` setting of the same plugin.",
"type": "string",
"minLength": 1
},
"candidates": {
"description": "Paths tried in order when the setting is empty. Each starts with `${workspaceFolder}/` or `${fileDirectory}/` and may use `${fileBasenameNoExtension}`; no `..`.",
"type": "array",
"maxItems": 8,
"uniqueItems": true,
"items": {
"type": "string",
"maxLength": 1024,
"pattern": "^\\$\\{(workspaceFolder|fileDirectory)\\}/"
}
}
}
}
}
},
"debugCapabilities": {
"description": "Optional suppression only. Disabled entries are standard DAP initialize capability names plus exceptionBreakpointFilters. Omission follows DAP; true values and function implementations are not accepted.",
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"disabled": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^(supports[A-Z][A-Za-z0-9]*|exceptionBreakpointFilters)$"
}
}
}
},
"debugConsole": {
"description": "Debugger commands the adapter's console understands, offered as completions while typing in the Debug Console. Adapters that answer the DAP completions request complete live; this list is for the ones that do not. Names are inserted as written; Core refuses padded or duplicate names.",
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"commandPrefix": {
"description": "Text the adapter's console reads as \"what follows is a debugger command\". The host puts it before the typed line when it asks the adapter to complete, so the adapter proposes commands instead of expression keywords. No spaces.",
"type": "string",
"minLength": 1,
"maxLength": 8,
"pattern": "^\\S+$"
},
"commands": {
"type": "array",
"minItems": 1,
"maxItems": 1024,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"description": {
"description": "One line shown beside the name, as written. Not translated by the host.",
"type": "string",
"minLength": 1,
"maxLength": 240
}
}
}
}
}
},
"debugAdapter": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"displayName",
"launch"
],
"properties": {
"id": {
"$ref": "#/$defs/debugLocalID"
},
"displayName": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"adapterID": {
"description": "DAP initialize adapterID. Defaults to the local adapter id; never substitutes for the qualified Registry identity.",
"type": "string",
"minLength": 1,
"maxLength": 128
},
"requests": {
"description": "Defaults to launch only. Attach must be explicitly declared and separately authorized.",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"enum": [
"launch",
"attach"
]
},
"default": [
"launch"
]
},
"selectors": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/debugSelector"
}
},
"configurationTypes": {
"description": "Optional imported launch.json type aliases. Ambiguity requires selection; aliases do not override another provider.",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1
}
},
"configurations": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"launch": {
"$ref": "#/$defs/debugConfiguration"
},
"attach": {
"$ref": "#/$defs/debugConfiguration"
}
}
},
"capabilities": {
"$ref": "#/$defs/debugCapabilities"
},
"console": {
"$ref": "#/$defs/debugConsole"
},
"launch": {
"$ref": "#/$defs/debugLaunch"
},
"features": {
"description": "Adapter-specific DAP extensions the adapter implements.",
"$ref": "#/$defs/debugAdapterFeatures"
},
"defaults": {
"description": "Values the adapter starts with when the user configured none.",
"$ref": "#/$defs/debugAdapterDefaults"
}
}
},
"debugDeclaredName": {
"description": "A DAP command, event, field or argument name: a letter followed by up to 63 letters, digits, dots, underscores or hyphens.",
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$"
},
"debugAdapterFeatures": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"hotCodeReplace": {
"description": "A custom request that applies changed code to the running debuggee.",
"type": "object",
"additionalProperties": false,
"required": ["request"],
"properties": {
"request": { "description": "DAP command sent for a redefineClasses inspection.", "$ref": "#/$defs/debugDeclaredName" },
"event": { "description": "DAP event whose message the Debug Console shows as progress.", "$ref": "#/$defs/debugDeclaredName" },
"changedField": { "description": "Response body field listing the replaced units.", "$ref": "#/$defs/debugDeclaredName" },
"errorField": { "description": "Response body field with a failure message the adapter reports in a successful response.", "$ref": "#/$defs/debugDeclaredName" }
}
},
"stepFilters": {
"description": "The launch argument through which the adapter receives {skipClasses, skipSynthetics, skipStaticInitializers, skipConstructors}.",
"type": "object",
"additionalProperties": false,
"required": ["argument"],
"properties": {
"argument": { "$ref": "#/$defs/debugDeclaredName" }
}
}
}
},
"debugAdapterDefaults": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"stepFilters": {
"type": "object",
"additionalProperties": false,
"properties": {
"classNameFilters": {
"type": "array",
"maxItems": 256,
"items": { "type": "string", "minLength": 1, "maxLength": 256 }
},
"skipSynthetics": { "type": "boolean" },
"skipStaticInitializers": { "type": "boolean" },
"skipConstructors": { "type": "boolean" },
"hideFilteredStackFrames": { "type": "boolean" }
}
}
}
},
"outputLinkMatcher": {
"type": "object",
"additionalProperties": false,
"required": ["id", "pattern"],
"properties": {
"id": { "description": "Plugin-local ID, unique in the plugin.", "type": "string", "pattern": "^[a-z][a-z0-9._-]{0,63}$" },
"pattern": {
"description": "A Rust regex matched against one console line. Without resolve it captures path and may capture line and column; it must not match empty text.",
"type": "string",
"minLength": 1,
"maxLength": 512
},
"scope": { "description": "The console the matcher applies to; both when absent.", "enum": ["run", "test"] },
"resolve": {
"description": "A function of the plugin's backend process that turns the named groups into a location.",
"type": "object",
"additionalProperties": false,
"required": ["function"],
"properties": {
"function": { "type": "string", "minLength": 1 }
}
}
}
},
"generatorCondition": {
"type": "object",
"additionalProperties": false,
"required": ["field"],
"properties": {
"field": { "type": "string", "description": "A field declared earlier in the same generator." },
"equals": { "type": ["string", "boolean"] },
"notEquals": { "type": ["string", "boolean"] },
"oneOf": { "type": "array", "minItems": 1, "items": { "type": ["string", "boolean"] } }
},
"oneOf": [
{ "required": ["equals"] },
{ "required": ["notEquals"] },
{ "required": ["oneOf"] }
]
},
"generatorConditions": {
"oneOf": [
{ "$ref": "#/$defs/generatorCondition" },
{ "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/generatorCondition" } }
]
},
"generatorField": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title"],
"properties": {
"id": { "type": "string", "pattern": "^[a-z][A-Za-z0-9]*$" },
"type": { "enum": ["text", "enum", "boolean", "multiSelect", "tool"] },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "minLength": 1, "maxLength": 480 },
"advanced": { "type": "boolean" },
"visibleWhen": { "$ref": "#/$defs/generatorConditions" },
"default": { "description": "text: a template over ${project.name} and earlier fields; enum: an option; boolean; multiSelect: options. Not allowed for tool." },
"options": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["value", "title"],
"properties": {
"value": { "type": "string", "pattern": "^[A-Za-z0-9._-]{1,120}$" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"group": { "type": "string", "minLength": 1, "maxLength": 120 }
}
}
},
"presentation": { "enum": ["segmented", "menu"] },
"pattern": { "type": "string", "maxLength": 256 },