@hia-doc/dotnetdoc-runner 0.1.12 → 1.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1466 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mandolin.github.io/HIA-Documentation/schemas/command-documentation-0.1.0-draft.schema.json",
4
+ "title": "命令文档描述 / Command documentation description",
5
+ "description": "版本化声明、字段语言及来源元数据;消费层另核关系和实际来源。 / Versioned declarations, field localization and provenance metadata; consumers separately verify relationships and actual sources.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "contract",
10
+ "contractVersion",
11
+ "owner",
12
+ "sources",
13
+ "commands"
14
+ ],
15
+ "properties": {
16
+ "contract": {
17
+ "const": "command-documentation",
18
+ "description": "契约名称。 / Contract name."
19
+ },
20
+ "contractVersion": {
21
+ "const": "0.1.0-draft",
22
+ "description": "精确草案版本。 / Exact draft version."
23
+ },
24
+ "owner": {
25
+ "$ref": "#/$defs/commandOwner",
26
+ "description": "拥有描述的包。 / Package owning these descriptions."
27
+ },
28
+ "sources": {
29
+ "type": "array",
30
+ "minItems": 1,
31
+ "items": {
32
+ "$ref": "#/$defs/commandSource"
33
+ },
34
+ "description": "显式来源清单。 / Explicit source inventory."
35
+ },
36
+ "commands": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "items": {
40
+ "$ref": "#/$defs/commandDeclaration"
41
+ },
42
+ "description": "有序根、组及叶声明。 / Ordered root, group and leaf declarations."
43
+ }
44
+ },
45
+ "$defs": {
46
+ "nonEmptyString": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "fallbackLocale": {
51
+ "anyOf": [
52
+ {
53
+ "$ref": "#/$defs/nonEmptyString"
54
+ },
55
+ {
56
+ "type": "array",
57
+ "minItems": 1,
58
+ "items": {
59
+ "$ref": "#/$defs/nonEmptyString"
60
+ }
61
+ }
62
+ ]
63
+ },
64
+ "localeList": {
65
+ "type": "array",
66
+ "minItems": 1,
67
+ "items": {
68
+ "$ref": "#/$defs/nonEmptyString"
69
+ }
70
+ },
71
+ "diagnostic": {
72
+ "type": "object",
73
+ "required": [
74
+ "code",
75
+ "message",
76
+ "severity"
77
+ ],
78
+ "additionalProperties": true,
79
+ "properties": {
80
+ "code": {
81
+ "$ref": "#/$defs/nonEmptyString"
82
+ },
83
+ "message": {
84
+ "$ref": "#/$defs/nonEmptyString"
85
+ },
86
+ "severity": {
87
+ "enum": [
88
+ "info",
89
+ "warning",
90
+ "error"
91
+ ]
92
+ },
93
+ "data": {
94
+ "type": "object"
95
+ },
96
+ "path": {
97
+ "$ref": "#/$defs/nonEmptyString"
98
+ },
99
+ "targetPath": {
100
+ "$ref": "#/$defs/nonEmptyString"
101
+ }
102
+ }
103
+ },
104
+ "node": {
105
+ "type": "object",
106
+ "required": [
107
+ "id",
108
+ "kind",
109
+ "title"
110
+ ],
111
+ "additionalProperties": true,
112
+ "properties": {
113
+ "id": {
114
+ "$ref": "#/$defs/nonEmptyString"
115
+ },
116
+ "kind": {
117
+ "$ref": "#/$defs/nonEmptyString"
118
+ },
119
+ "title": {
120
+ "$ref": "#/$defs/nonEmptyString"
121
+ },
122
+ "symbolIds": {
123
+ "type": "array",
124
+ "items": {
125
+ "$ref": "#/$defs/nonEmptyString"
126
+ }
127
+ },
128
+ "children": {
129
+ "type": "array",
130
+ "items": {
131
+ "$ref": "#/$defs/node"
132
+ }
133
+ }
134
+ }
135
+ },
136
+ "symbol": {
137
+ "type": "object",
138
+ "required": [
139
+ "id",
140
+ "name",
141
+ "kind"
142
+ ],
143
+ "additionalProperties": true,
144
+ "properties": {
145
+ "id": {
146
+ "$ref": "#/$defs/nonEmptyString"
147
+ },
148
+ "name": {
149
+ "$ref": "#/$defs/nonEmptyString"
150
+ },
151
+ "kind": {
152
+ "$ref": "#/$defs/nonEmptyString"
153
+ },
154
+ "longname": {
155
+ "$ref": "#/$defs/nonEmptyString"
156
+ },
157
+ "parentId": {
158
+ "$ref": "#/$defs/nonEmptyString"
159
+ },
160
+ "path": {
161
+ "type": "array",
162
+ "items": {
163
+ "$ref": "#/$defs/nonEmptyString"
164
+ }
165
+ },
166
+ "signature": {
167
+ "$ref": "#/$defs/nonEmptyString"
168
+ },
169
+ "summary": {
170
+ "type": "string"
171
+ },
172
+ "i18n": {
173
+ "$ref": "#/$defs/i18nModel"
174
+ },
175
+ "source": {
176
+ "$ref": "#/$defs/sourceMetadata"
177
+ },
178
+ "diagnostics": {
179
+ "type": "array",
180
+ "items": {
181
+ "$ref": "#/$defs/diagnostic"
182
+ }
183
+ },
184
+ "metadata": {
185
+ "type": "object"
186
+ }
187
+ }
188
+ },
189
+ "i18nModel": {
190
+ "type": "object",
191
+ "required": [
192
+ "enabled",
193
+ "model",
194
+ "modelVersion",
195
+ "defaultLocale",
196
+ "locales",
197
+ "fields"
198
+ ],
199
+ "additionalProperties": true,
200
+ "properties": {
201
+ "enabled": {
202
+ "type": "boolean"
203
+ },
204
+ "model": {
205
+ "const": "hia-text-i18n"
206
+ },
207
+ "modelVersion": {
208
+ "enum": [
209
+ "1.0.0",
210
+ "0.2.0"
211
+ ]
212
+ },
213
+ "defaultLocale": {
214
+ "$ref": "#/$defs/nonEmptyString"
215
+ },
216
+ "fallbackLocale": {
217
+ "$ref": "#/$defs/fallbackLocale"
218
+ },
219
+ "locales": {
220
+ "$ref": "#/$defs/localeList"
221
+ },
222
+ "mode": {
223
+ "$ref": "#/$defs/nonEmptyString"
224
+ },
225
+ "fields": {
226
+ "type": "object",
227
+ "additionalProperties": {
228
+ "$ref": "#/$defs/i18nField"
229
+ }
230
+ },
231
+ "resources": {
232
+ "type": "array",
233
+ "items": {
234
+ "$ref": "#/$defs/i18nResource"
235
+ }
236
+ },
237
+ "diagnostics": {
238
+ "type": "array",
239
+ "items": {
240
+ "$ref": "#/$defs/diagnostic"
241
+ }
242
+ }
243
+ }
244
+ },
245
+ "i18nResource": {
246
+ "type": "object",
247
+ "required": [
248
+ "path"
249
+ ],
250
+ "additionalProperties": true,
251
+ "properties": {
252
+ "kind": {
253
+ "$ref": "#/$defs/nonEmptyString"
254
+ },
255
+ "path": {
256
+ "$ref": "#/$defs/nonEmptyString"
257
+ },
258
+ "locale": {
259
+ "$ref": "#/$defs/nonEmptyString"
260
+ },
261
+ "format": {
262
+ "$ref": "#/$defs/nonEmptyString"
263
+ },
264
+ "fields": {
265
+ "type": "array",
266
+ "items": {
267
+ "$ref": "#/$defs/nonEmptyString"
268
+ }
269
+ }
270
+ }
271
+ },
272
+ "i18nField": {
273
+ "type": "object",
274
+ "required": [
275
+ "fieldPath",
276
+ "kind",
277
+ "defaultLocale",
278
+ "localizedText"
279
+ ],
280
+ "additionalProperties": true,
281
+ "properties": {
282
+ "fieldPath": {
283
+ "$ref": "#/$defs/nonEmptyString"
284
+ },
285
+ "kind": {
286
+ "$ref": "#/$defs/nonEmptyString"
287
+ },
288
+ "defaultLocale": {
289
+ "$ref": "#/$defs/nonEmptyString"
290
+ },
291
+ "key": {
292
+ "$ref": "#/$defs/nonEmptyString"
293
+ },
294
+ "path": {
295
+ "$ref": "#/$defs/nonEmptyString"
296
+ },
297
+ "defaultText": {
298
+ "type": "string"
299
+ },
300
+ "source": {
301
+ "$ref": "#/$defs/nonEmptyString"
302
+ },
303
+ "localizedText": {
304
+ "$ref": "#/$defs/localizedText"
305
+ },
306
+ "blocks": {
307
+ "type": "array",
308
+ "items": {
309
+ "$ref": "#/$defs/langBlock"
310
+ }
311
+ },
312
+ "segments": {
313
+ "type": "array",
314
+ "items": {
315
+ "$ref": "#/$defs/langInlineSegment"
316
+ }
317
+ },
318
+ "resolutions": {
319
+ "type": "object",
320
+ "additionalProperties": {
321
+ "$ref": "#/$defs/textResolution"
322
+ }
323
+ },
324
+ "missingLocales": {
325
+ "type": "array",
326
+ "items": {
327
+ "$ref": "#/$defs/nonEmptyString"
328
+ }
329
+ }
330
+ }
331
+ },
332
+ "localizedText": {
333
+ "type": "object",
334
+ "additionalProperties": {
335
+ "type": "string"
336
+ }
337
+ },
338
+ "langBlock": {
339
+ "type": "object",
340
+ "required": [
341
+ "kind",
342
+ "locale",
343
+ "fieldPath",
344
+ "text"
345
+ ],
346
+ "additionalProperties": true,
347
+ "properties": {
348
+ "kind": {
349
+ "const": "lang-block"
350
+ },
351
+ "locale": {
352
+ "$ref": "#/$defs/nonEmptyString"
353
+ },
354
+ "fieldPath": {
355
+ "$ref": "#/$defs/nonEmptyString"
356
+ },
357
+ "text": {
358
+ "type": "string"
359
+ },
360
+ "source": {
361
+ "$ref": "#/$defs/nonEmptyString"
362
+ },
363
+ "rangeInComment": {
364
+ "anyOf": [
365
+ {
366
+ "type": "null"
367
+ },
368
+ {
369
+ "$ref": "#/$defs/textRange"
370
+ }
371
+ ]
372
+ }
373
+ }
374
+ },
375
+ "langInlineSegment": {
376
+ "type": "object",
377
+ "required": [
378
+ "kind",
379
+ "id",
380
+ "fieldPath",
381
+ "raw",
382
+ "localized"
383
+ ],
384
+ "additionalProperties": true,
385
+ "properties": {
386
+ "kind": {
387
+ "const": "lang-inline"
388
+ },
389
+ "id": {
390
+ "$ref": "#/$defs/nonEmptyString"
391
+ },
392
+ "fieldPath": {
393
+ "$ref": "#/$defs/nonEmptyString"
394
+ },
395
+ "raw": {
396
+ "type": "string"
397
+ },
398
+ "localized": {
399
+ "$ref": "#/$defs/localizedText"
400
+ },
401
+ "key": {
402
+ "$ref": "#/$defs/nonEmptyString"
403
+ },
404
+ "path": {
405
+ "$ref": "#/$defs/nonEmptyString"
406
+ },
407
+ "rangeInField": {
408
+ "$ref": "#/$defs/textRange"
409
+ }
410
+ }
411
+ },
412
+ "textRange": {
413
+ "type": "object",
414
+ "required": [
415
+ "start",
416
+ "end"
417
+ ],
418
+ "additionalProperties": false,
419
+ "properties": {
420
+ "start": {
421
+ "type": "integer",
422
+ "minimum": 0,
423
+ "maximum": 9007199254740991
424
+ },
425
+ "end": {
426
+ "type": "integer",
427
+ "minimum": 0,
428
+ "maximum": 9007199254740991
429
+ }
430
+ }
431
+ },
432
+ "textResolution": {
433
+ "type": "object",
434
+ "required": [
435
+ "requestedLocale",
436
+ "resolvedLocale",
437
+ "fallbackChain",
438
+ "usedFallback",
439
+ "missing"
440
+ ],
441
+ "additionalProperties": true,
442
+ "properties": {
443
+ "requestedLocale": {
444
+ "$ref": "#/$defs/nonEmptyString"
445
+ },
446
+ "resolvedLocale": {
447
+ "type": "string"
448
+ },
449
+ "fallbackChain": {
450
+ "type": "array",
451
+ "items": {
452
+ "$ref": "#/$defs/nonEmptyString"
453
+ }
454
+ },
455
+ "usedFallback": {
456
+ "type": "boolean"
457
+ },
458
+ "missing": {
459
+ "type": "boolean"
460
+ },
461
+ "sourceKind": {
462
+ "$ref": "#/$defs/nonEmptyString"
463
+ },
464
+ "sourceLocale": {
465
+ "type": "string"
466
+ },
467
+ "source": {
468
+ "$ref": "#/$defs/nonEmptyString"
469
+ }
470
+ }
471
+ },
472
+ "sourcePosition": {
473
+ "type": "object",
474
+ "required": [
475
+ "line"
476
+ ],
477
+ "additionalProperties": true,
478
+ "properties": {
479
+ "line": {
480
+ "type": "integer",
481
+ "minimum": 1,
482
+ "maximum": 9007199254740991
483
+ },
484
+ "column": {
485
+ "type": "integer",
486
+ "minimum": 1,
487
+ "maximum": 9007199254740991
488
+ }
489
+ }
490
+ },
491
+ "sourceRange": {
492
+ "type": "object",
493
+ "required": [
494
+ "start",
495
+ "end"
496
+ ],
497
+ "additionalProperties": false,
498
+ "properties": {
499
+ "start": {
500
+ "$ref": "#/$defs/sourcePosition"
501
+ },
502
+ "end": {
503
+ "$ref": "#/$defs/sourcePosition"
504
+ }
505
+ }
506
+ },
507
+ "sourceLink": {
508
+ "type": "object",
509
+ "required": [
510
+ "enabled"
511
+ ],
512
+ "additionalProperties": true,
513
+ "properties": {
514
+ "enabled": {
515
+ "type": "boolean"
516
+ },
517
+ "fileUrl": {
518
+ "$ref": "#/$defs/nonEmptyString"
519
+ },
520
+ "lineUrl": {
521
+ "$ref": "#/$defs/nonEmptyString"
522
+ },
523
+ "openMode": {
524
+ "$ref": "#/$defs/nonEmptyString"
525
+ }
526
+ }
527
+ },
528
+ "sourcePreview": {
529
+ "type": "object",
530
+ "required": [
531
+ "enabled"
532
+ ],
533
+ "additionalProperties": true,
534
+ "properties": {
535
+ "enabled": {
536
+ "type": "boolean"
537
+ },
538
+ "defaultExpanded": {
539
+ "type": "boolean"
540
+ },
541
+ "content": {
542
+ "type": "string"
543
+ },
544
+ "language": {
545
+ "$ref": "#/$defs/nonEmptyString"
546
+ },
547
+ "range": {
548
+ "$ref": "#/$defs/sourceRange"
549
+ }
550
+ }
551
+ },
552
+ "sourceDefinedIn": {
553
+ "type": "object",
554
+ "required": [
555
+ "kind",
556
+ "relativePath",
557
+ "position"
558
+ ],
559
+ "additionalProperties": true,
560
+ "properties": {
561
+ "kind": {
562
+ "const": "defined-in"
563
+ },
564
+ "relativePath": {
565
+ "$ref": "#/$defs/nonEmptyString"
566
+ },
567
+ "language": {
568
+ "$ref": "#/$defs/nonEmptyString"
569
+ },
570
+ "position": {
571
+ "$ref": "#/$defs/sourcePosition"
572
+ },
573
+ "range": {
574
+ "$ref": "#/$defs/sourceRange"
575
+ },
576
+ "link": {
577
+ "$ref": "#/$defs/sourceLink"
578
+ }
579
+ }
580
+ },
581
+ "sourcePrimaryBlock": {
582
+ "type": "object",
583
+ "required": [
584
+ "kind",
585
+ "content",
586
+ "rangeSource",
587
+ "confidence"
588
+ ],
589
+ "additionalProperties": true,
590
+ "properties": {
591
+ "kind": {
592
+ "const": "primary-block"
593
+ },
594
+ "id": {
595
+ "$ref": "#/$defs/nonEmptyString"
596
+ },
597
+ "relativePath": {
598
+ "$ref": "#/$defs/nonEmptyString"
599
+ },
600
+ "language": {
601
+ "$ref": "#/$defs/nonEmptyString"
602
+ },
603
+ "range": {
604
+ "$ref": "#/$defs/sourceRange"
605
+ },
606
+ "content": {
607
+ "type": "string"
608
+ },
609
+ "rangeSource": {
610
+ "enum": [
611
+ "heuristic",
612
+ "parser",
613
+ "parser-js",
614
+ "jsdoc-meta",
615
+ "manual",
616
+ "unresolved"
617
+ ]
618
+ },
619
+ "confidence": {
620
+ "enum": [
621
+ "high",
622
+ "medium",
623
+ "low",
624
+ "none"
625
+ ]
626
+ },
627
+ "link": {
628
+ "$ref": "#/$defs/sourceLink"
629
+ },
630
+ "preview": {
631
+ "$ref": "#/$defs/sourcePreview"
632
+ },
633
+ "diagnostics": {
634
+ "type": "array",
635
+ "items": {
636
+ "$ref": "#/$defs/diagnostic"
637
+ }
638
+ }
639
+ }
640
+ },
641
+ "sourceReference": {
642
+ "type": "object",
643
+ "required": [
644
+ "kind",
645
+ "referenceKind",
646
+ "targetId",
647
+ "resolved"
648
+ ],
649
+ "additionalProperties": true,
650
+ "properties": {
651
+ "kind": {
652
+ "const": "source-reference"
653
+ },
654
+ "referenceKind": {
655
+ "$ref": "#/$defs/nonEmptyString"
656
+ },
657
+ "targetId": {
658
+ "$ref": "#/$defs/nonEmptyString"
659
+ },
660
+ "resolved": {
661
+ "type": "boolean"
662
+ },
663
+ "sourceNodeId": {
664
+ "$ref": "#/$defs/nonEmptyString"
665
+ },
666
+ "fieldPath": {
667
+ "$ref": "#/$defs/nonEmptyString"
668
+ },
669
+ "fragment": {
670
+ "$ref": "#/$defs/sourceFragment"
671
+ },
672
+ "diagnostics": {
673
+ "type": "array",
674
+ "items": {
675
+ "$ref": "#/$defs/diagnostic"
676
+ }
677
+ }
678
+ }
679
+ },
680
+ "sourceFragment": {
681
+ "type": "object",
682
+ "required": [
683
+ "kind",
684
+ "id",
685
+ "relativePath",
686
+ "range",
687
+ "content",
688
+ "rangeSource",
689
+ "confidence"
690
+ ],
691
+ "additionalProperties": true,
692
+ "properties": {
693
+ "kind": {
694
+ "const": "source-fragment"
695
+ },
696
+ "id": {
697
+ "$ref": "#/$defs/nonEmptyString"
698
+ },
699
+ "relativePath": {
700
+ "$ref": "#/$defs/nonEmptyString"
701
+ },
702
+ "language": {
703
+ "$ref": "#/$defs/nonEmptyString"
704
+ },
705
+ "range": {
706
+ "$ref": "#/$defs/sourceRange"
707
+ },
708
+ "content": {
709
+ "type": "string"
710
+ },
711
+ "rangeSource": {
712
+ "enum": [
713
+ "heuristic",
714
+ "parser",
715
+ "parser-js",
716
+ "jsdoc-meta",
717
+ "manual",
718
+ "unresolved"
719
+ ]
720
+ },
721
+ "confidence": {
722
+ "enum": [
723
+ "high",
724
+ "medium",
725
+ "low",
726
+ "none"
727
+ ]
728
+ },
729
+ "origin": {
730
+ "type": "object"
731
+ },
732
+ "link": {
733
+ "$ref": "#/$defs/sourceLink"
734
+ },
735
+ "preview": {
736
+ "$ref": "#/$defs/sourcePreview"
737
+ },
738
+ "diagnostics": {
739
+ "type": "array",
740
+ "items": {
741
+ "$ref": "#/$defs/diagnostic"
742
+ }
743
+ }
744
+ }
745
+ },
746
+ "sourceMetadata": {
747
+ "type": "object",
748
+ "required": [
749
+ "model",
750
+ "modelVersion",
751
+ "mode"
752
+ ],
753
+ "additionalProperties": true,
754
+ "properties": {
755
+ "model": {
756
+ "const": "hia-source"
757
+ },
758
+ "modelVersion": {
759
+ "enum": [
760
+ "1.0.0",
761
+ "0.2.0"
762
+ ]
763
+ },
764
+ "mode": {
765
+ "enum": [
766
+ "none",
767
+ "link",
768
+ "include",
769
+ "all"
770
+ ]
771
+ },
772
+ "definedIn": {
773
+ "$ref": "#/$defs/sourceDefinedIn"
774
+ },
775
+ "primaryBlock": {
776
+ "anyOf": [
777
+ {
778
+ "type": "null"
779
+ },
780
+ {
781
+ "$ref": "#/$defs/sourcePrimaryBlock"
782
+ }
783
+ ]
784
+ },
785
+ "references": {
786
+ "type": "array",
787
+ "items": {
788
+ "$ref": "#/$defs/sourceReference"
789
+ }
790
+ },
791
+ "fragments": {
792
+ "type": "array",
793
+ "items": {
794
+ "$ref": "#/$defs/sourceFragment"
795
+ }
796
+ },
797
+ "diagnostics": {
798
+ "type": "array",
799
+ "items": {
800
+ "$ref": "#/$defs/diagnostic"
801
+ }
802
+ }
803
+ }
804
+ },
805
+ "commandText": {
806
+ "type": "string",
807
+ "pattern": "\\S",
808
+ "description": "至少一个非空白字符。 / At least one non-whitespace character."
809
+ },
810
+ "commandToken": {
811
+ "type": "string",
812
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$",
813
+ "description": "调用名或路径段,不含空白及开关前缀。 / Invocation name or path token without whitespace or a switch prefix."
814
+ },
815
+ "commandSafePath": {
816
+ "type": "string",
817
+ "pattern": "^(?!\\.{1,2}(?:/|$))(?!.*?/\\.{1,2}(?:/|$))[^\\\\:/\\u0000-\\u001f\\u007f?#%]+(?:/[^\\\\:/\\u0000-\\u001f\\u007f?#%]+)*$",
818
+ "description": "安全相对POSIX来源路径,不携带查询、片段或编码跳转。 / Safe relative POSIX source path without query, fragment or encoded traversal."
819
+ },
820
+ "commandOwner": {
821
+ "type": "object",
822
+ "additionalProperties": false,
823
+ "required": [
824
+ "packageName",
825
+ "packageVersion"
826
+ ],
827
+ "description": "包归属与版本声明,注册表存在性独立验证。 / Package ownership and version declarations, with registry existence checked separately.",
828
+ "properties": {
829
+ "packageName": {
830
+ "$ref": "#/$defs/commandText",
831
+ "description": "原包名。 / Original package name."
832
+ },
833
+ "packageVersion": {
834
+ "$ref": "#/$defs/commandText",
835
+ "description": "精确包版本字符串。 / Exact package-version string."
836
+ }
837
+ }
838
+ },
839
+ "commandSource": {
840
+ "type": "object",
841
+ "additionalProperties": false,
842
+ "required": [
843
+ "id",
844
+ "path",
845
+ "sha256",
846
+ "language"
847
+ ],
848
+ "description": "来源原字节摘要,结构检查不读取文件。 / Digest of original source bytes; structure checking does not read files.",
849
+ "properties": {
850
+ "id": {
851
+ "$ref": "#/$defs/commandText",
852
+ "description": "本描述内来源身份。 / Source identity within this description."
853
+ },
854
+ "path": {
855
+ "$ref": "#/$defs/commandSafePath",
856
+ "description": "相对授权来源根的路径。 / Path relative to an authorized source root."
857
+ },
858
+ "sha256": {
859
+ "type": "string",
860
+ "pattern": "^[a-f0-9]{64}$",
861
+ "description": "原字节SHA-256。 / SHA-256 of original bytes."
862
+ },
863
+ "language": {
864
+ "$ref": "#/$defs/commandText",
865
+ "description": "原生语言标识。 / Native language identifier."
866
+ }
867
+ }
868
+ },
869
+ "commandField": {
870
+ "allOf": [
871
+ {
872
+ "$ref": "#/$defs/i18nField"
873
+ },
874
+ {
875
+ "type": "object",
876
+ "properties": {
877
+ "localizedText": {
878
+ "type": "object",
879
+ "required": [
880
+ "zh-CN",
881
+ "en"
882
+ ],
883
+ "properties": {
884
+ "zh-CN": {
885
+ "$ref": "#/$defs/commandText"
886
+ },
887
+ "en": {
888
+ "$ref": "#/$defs/commandText"
889
+ }
890
+ }
891
+ }
892
+ }
893
+ }
894
+ ],
895
+ "description": "复用字段语言模型,必须有实际中英正文。 / Reuse field localization with actual Chinese and English text."
896
+ },
897
+ "commandI18n": {
898
+ "allOf": [
899
+ {
900
+ "$ref": "#/$defs/i18nModel"
901
+ },
902
+ {
903
+ "type": "object",
904
+ "properties": {
905
+ "enabled": {
906
+ "const": true
907
+ },
908
+ "locales": {
909
+ "type": "array",
910
+ "uniqueItems": true,
911
+ "allOf": [
912
+ {
913
+ "contains": {
914
+ "const": "zh-CN"
915
+ }
916
+ },
917
+ {
918
+ "contains": {
919
+ "const": "en"
920
+ }
921
+ }
922
+ ]
923
+ },
924
+ "fields": {
925
+ "type": "object",
926
+ "required": [
927
+ "summary",
928
+ "description"
929
+ ],
930
+ "properties": {
931
+ "summary": {
932
+ "$ref": "#/$defs/commandField"
933
+ },
934
+ "description": {
935
+ "$ref": "#/$defs/commandField"
936
+ }
937
+ },
938
+ "additionalProperties": {
939
+ "$ref": "#/$defs/commandField"
940
+ }
941
+ }
942
+ }
943
+ }
944
+ ],
945
+ "description": "现有core字段级i18n,summary和description为必需正文。 / Existing core field i18n with required summary and description."
946
+ },
947
+ "commandEvidence": {
948
+ "type": "object",
949
+ "additionalProperties": false,
950
+ "required": [
951
+ "fieldPath",
952
+ "sourceId"
953
+ ],
954
+ "description": "逐字段来源绑定,范围约定沿文档源码映射1.1。 / Per-field provenance binding following documentation source-map 1.1 range conventions.",
955
+ "properties": {
956
+ "fieldPath": {
957
+ "$ref": "#/$defs/commandText",
958
+ "description": "描述内精确字段键。 / Exact field key within the description."
959
+ },
960
+ "sourceId": {
961
+ "$ref": "#/$defs/commandText",
962
+ "description": "显式来源身份,关联存在性由读取层核实。 / Explicit source identity, resolved by the consumer."
963
+ },
964
+ "range": {
965
+ "$ref": "#/$defs/sourceRange",
966
+ "description": "可选一基范围。 / Optional one-based range."
967
+ },
968
+ "rangeConvention": {
969
+ "type": "object",
970
+ "additionalProperties": false,
971
+ "required": [
972
+ "endBoundary",
973
+ "columnUnit"
974
+ ],
975
+ "description": "终点与列单位,未知值保留精度限制。 / End boundary and column unit, retaining unknown precision.",
976
+ "properties": {
977
+ "endBoundary": {
978
+ "enum": [
979
+ "inclusive",
980
+ "exclusive",
981
+ "unknown"
982
+ ],
983
+ "description": "终点约定。 / End-boundary convention."
984
+ },
985
+ "columnUnit": {
986
+ "enum": [
987
+ "utf16-code-unit",
988
+ "unicode-code-point",
989
+ "byte",
990
+ "unknown"
991
+ ],
992
+ "description": "列计量单位。 / Column unit."
993
+ }
994
+ }
995
+ }
996
+ },
997
+ "dependentRequired": {
998
+ "range": [
999
+ "rangeConvention"
1000
+ ],
1001
+ "rangeConvention": [
1002
+ "range"
1003
+ ]
1004
+ },
1005
+ "allOf": [
1006
+ {
1007
+ "if": {
1008
+ "required": [
1009
+ "rangeConvention"
1010
+ ],
1011
+ "properties": {
1012
+ "rangeConvention": {
1013
+ "type": "object",
1014
+ "required": [
1015
+ "columnUnit"
1016
+ ],
1017
+ "properties": {
1018
+ "columnUnit": {
1019
+ "enum": [
1020
+ "utf16-code-unit",
1021
+ "unicode-code-point",
1022
+ "byte"
1023
+ ]
1024
+ }
1025
+ }
1026
+ }
1027
+ }
1028
+ },
1029
+ "then": {
1030
+ "properties": {
1031
+ "range": {
1032
+ "type": "object",
1033
+ "properties": {
1034
+ "start": {
1035
+ "type": "object",
1036
+ "required": [
1037
+ "column"
1038
+ ],
1039
+ "properties": {
1040
+ "column": {
1041
+ "type": "integer",
1042
+ "minimum": 1,
1043
+ "maximum": 9007199254740991
1044
+ }
1045
+ }
1046
+ },
1047
+ "end": {
1048
+ "type": "object",
1049
+ "required": [
1050
+ "column"
1051
+ ],
1052
+ "properties": {
1053
+ "column": {
1054
+ "type": "integer",
1055
+ "minimum": 1,
1056
+ "maximum": 9007199254740991
1057
+ }
1058
+ }
1059
+ }
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+ ]
1066
+ },
1067
+ "commandDefaultRule": {
1068
+ "type": "object",
1069
+ "additionalProperties": false,
1070
+ "required": [
1071
+ "kind"
1072
+ ],
1073
+ "description": "区分字面量、条件、运行时决定与不适用,正文解释由字段i18n承载。 / Distinguish literal, conditional, runtime and inapplicable defaults, with explanations in field i18n.",
1074
+ "properties": {
1075
+ "kind": {
1076
+ "enum": [
1077
+ "literal",
1078
+ "conditional",
1079
+ "runtime",
1080
+ "not-applicable"
1081
+ ],
1082
+ "description": "默认规则类型。 / Default-rule kind."
1083
+ },
1084
+ "value": {
1085
+ "description": "字面量JSON值,保留false、0和null。 / Literal JSON value preserving false, zero and null."
1086
+ },
1087
+ "conditions": {
1088
+ "type": "array",
1089
+ "minItems": 1,
1090
+ "items": {
1091
+ "$ref": "#/$defs/commandText"
1092
+ },
1093
+ "description": "条件对应的精确语言字段键。 / Exact locale-field keys describing conditions."
1094
+ }
1095
+ },
1096
+ "allOf": [
1097
+ {
1098
+ "if": {
1099
+ "properties": {
1100
+ "kind": {
1101
+ "const": "literal"
1102
+ }
1103
+ }
1104
+ },
1105
+ "then": {
1106
+ "required": [
1107
+ "value"
1108
+ ],
1109
+ "properties": {
1110
+ "value": {}
1111
+ }
1112
+ },
1113
+ "else": {
1114
+ "not": {
1115
+ "required": [
1116
+ "value"
1117
+ ],
1118
+ "properties": {
1119
+ "value": {}
1120
+ }
1121
+ }
1122
+ }
1123
+ },
1124
+ {
1125
+ "if": {
1126
+ "properties": {
1127
+ "kind": {
1128
+ "const": "conditional"
1129
+ }
1130
+ }
1131
+ },
1132
+ "then": {
1133
+ "required": [
1134
+ "conditions"
1135
+ ],
1136
+ "properties": {
1137
+ "conditions": {}
1138
+ }
1139
+ },
1140
+ "else": {
1141
+ "not": {
1142
+ "required": [
1143
+ "conditions"
1144
+ ],
1145
+ "properties": {
1146
+ "conditions": {}
1147
+ }
1148
+ }
1149
+ }
1150
+ }
1151
+ ]
1152
+ },
1153
+ "commandParameter": {
1154
+ "type": "object",
1155
+ "additionalProperties": false,
1156
+ "required": [
1157
+ "id",
1158
+ "kind",
1159
+ "name",
1160
+ "valueType",
1161
+ "required",
1162
+ "multiple",
1163
+ "defaultRule",
1164
+ "i18n",
1165
+ "evidence"
1166
+ ],
1167
+ "description": "有序选项或位置参数声明;必选及重复规则由原解析器裁决。 / Ordered option or positional declaration; the original parser owns required and repetition semantics.",
1168
+ "properties": {
1169
+ "id": {
1170
+ "$ref": "#/$defs/commandText",
1171
+ "description": "本命令内参数身份。 / Parameter identity within the command."
1172
+ },
1173
+ "kind": {
1174
+ "enum": [
1175
+ "option",
1176
+ "positional"
1177
+ ],
1178
+ "description": "参数种类。 / Parameter kind."
1179
+ },
1180
+ "name": {
1181
+ "$ref": "#/$defs/commandToken",
1182
+ "description": "选项长名或位置参数显示名。 / Long option name or positional display name."
1183
+ },
1184
+ "short": {
1185
+ "type": "string",
1186
+ "pattern": "^[A-Za-z0-9]$",
1187
+ "description": "可选单ASCII字符短名。 / Optional single ASCII short name."
1188
+ },
1189
+ "valueType": {
1190
+ "enum": [
1191
+ "string",
1192
+ "boolean",
1193
+ "number",
1194
+ "integer"
1195
+ ],
1196
+ "description": "声明值类型。 / Declared value type."
1197
+ },
1198
+ "required": {
1199
+ "type": "boolean",
1200
+ "description": "无条件必选声明,条件要求记录在语言字段。 / Unconditionally required declaration; conditional requirements live in locale fields."
1201
+ },
1202
+ "multiple": {
1203
+ "type": "boolean",
1204
+ "description": "是否接受多个值,具体覆盖/收集规则另记正文。 / Whether multiple values are accepted; prose records replacement or collection behavior."
1205
+ },
1206
+ "choices": {
1207
+ "type": "array",
1208
+ "minItems": 1,
1209
+ "uniqueItems": true,
1210
+ "items": {
1211
+ "$ref": "#/$defs/commandText"
1212
+ },
1213
+ "description": "可选值域。 / Optional choices."
1214
+ },
1215
+ "defaultRule": {
1216
+ "$ref": "#/$defs/commandDefaultRule",
1217
+ "description": "显式默认规则。 / Explicit default rule."
1218
+ },
1219
+ "i18n": {
1220
+ "$ref": "#/$defs/commandI18n",
1221
+ "description": "参数双语语义及限制。 / Bilingual parameter meaning and constraints."
1222
+ },
1223
+ "evidence": {
1224
+ "type": "array",
1225
+ "minItems": 1,
1226
+ "items": {
1227
+ "$ref": "#/$defs/commandEvidence"
1228
+ },
1229
+ "description": "逐字段来源。 / Per-field provenance."
1230
+ }
1231
+ },
1232
+ "allOf": [
1233
+ {
1234
+ "if": {
1235
+ "properties": {
1236
+ "kind": {
1237
+ "const": "positional"
1238
+ }
1239
+ }
1240
+ },
1241
+ "then": {
1242
+ "not": {
1243
+ "required": [
1244
+ "short"
1245
+ ],
1246
+ "properties": {
1247
+ "short": {}
1248
+ }
1249
+ }
1250
+ }
1251
+ }
1252
+ ]
1253
+ },
1254
+ "commandDeclaration": {
1255
+ "type": "object",
1256
+ "additionalProperties": false,
1257
+ "required": [
1258
+ "id",
1259
+ "executable",
1260
+ "path",
1261
+ "kind",
1262
+ "signature",
1263
+ "i18n",
1264
+ "displayVersion",
1265
+ "parsing",
1266
+ "options",
1267
+ "positionals",
1268
+ "examples",
1269
+ "effects",
1270
+ "exitCodes",
1271
+ "evidence"
1272
+ ],
1273
+ "description": "命令或命令组的元数据,不执行其中示例。 / Command or group metadata, without executing examples.",
1274
+ "properties": {
1275
+ "id": {
1276
+ "$ref": "#/$defs/commandText",
1277
+ "description": "本描述内命令身份。 / Command identity within this description."
1278
+ },
1279
+ "executable": {
1280
+ "$ref": "#/$defs/commandToken",
1281
+ "description": "真实bin调用名。 / Actual bin invocation name."
1282
+ },
1283
+ "path": {
1284
+ "type": "array",
1285
+ "items": {
1286
+ "$ref": "#/$defs/commandToken"
1287
+ },
1288
+ "description": "有序子命令段,根为空数组。 / Ordered subcommand tokens, empty for a root."
1289
+ },
1290
+ "kind": {
1291
+ "enum": [
1292
+ "group",
1293
+ "command"
1294
+ ],
1295
+ "description": "组或可执行叶。 / Group or executable leaf."
1296
+ },
1297
+ "aliasOf": {
1298
+ "$ref": "#/$defs/commandText",
1299
+ "description": "可选别名目标身份,消费层另核闭合与循环。 / Optional alias target identity, separately checked for closure and cycles."
1300
+ },
1301
+ "signature": {
1302
+ "$ref": "#/$defs/commandText",
1303
+ "description": "原生调用语法。 / Native invocation syntax."
1304
+ },
1305
+ "i18n": {
1306
+ "$ref": "#/$defs/commandI18n",
1307
+ "description": "用途、条件、路径及效果的字段正文。 / Field prose for purpose, conditions, paths and effects."
1308
+ },
1309
+ "displayVersion": {
1310
+ "type": "object",
1311
+ "additionalProperties": false,
1312
+ "required": [
1313
+ "kind",
1314
+ "value"
1315
+ ],
1316
+ "description": "帮助/版本使用的独立身份。 / Independent identity used in help or version output.",
1317
+ "properties": {
1318
+ "kind": {
1319
+ "enum": [
1320
+ "package",
1321
+ "artifact",
1322
+ "runner",
1323
+ "none"
1324
+ ],
1325
+ "description": "版本身份种类。 / Version identity kind."
1326
+ },
1327
+ "value": {
1328
+ "type": "string",
1329
+ "description": "原版本显示值;none可为空。 / Original display value, optionally empty for none."
1330
+ }
1331
+ }
1332
+ },
1333
+ "parsing": {
1334
+ "type": "object",
1335
+ "additionalProperties": false,
1336
+ "required": [
1337
+ "helpOrder",
1338
+ "unknownOptions"
1339
+ ],
1340
+ "description": "记录原解析行为,不改变执行。 / Record original parsing behavior without changing execution.",
1341
+ "properties": {
1342
+ "helpOrder": {
1343
+ "enum": [
1344
+ "before-dispatch",
1345
+ "after-argument-validation"
1346
+ ],
1347
+ "description": "帮助处理阶段。 / Help-processing stage."
1348
+ },
1349
+ "unknownOptions": {
1350
+ "enum": [
1351
+ "reject",
1352
+ "ignore",
1353
+ "command-specific"
1354
+ ],
1355
+ "description": "未知选项策略。 / Unknown-option policy."
1356
+ }
1357
+ }
1358
+ },
1359
+ "options": {
1360
+ "type": "array",
1361
+ "items": {
1362
+ "allOf": [
1363
+ {
1364
+ "$ref": "#/$defs/commandParameter"
1365
+ },
1366
+ {
1367
+ "type": "object",
1368
+ "properties": {
1369
+ "kind": {
1370
+ "const": "option"
1371
+ }
1372
+ }
1373
+ }
1374
+ ]
1375
+ },
1376
+ "description": "有序命名选项。 / Ordered named options."
1377
+ },
1378
+ "positionals": {
1379
+ "type": "array",
1380
+ "items": {
1381
+ "allOf": [
1382
+ {
1383
+ "$ref": "#/$defs/commandParameter"
1384
+ },
1385
+ {
1386
+ "type": "object",
1387
+ "properties": {
1388
+ "kind": {
1389
+ "const": "positional"
1390
+ }
1391
+ }
1392
+ }
1393
+ ]
1394
+ },
1395
+ "description": "有序位置参数。 / Ordered positional arguments."
1396
+ },
1397
+ "examples": {
1398
+ "type": "array",
1399
+ "items": {
1400
+ "$ref": "#/$defs/commandText"
1401
+ },
1402
+ "description": "公开安全调用例子。 / Public-safe invocation examples."
1403
+ },
1404
+ "effects": {
1405
+ "type": "object",
1406
+ "additionalProperties": false,
1407
+ "required": [
1408
+ "filesystem",
1409
+ "network"
1410
+ ],
1411
+ "description": "已声明效果,具体作用域由正文与原实现约束。 / Declared effects, with scope constrained by prose and implementation.",
1412
+ "properties": {
1413
+ "filesystem": {
1414
+ "enum": [
1415
+ "none",
1416
+ "read",
1417
+ "write",
1418
+ "read-write"
1419
+ ],
1420
+ "description": "文件系统效果。 / Filesystem effect."
1421
+ },
1422
+ "network": {
1423
+ "enum": [
1424
+ "none",
1425
+ "explicit"
1426
+ ],
1427
+ "description": "网络效果声明。 / Network-effect declaration."
1428
+ }
1429
+ }
1430
+ },
1431
+ "exitCodes": {
1432
+ "type": "array",
1433
+ "minItems": 1,
1434
+ "description": "退出码及其双语语义。 / Exit codes and bilingual meanings.",
1435
+ "items": {
1436
+ "type": "object",
1437
+ "additionalProperties": false,
1438
+ "required": [
1439
+ "code",
1440
+ "i18n"
1441
+ ],
1442
+ "properties": {
1443
+ "code": {
1444
+ "type": "integer",
1445
+ "minimum": 0,
1446
+ "description": "原非负退出码。 / Original nonnegative exit code."
1447
+ },
1448
+ "i18n": {
1449
+ "$ref": "#/$defs/commandI18n",
1450
+ "description": "对应状态语义。 / Meaning of this status."
1451
+ }
1452
+ }
1453
+ }
1454
+ },
1455
+ "evidence": {
1456
+ "type": "array",
1457
+ "minItems": 1,
1458
+ "items": {
1459
+ "$ref": "#/$defs/commandEvidence"
1460
+ },
1461
+ "description": "用途及各语义字段的来源。 / Provenance for purpose and semantic fields."
1462
+ }
1463
+ }
1464
+ }
1465
+ }
1466
+ }