@meantjs/profile 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1118 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:candid-profile:v0:schema",
4
+ "title": "Candid Profile v0",
5
+ "description": "Meaning for positions in a Candid interface (units, formats, intent, risk, idempotency, outcome classes). Normative prose: docs/profile-v0.md. Structural checks only; address resolution and tag applicability are checked by scripts/validate.mjs.",
6
+ "type": "object",
7
+ "required": [
8
+ "format",
9
+ "format_version",
10
+ "kind",
11
+ "name",
12
+ "origin",
13
+ "binds",
14
+ "annotations"
15
+ ],
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "format": {
19
+ "const": "candid-profile"
20
+ },
21
+ "format_version": {
22
+ "const": 0
23
+ },
24
+ "kind": {
25
+ "enum": [
26
+ "canister",
27
+ "pack",
28
+ "contract"
29
+ ]
30
+ },
31
+ "name": {
32
+ "type": "string",
33
+ "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$"
34
+ },
35
+ "origin": {
36
+ "enum": [
37
+ "author",
38
+ "third_party",
39
+ "pack",
40
+ "inferred"
41
+ ]
42
+ },
43
+ "language": {
44
+ "type": "string",
45
+ "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
46
+ "default": "en"
47
+ },
48
+ "description": {
49
+ "type": "string"
50
+ },
51
+ "binds": {
52
+ "type": "object"
53
+ },
54
+ "annotations": {
55
+ "type": "array",
56
+ "minItems": 1,
57
+ "items": {
58
+ "$ref": "#/$defs/annotation"
59
+ }
60
+ }
61
+ },
62
+ "allOf": [
63
+ {
64
+ "if": {
65
+ "properties": {
66
+ "kind": {
67
+ "const": "pack"
68
+ }
69
+ }
70
+ },
71
+ "then": {
72
+ "properties": {
73
+ "origin": {
74
+ "const": "pack"
75
+ },
76
+ "binds": {
77
+ "$ref": "#/$defs/pack_binds"
78
+ }
79
+ }
80
+ }
81
+ },
82
+ {
83
+ "if": {
84
+ "properties": {
85
+ "kind": {
86
+ "const": "canister"
87
+ }
88
+ }
89
+ },
90
+ "then": {
91
+ "properties": {
92
+ "origin": {
93
+ "enum": [
94
+ "author",
95
+ "third_party",
96
+ "inferred"
97
+ ]
98
+ },
99
+ "binds": {
100
+ "$ref": "#/$defs/canister_binds"
101
+ }
102
+ }
103
+ }
104
+ },
105
+ {
106
+ "if": {
107
+ "properties": {
108
+ "kind": {
109
+ "const": "contract"
110
+ }
111
+ }
112
+ },
113
+ "then": {
114
+ "properties": {
115
+ "origin": {
116
+ "enum": [
117
+ "author",
118
+ "third_party",
119
+ "inferred"
120
+ ]
121
+ },
122
+ "binds": {
123
+ "$ref": "#/$defs/contract_binds"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ ],
129
+ "$defs": {
130
+ "pack_binds": {
131
+ "type": "object",
132
+ "required": [
133
+ "standard"
134
+ ],
135
+ "additionalProperties": false,
136
+ "properties": {
137
+ "standard": {
138
+ "type": "string",
139
+ "pattern": "^[A-Z]+-[0-9]+$"
140
+ },
141
+ "spec_url": {
142
+ "type": "string",
143
+ "pattern": "^https://"
144
+ },
145
+ "requires": {
146
+ "type": "string",
147
+ "minLength": 10,
148
+ "description": "A Candid service fragment. The pack applies to a canister whose service type is a subtype of this fragment."
149
+ },
150
+ "abi": {
151
+ "$ref": "#/$defs/evm_abi",
152
+ "description": "An EVM pack (spec section 15, experimental): the functions it applies to. The pack applies to a contract that has each of them, with the same selector, outputs and kind of call."
153
+ }
154
+ },
155
+ "oneOf": [
156
+ {
157
+ "required": [
158
+ "requires"
159
+ ],
160
+ "properties": {
161
+ "requires": true
162
+ }
163
+ },
164
+ {
165
+ "required": [
166
+ "abi"
167
+ ],
168
+ "properties": {
169
+ "abi": true
170
+ }
171
+ }
172
+ ]
173
+ },
174
+ "canister_binds": {
175
+ "type": "object",
176
+ "required": [
177
+ "interface_id"
178
+ ],
179
+ "additionalProperties": false,
180
+ "properties": {
181
+ "interface_id": {
182
+ "type": "string",
183
+ "pattern": "^candid-core:interface:v1:sha256:[0-9a-f]{64}$"
184
+ },
185
+ "contract_id": {
186
+ "type": "string",
187
+ "pattern": "^candid-core:contract:v1:sha256:[0-9a-f]{64}$"
188
+ },
189
+ "canister_id": {
190
+ "type": "string",
191
+ "pattern": "^[a-z0-9]{5}(-[a-z0-9]{5})*(-[a-z0-9]{1,5})?$"
192
+ }
193
+ }
194
+ },
195
+ "contract_binds": {
196
+ "type": "object",
197
+ "description": "An EVM contract (spec section 15, experimental): its ABI, and where it is deployed.",
198
+ "required": [
199
+ "abi"
200
+ ],
201
+ "additionalProperties": false,
202
+ "properties": {
203
+ "abi": {
204
+ "$ref": "#/$defs/evm_abi"
205
+ },
206
+ "deployments": {
207
+ "type": "array",
208
+ "minItems": 1,
209
+ "description": "The chain ids and addresses the profile describes (ERC-7730 context.contract.deployments). A consumer applies the profile to a call only when its target is listed.",
210
+ "items": {
211
+ "type": "object",
212
+ "required": [
213
+ "chain_id",
214
+ "address"
215
+ ],
216
+ "additionalProperties": false,
217
+ "properties": {
218
+ "chain_id": {
219
+ "type": "integer",
220
+ "minimum": 1
221
+ },
222
+ "address": {
223
+ "type": "string",
224
+ "pattern": "^0x[0-9a-fA-F]{40}$"
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
230
+ },
231
+ "evm_abi": {
232
+ "type": "array",
233
+ "minItems": 1,
234
+ "description": "EVM ABI function fragments: human-readable (`function transfer(address to, uint256 value) returns (bool)`) or JSON ABI entries. Only functions are read; events, errors, the constructor, fallback and receive are skipped. Parameter names are what addresses use.",
235
+ "items": {
236
+ "oneOf": [
237
+ {
238
+ "type": "string",
239
+ "pattern": "^\\s*(function|event|error|constructor|fallback|receive)\\b"
240
+ },
241
+ {
242
+ "type": "object",
243
+ "required": [
244
+ "type"
245
+ ],
246
+ "properties": {
247
+ "type": {
248
+ "enum": [
249
+ "function",
250
+ "event",
251
+ "error",
252
+ "constructor",
253
+ "fallback",
254
+ "receive"
255
+ ]
256
+ }
257
+ }
258
+ }
259
+ ]
260
+ }
261
+ },
262
+ "value_address": {
263
+ "type": "string",
264
+ "description": "METHOD(i)path | METHOD->(i)path | type:DECL path. Paths: .label, .#id, [] (vec element). opt is transparent.",
265
+ "pattern": "^(([A-Za-z_][A-Za-z0-9_]*)(\\((0|[1-9][0-9]*)\\)|->\\((0|[1-9][0-9]*)\\))|type:[A-Za-z_][A-Za-z0-9_]*)((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"
266
+ },
267
+ "method_address": {
268
+ "type": "string",
269
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
270
+ },
271
+ "relpath": {
272
+ "type": "string",
273
+ "description": "Path relative to a method's argument tuple (or result tuple, for outcome/list.next/list.items). Starts with (i) when the tuple has more than one element; otherwise relative to element 0.",
274
+ "pattern": "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$",
275
+ "minLength": 1
276
+ },
277
+ "int_string": {
278
+ "type": "string",
279
+ "pattern": "^(0|-?[1-9][0-9]*)$"
280
+ },
281
+ "dynamic": {
282
+ "type": "object",
283
+ "required": [
284
+ "from"
285
+ ],
286
+ "additionalProperties": false,
287
+ "properties": {
288
+ "from": {
289
+ "type": "string",
290
+ "pattern": "^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"
291
+ }
292
+ }
293
+ },
294
+ "time_unit": {
295
+ "enum": [
296
+ "ns",
297
+ "us",
298
+ "ms",
299
+ "s"
300
+ ]
301
+ },
302
+ "outcome_class": {
303
+ "enum": [
304
+ "success",
305
+ "already_done",
306
+ "retry_same",
307
+ "retry_new",
308
+ "fix_input",
309
+ "fail"
310
+ ]
311
+ },
312
+ "annotation": {
313
+ "type": "object",
314
+ "required": [
315
+ "at",
316
+ "tag",
317
+ "args"
318
+ ],
319
+ "additionalProperties": false,
320
+ "properties": {
321
+ "at": {
322
+ "type": "string"
323
+ },
324
+ "tag": {
325
+ "enum": [
326
+ "amount",
327
+ "timestamp",
328
+ "duration",
329
+ "account",
330
+ "subaccount",
331
+ "bytes",
332
+ "text",
333
+ "range",
334
+ "default",
335
+ "describe",
336
+ "ui",
337
+ "intent",
338
+ "effect",
339
+ "idempotency",
340
+ "outcome",
341
+ "list",
342
+ "names",
343
+ "named"
344
+ ]
345
+ },
346
+ "args": {
347
+ "type": "object"
348
+ },
349
+ "note": {
350
+ "type": "string"
351
+ }
352
+ },
353
+ "allOf": [
354
+ {
355
+ "if": {
356
+ "properties": {
357
+ "tag": {
358
+ "enum": [
359
+ "idempotency",
360
+ "outcome",
361
+ "list",
362
+ "names"
363
+ ]
364
+ }
365
+ }
366
+ },
367
+ "then": {
368
+ "properties": {
369
+ "at": {
370
+ "$ref": "#/$defs/method_address"
371
+ }
372
+ }
373
+ }
374
+ },
375
+ {
376
+ "if": {
377
+ "properties": {
378
+ "tag": {
379
+ "enum": [
380
+ "intent",
381
+ "effect"
382
+ ]
383
+ }
384
+ }
385
+ },
386
+ "then": {
387
+ "properties": {
388
+ "at": {
389
+ "anyOf": [
390
+ {
391
+ "$ref": "#/$defs/method_address"
392
+ },
393
+ {
394
+ "$ref": "#/$defs/value_address"
395
+ }
396
+ ]
397
+ }
398
+ }
399
+ }
400
+ },
401
+ {
402
+ "if": {
403
+ "properties": {
404
+ "tag": {
405
+ "enum": [
406
+ "amount",
407
+ "timestamp",
408
+ "duration",
409
+ "account",
410
+ "subaccount",
411
+ "bytes",
412
+ "text",
413
+ "range",
414
+ "default",
415
+ "ui",
416
+ "named"
417
+ ]
418
+ }
419
+ }
420
+ },
421
+ "then": {
422
+ "properties": {
423
+ "at": {
424
+ "$ref": "#/$defs/value_address"
425
+ }
426
+ }
427
+ }
428
+ },
429
+ {
430
+ "if": {
431
+ "properties": {
432
+ "tag": {
433
+ "const": "describe"
434
+ }
435
+ }
436
+ },
437
+ "then": {
438
+ "properties": {
439
+ "at": {
440
+ "anyOf": [
441
+ {
442
+ "$ref": "#/$defs/value_address"
443
+ },
444
+ {
445
+ "$ref": "#/$defs/method_address"
446
+ }
447
+ ]
448
+ }
449
+ }
450
+ }
451
+ },
452
+ {
453
+ "if": {
454
+ "properties": {
455
+ "tag": {
456
+ "const": "amount"
457
+ }
458
+ }
459
+ },
460
+ "then": {
461
+ "properties": {
462
+ "args": {
463
+ "$ref": "#/$defs/args_amount"
464
+ }
465
+ }
466
+ }
467
+ },
468
+ {
469
+ "if": {
470
+ "properties": {
471
+ "tag": {
472
+ "const": "timestamp"
473
+ }
474
+ }
475
+ },
476
+ "then": {
477
+ "properties": {
478
+ "args": {
479
+ "$ref": "#/$defs/args_timestamp"
480
+ }
481
+ }
482
+ }
483
+ },
484
+ {
485
+ "if": {
486
+ "properties": {
487
+ "tag": {
488
+ "const": "duration"
489
+ }
490
+ }
491
+ },
492
+ "then": {
493
+ "properties": {
494
+ "args": {
495
+ "$ref": "#/$defs/args_duration"
496
+ }
497
+ }
498
+ }
499
+ },
500
+ {
501
+ "if": {
502
+ "properties": {
503
+ "tag": {
504
+ "const": "account"
505
+ }
506
+ }
507
+ },
508
+ "then": {
509
+ "properties": {
510
+ "args": {
511
+ "$ref": "#/$defs/args_account"
512
+ }
513
+ }
514
+ }
515
+ },
516
+ {
517
+ "if": {
518
+ "properties": {
519
+ "tag": {
520
+ "const": "subaccount"
521
+ }
522
+ }
523
+ },
524
+ "then": {
525
+ "properties": {
526
+ "args": {
527
+ "$ref": "#/$defs/args_empty"
528
+ }
529
+ }
530
+ }
531
+ },
532
+ {
533
+ "if": {
534
+ "properties": {
535
+ "tag": {
536
+ "const": "bytes"
537
+ }
538
+ }
539
+ },
540
+ "then": {
541
+ "properties": {
542
+ "args": {
543
+ "$ref": "#/$defs/args_bytes"
544
+ }
545
+ }
546
+ }
547
+ },
548
+ {
549
+ "if": {
550
+ "properties": {
551
+ "tag": {
552
+ "const": "text"
553
+ }
554
+ }
555
+ },
556
+ "then": {
557
+ "properties": {
558
+ "args": {
559
+ "$ref": "#/$defs/args_text"
560
+ }
561
+ }
562
+ }
563
+ },
564
+ {
565
+ "if": {
566
+ "properties": {
567
+ "tag": {
568
+ "const": "range"
569
+ }
570
+ }
571
+ },
572
+ "then": {
573
+ "properties": {
574
+ "args": {
575
+ "$ref": "#/$defs/args_range"
576
+ }
577
+ }
578
+ }
579
+ },
580
+ {
581
+ "if": {
582
+ "properties": {
583
+ "tag": {
584
+ "const": "default"
585
+ }
586
+ }
587
+ },
588
+ "then": {
589
+ "properties": {
590
+ "args": {
591
+ "$ref": "#/$defs/args_default"
592
+ }
593
+ }
594
+ }
595
+ },
596
+ {
597
+ "if": {
598
+ "properties": {
599
+ "tag": {
600
+ "const": "describe"
601
+ }
602
+ }
603
+ },
604
+ "then": {
605
+ "properties": {
606
+ "args": {
607
+ "$ref": "#/$defs/args_describe"
608
+ }
609
+ }
610
+ }
611
+ },
612
+ {
613
+ "if": {
614
+ "properties": {
615
+ "tag": {
616
+ "const": "ui"
617
+ }
618
+ }
619
+ },
620
+ "then": {
621
+ "properties": {
622
+ "args": {
623
+ "$ref": "#/$defs/args_ui"
624
+ }
625
+ }
626
+ }
627
+ },
628
+ {
629
+ "if": {
630
+ "properties": {
631
+ "tag": {
632
+ "const": "intent"
633
+ }
634
+ }
635
+ },
636
+ "then": {
637
+ "properties": {
638
+ "args": {
639
+ "$ref": "#/$defs/args_intent"
640
+ }
641
+ }
642
+ }
643
+ },
644
+ {
645
+ "if": {
646
+ "properties": {
647
+ "tag": {
648
+ "const": "effect"
649
+ }
650
+ }
651
+ },
652
+ "then": {
653
+ "properties": {
654
+ "args": {
655
+ "$ref": "#/$defs/args_effect"
656
+ }
657
+ }
658
+ }
659
+ },
660
+ {
661
+ "if": {
662
+ "properties": {
663
+ "tag": {
664
+ "const": "idempotency"
665
+ }
666
+ }
667
+ },
668
+ "then": {
669
+ "properties": {
670
+ "args": {
671
+ "$ref": "#/$defs/args_idempotency"
672
+ }
673
+ }
674
+ }
675
+ },
676
+ {
677
+ "if": {
678
+ "properties": {
679
+ "tag": {
680
+ "const": "outcome"
681
+ }
682
+ }
683
+ },
684
+ "then": {
685
+ "properties": {
686
+ "args": {
687
+ "$ref": "#/$defs/args_outcome"
688
+ }
689
+ }
690
+ }
691
+ },
692
+ {
693
+ "if": {
694
+ "properties": {
695
+ "tag": {
696
+ "const": "list"
697
+ }
698
+ }
699
+ },
700
+ "then": {
701
+ "properties": {
702
+ "args": {
703
+ "$ref": "#/$defs/args_list"
704
+ }
705
+ }
706
+ }
707
+ },
708
+ {
709
+ "if": {
710
+ "properties": {
711
+ "tag": {
712
+ "const": "names"
713
+ }
714
+ }
715
+ },
716
+ "then": {
717
+ "properties": {
718
+ "args": {
719
+ "$ref": "#/$defs/args_names"
720
+ }
721
+ }
722
+ }
723
+ },
724
+ {
725
+ "if": {
726
+ "properties": {
727
+ "tag": {
728
+ "const": "named"
729
+ }
730
+ }
731
+ },
732
+ "then": {
733
+ "properties": {
734
+ "args": {
735
+ "$ref": "#/$defs/args_named"
736
+ }
737
+ }
738
+ }
739
+ }
740
+ ]
741
+ },
742
+ "args_empty": {
743
+ "type": "object",
744
+ "additionalProperties": false,
745
+ "maxProperties": 0
746
+ },
747
+ "args_amount": {
748
+ "type": "object",
749
+ "required": [
750
+ "decimals"
751
+ ],
752
+ "additionalProperties": false,
753
+ "properties": {
754
+ "decimals": {
755
+ "oneOf": [
756
+ {
757
+ "type": "integer",
758
+ "minimum": 0,
759
+ "maximum": 255
760
+ },
761
+ {
762
+ "$ref": "#/$defs/dynamic"
763
+ }
764
+ ]
765
+ },
766
+ "symbol": {
767
+ "oneOf": [
768
+ {
769
+ "type": "string",
770
+ "minLength": 1,
771
+ "maxLength": 32
772
+ },
773
+ {
774
+ "$ref": "#/$defs/dynamic"
775
+ }
776
+ ]
777
+ },
778
+ "threshold": {
779
+ "type": "string",
780
+ "pattern": "^(0|[1-9][0-9]{0,77})$",
781
+ "description": "Display only: a value at or above this (base units, a decimal string) displays as `message` and the symbol, for example \"Unlimited USDC\" (spec section 5.3)."
782
+ },
783
+ "message": {
784
+ "type": "string",
785
+ "minLength": 1,
786
+ "maxLength": 32,
787
+ "description": "What a value at or above `threshold` displays as (default \"Unlimited\")."
788
+ }
789
+ },
790
+ "dependentRequired": {
791
+ "message": [
792
+ "threshold"
793
+ ]
794
+ }
795
+ },
796
+ "args_timestamp": {
797
+ "type": "object",
798
+ "required": [
799
+ "unit"
800
+ ],
801
+ "additionalProperties": false,
802
+ "properties": {
803
+ "unit": {
804
+ "$ref": "#/$defs/time_unit"
805
+ },
806
+ "epoch": {
807
+ "const": "unix"
808
+ }
809
+ }
810
+ },
811
+ "args_duration": {
812
+ "type": "object",
813
+ "required": [
814
+ "unit"
815
+ ],
816
+ "additionalProperties": false,
817
+ "properties": {
818
+ "unit": {
819
+ "$ref": "#/$defs/time_unit"
820
+ }
821
+ }
822
+ },
823
+ "args_account": {
824
+ "type": "object",
825
+ "additionalProperties": false,
826
+ "properties": {
827
+ "encoding": {
828
+ "const": "icrc1"
829
+ }
830
+ }
831
+ },
832
+ "args_bytes": {
833
+ "type": "object",
834
+ "required": [
835
+ "encoding"
836
+ ],
837
+ "additionalProperties": false,
838
+ "properties": {
839
+ "encoding": {
840
+ "enum": [
841
+ "utf8",
842
+ "hex",
843
+ "base64"
844
+ ]
845
+ },
846
+ "max_len": {
847
+ "type": "integer",
848
+ "minimum": 0
849
+ }
850
+ }
851
+ },
852
+ "args_text": {
853
+ "type": "object",
854
+ "additionalProperties": false,
855
+ "minProperties": 1,
856
+ "properties": {
857
+ "format": {
858
+ "enum": [
859
+ "plain",
860
+ "markdown",
861
+ "email",
862
+ "url"
863
+ ]
864
+ },
865
+ "max_len": {
866
+ "type": "integer",
867
+ "minimum": 0
868
+ },
869
+ "pattern": {
870
+ "type": "string"
871
+ }
872
+ }
873
+ },
874
+ "args_range": {
875
+ "type": "object",
876
+ "additionalProperties": false,
877
+ "minProperties": 1,
878
+ "properties": {
879
+ "min": {
880
+ "$ref": "#/$defs/int_string"
881
+ },
882
+ "max": {
883
+ "$ref": "#/$defs/int_string"
884
+ },
885
+ "min_len": {
886
+ "type": "integer",
887
+ "minimum": 0
888
+ },
889
+ "max_len": {
890
+ "type": "integer",
891
+ "minimum": 0
892
+ }
893
+ }
894
+ },
895
+ "args_default": {
896
+ "type": "object",
897
+ "required": [
898
+ "value",
899
+ "mode"
900
+ ],
901
+ "additionalProperties": false,
902
+ "properties": {
903
+ "value": {
904
+ "oneOf": [
905
+ {
906
+ "type": "string",
907
+ "description": "Candid textual literal, e.g. \"null\" or \"opt 0\""
908
+ },
909
+ {
910
+ "$ref": "#/$defs/dynamic"
911
+ }
912
+ ]
913
+ },
914
+ "mode": {
915
+ "enum": [
916
+ "auto",
917
+ "suggest"
918
+ ]
919
+ }
920
+ }
921
+ },
922
+ "args_describe": {
923
+ "type": "object",
924
+ "additionalProperties": false,
925
+ "minProperties": 1,
926
+ "properties": {
927
+ "label": {
928
+ "type": "string",
929
+ "minLength": 1,
930
+ "maxLength": 80
931
+ },
932
+ "help": {
933
+ "type": "string",
934
+ "minLength": 1,
935
+ "maxLength": 2000
936
+ }
937
+ }
938
+ },
939
+ "args_ui": {
940
+ "type": "object",
941
+ "additionalProperties": false,
942
+ "minProperties": 1,
943
+ "properties": {
944
+ "order": {
945
+ "type": "integer"
946
+ },
947
+ "group": {
948
+ "type": "string"
949
+ },
950
+ "hidden": {
951
+ "type": "boolean"
952
+ },
953
+ "widget": {
954
+ "type": "string"
955
+ }
956
+ }
957
+ },
958
+ "args_intent": {
959
+ "type": "object",
960
+ "required": [
961
+ "title",
962
+ "template"
963
+ ],
964
+ "additionalProperties": false,
965
+ "properties": {
966
+ "title": {
967
+ "type": "string",
968
+ "minLength": 1,
969
+ "maxLength": 60
970
+ },
971
+ "template": {
972
+ "type": "string",
973
+ "minLength": 1,
974
+ "maxLength": 500
975
+ }
976
+ }
977
+ },
978
+ "args_effect": {
979
+ "type": "object",
980
+ "required": [
981
+ "kind",
982
+ "irreversible"
983
+ ],
984
+ "additionalProperties": false,
985
+ "properties": {
986
+ "kind": {
987
+ "enum": [
988
+ "read",
989
+ "write",
990
+ "transfer",
991
+ "approve",
992
+ "admin",
993
+ "destroy"
994
+ ]
995
+ },
996
+ "irreversible": {
997
+ "type": "boolean"
998
+ },
999
+ "replicated": {
1000
+ "type": "boolean"
1001
+ }
1002
+ }
1003
+ },
1004
+ "args_idempotency": {
1005
+ "type": "object",
1006
+ "required": [
1007
+ "mode",
1008
+ "stamp"
1009
+ ],
1010
+ "additionalProperties": false,
1011
+ "properties": {
1012
+ "mode": {
1013
+ "const": "replay_same_payload"
1014
+ },
1015
+ "stamp": {
1016
+ "$ref": "#/$defs/relpath"
1017
+ }
1018
+ }
1019
+ },
1020
+ "args_outcome": {
1021
+ "type": "object",
1022
+ "description": "classes, default or both: a result with no variant to select has default alone (spec 5.3, D-049)",
1023
+ "minProperties": 1,
1024
+ "additionalProperties": false,
1025
+ "properties": {
1026
+ "classes": {
1027
+ "type": "object",
1028
+ "minProperties": 1,
1029
+ "propertyNames": {
1030
+ "$ref": "#/$defs/relpath"
1031
+ },
1032
+ "additionalProperties": {
1033
+ "$ref": "#/$defs/outcome_class"
1034
+ }
1035
+ },
1036
+ "default": {
1037
+ "$ref": "#/$defs/outcome_class"
1038
+ }
1039
+ }
1040
+ },
1041
+ "args_list": {
1042
+ "type": "object",
1043
+ "required": [
1044
+ "cursor",
1045
+ "next",
1046
+ "items"
1047
+ ],
1048
+ "additionalProperties": false,
1049
+ "properties": {
1050
+ "cursor": {
1051
+ "$ref": "#/$defs/relpath"
1052
+ },
1053
+ "next": {
1054
+ "$ref": "#/$defs/relpath"
1055
+ },
1056
+ "items": {
1057
+ "$ref": "#/$defs/relpath"
1058
+ }
1059
+ }
1060
+ },
1061
+ "set_name": {
1062
+ "type": "string",
1063
+ "pattern": "^[a-z][a-z0-9_]*$",
1064
+ "maxLength": 64,
1065
+ "description": "A names set's name, which named tags refer to."
1066
+ },
1067
+ "args_names": {
1068
+ "type": "object",
1069
+ "required": [
1070
+ "set",
1071
+ "items",
1072
+ "name",
1073
+ "value"
1074
+ ],
1075
+ "additionalProperties": false,
1076
+ "description": "A method that lists named things (spec 5.3, D-045). items is a results relpath to a vec of records; name, value, show and kind are paths inside one item.",
1077
+ "properties": {
1078
+ "set": {
1079
+ "$ref": "#/$defs/set_name"
1080
+ },
1081
+ "items": {
1082
+ "$ref": "#/$defs/relpath"
1083
+ },
1084
+ "name": {
1085
+ "$ref": "#/$defs/relpath"
1086
+ },
1087
+ "value": {
1088
+ "$ref": "#/$defs/relpath"
1089
+ },
1090
+ "show": {
1091
+ "$ref": "#/$defs/relpath"
1092
+ },
1093
+ "kind": {
1094
+ "$ref": "#/$defs/relpath"
1095
+ }
1096
+ }
1097
+ },
1098
+ "args_named": {
1099
+ "type": "object",
1100
+ "required": [
1101
+ "set"
1102
+ ],
1103
+ "additionalProperties": false,
1104
+ "description": "A position a name from a names set can stand for (spec 5.3, D-045).",
1105
+ "properties": {
1106
+ "set": {
1107
+ "$ref": "#/$defs/set_name"
1108
+ },
1109
+ "by": {
1110
+ "enum": [
1111
+ "value",
1112
+ "show"
1113
+ ]
1114
+ }
1115
+ }
1116
+ }
1117
+ }
1118
+ }