@inhuman.tools/policy 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/authorize.scm +4 -0
  2. package/dist/acknowledge.d.ts +70 -0
  3. package/dist/acknowledge.d.ts.map +1 -0
  4. package/dist/acknowledge.js +162 -0
  5. package/dist/acknowledge.js.map +1 -0
  6. package/dist/authorize.d.ts +8 -0
  7. package/dist/authorize.d.ts.map +1 -0
  8. package/dist/authorize.js +39 -0
  9. package/dist/authorize.js.map +1 -0
  10. package/dist/bind.d.ts +6 -0
  11. package/dist/bind.d.ts.map +1 -0
  12. package/dist/bind.js +45 -0
  13. package/dist/bind.js.map +1 -0
  14. package/dist/check.d.ts +30 -0
  15. package/dist/check.d.ts.map +1 -0
  16. package/dist/check.js +389 -0
  17. package/dist/check.js.map +1 -0
  18. package/dist/classes.d.ts +23 -0
  19. package/dist/classes.d.ts.map +1 -0
  20. package/dist/classes.js +139 -0
  21. package/dist/classes.js.map +1 -0
  22. package/dist/compile.d.ts +40 -0
  23. package/dist/compile.d.ts.map +1 -0
  24. package/dist/compile.js +311 -0
  25. package/dist/compile.js.map +1 -0
  26. package/dist/deadline.d.ts +5 -0
  27. package/dist/deadline.d.ts.map +1 -0
  28. package/dist/deadline.js +17 -0
  29. package/dist/deadline.js.map +1 -0
  30. package/dist/decide.d.ts +64 -0
  31. package/dist/decide.d.ts.map +1 -0
  32. package/dist/decide.js +482 -0
  33. package/dist/decide.js.map +1 -0
  34. package/dist/error-with-invariant.d.ts +9 -0
  35. package/dist/error-with-invariant.d.ts.map +1 -0
  36. package/dist/error-with-invariant.js +12 -0
  37. package/dist/error-with-invariant.js.map +1 -0
  38. package/dist/floor.d.ts +9 -0
  39. package/dist/floor.d.ts.map +1 -0
  40. package/dist/floor.js +9 -0
  41. package/dist/floor.js.map +1 -0
  42. package/dist/glob-expand.d.ts +10 -0
  43. package/dist/glob-expand.d.ts.map +1 -0
  44. package/dist/glob-expand.js +132 -0
  45. package/dist/glob-expand.js.map +1 -0
  46. package/dist/guards.d.ts +26 -0
  47. package/dist/guards.d.ts.map +1 -0
  48. package/dist/guards.js +419 -0
  49. package/dist/guards.js.map +1 -0
  50. package/dist/identity.d.ts +11 -0
  51. package/dist/identity.d.ts.map +1 -0
  52. package/dist/identity.js +23 -0
  53. package/dist/identity.js.map +1 -0
  54. package/dist/index.d.ts +8 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.js +8 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/license-law.d.ts +43 -0
  59. package/dist/license-law.d.ts.map +1 -0
  60. package/dist/license-law.js +129 -0
  61. package/dist/license-law.js.map +1 -0
  62. package/dist/license.d.ts +3 -0
  63. package/dist/license.d.ts.map +1 -0
  64. package/dist/license.js +2 -0
  65. package/dist/license.js.map +1 -0
  66. package/dist/lift.d.ts +4 -0
  67. package/dist/lift.d.ts.map +1 -0
  68. package/dist/lift.js +14 -0
  69. package/dist/lift.js.map +1 -0
  70. package/dist/path-policy.d.ts +53 -0
  71. package/dist/path-policy.d.ts.map +1 -0
  72. package/dist/path-policy.js +248 -0
  73. package/dist/path-policy.js.map +1 -0
  74. package/dist/peel-cwd.d.ts +8 -0
  75. package/dist/peel-cwd.d.ts.map +1 -0
  76. package/dist/peel-cwd.js +120 -0
  77. package/dist/peel-cwd.js.map +1 -0
  78. package/dist/prep.d.ts +58 -0
  79. package/dist/prep.d.ts.map +1 -0
  80. package/dist/prep.js +690 -0
  81. package/dist/prep.js.map +1 -0
  82. package/dist/processor.d.ts +71 -0
  83. package/dist/processor.d.ts.map +1 -0
  84. package/dist/processor.js +132 -0
  85. package/dist/processor.js.map +1 -0
  86. package/dist/reasonable-defaults.d.ts +1448 -0
  87. package/dist/reasonable-defaults.d.ts.map +1 -0
  88. package/dist/reasonable-defaults.js +6 -0
  89. package/dist/reasonable-defaults.js.map +1 -0
  90. package/dist/reasonable-defaults.json +1662 -0
  91. package/dist/run-authorization.d.ts +8 -0
  92. package/dist/run-authorization.d.ts.map +1 -0
  93. package/dist/run-authorization.js +16 -0
  94. package/dist/run-authorization.js.map +1 -0
  95. package/dist/schemas/tirith.d.ts +58 -0
  96. package/dist/schemas/tirith.d.ts.map +1 -0
  97. package/dist/schemas/tirith.js +23 -0
  98. package/dist/schemas/tirith.js.map +1 -0
  99. package/dist/tirith-units.d.ts +2 -0
  100. package/dist/tirith-units.d.ts.map +1 -0
  101. package/dist/tirith-units.js +227 -0
  102. package/dist/tirith-units.js.map +1 -0
  103. package/dist/tirith.d.ts +24 -0
  104. package/dist/tirith.d.ts.map +1 -0
  105. package/dist/tirith.js +311 -0
  106. package/dist/tirith.js.map +1 -0
  107. package/dist/tool-path.d.ts +8 -0
  108. package/dist/tool-path.d.ts.map +1 -0
  109. package/dist/tool-path.js +38 -0
  110. package/dist/tool-path.js.map +1 -0
  111. package/dist/types.d.ts +87 -0
  112. package/dist/types.d.ts.map +1 -0
  113. package/dist/types.js +14 -0
  114. package/dist/types.js.map +1 -0
  115. package/dist/verdict.d.ts +15 -0
  116. package/dist/verdict.d.ts.map +1 -0
  117. package/dist/verdict.js +55 -0
  118. package/dist/verdict.js.map +1 -0
  119. package/package.json +62 -3
  120. package/src/acknowledge.ts +206 -0
  121. package/src/authorize.ts +38 -0
  122. package/src/bind.ts +58 -0
  123. package/src/check.ts +552 -0
  124. package/src/classes.ts +156 -0
  125. package/src/compile.ts +370 -0
  126. package/src/deadline.ts +15 -0
  127. package/src/floor.ts +16 -0
  128. package/src/glob-expand.ts +137 -0
  129. package/src/guards.ts +428 -0
  130. package/src/identity.ts +26 -0
  131. package/src/index.ts +24 -0
  132. package/src/lift.ts +15 -0
  133. package/src/path-policy.ts +280 -0
  134. package/src/processor.ts +187 -0
  135. package/src/reasonable-defaults.json +1662 -0
  136. package/src/reasonable-defaults.ts +8 -0
  137. package/src/run-authorization.ts +23 -0
  138. package/src/tool-path.ts +43 -0
  139. package/src/types.ts +102 -0
  140. package/src/verdict.ts +63 -0
  141. package/README.md +0 -3
@@ -0,0 +1,1448 @@
1
+ /** Dist floor. Sole home is `reasonable-defaults.json`. The string is the session file body. */
2
+ export declare const reasonableDefaults: {
3
+ read_file: string[];
4
+ read_block: string[];
5
+ write_file: (string | {
6
+ path: string;
7
+ class: string;
8
+ })[];
9
+ write_block: (string | {
10
+ path: string;
11
+ class: string;
12
+ })[];
13
+ ".unix_read": {
14
+ policy: string;
15
+ arg_rest_type: string;
16
+ };
17
+ ".unix_write": {
18
+ policy: string;
19
+ arg_rest_type: string;
20
+ };
21
+ ".pkg_install": {
22
+ policy: string;
23
+ subcommands: {
24
+ install: string;
25
+ };
26
+ };
27
+ ".docker_run": {
28
+ policy: string;
29
+ matcher: ({
30
+ flags: {
31
+ "--privileged": boolean;
32
+ "--pid"?: undefined;
33
+ "--network"?: undefined;
34
+ "--volume"?: undefined;
35
+ "--mount"?: undefined;
36
+ };
37
+ policy: string;
38
+ class: string;
39
+ } | {
40
+ flags: {
41
+ "--pid": {
42
+ value: string;
43
+ };
44
+ "--privileged"?: undefined;
45
+ "--network"?: undefined;
46
+ "--volume"?: undefined;
47
+ "--mount"?: undefined;
48
+ };
49
+ policy: string;
50
+ class: string;
51
+ } | {
52
+ flags: {
53
+ "--network": {
54
+ alias: string[];
55
+ value: string;
56
+ };
57
+ "--privileged"?: undefined;
58
+ "--pid"?: undefined;
59
+ "--volume"?: undefined;
60
+ "--mount"?: undefined;
61
+ };
62
+ policy: string;
63
+ class: string;
64
+ } | {
65
+ flags: {
66
+ "--volume": {
67
+ alias: string[];
68
+ value: string[];
69
+ };
70
+ "--privileged"?: undefined;
71
+ "--pid"?: undefined;
72
+ "--network"?: undefined;
73
+ "--mount"?: undefined;
74
+ };
75
+ policy: string;
76
+ class: string;
77
+ } | {
78
+ flags: {
79
+ "--mount": {
80
+ value: string;
81
+ };
82
+ "--privileged"?: undefined;
83
+ "--pid"?: undefined;
84
+ "--network"?: undefined;
85
+ "--volume"?: undefined;
86
+ };
87
+ policy: string;
88
+ class: string;
89
+ })[];
90
+ };
91
+ bash: {
92
+ policy: string;
93
+ class: string;
94
+ subcommands: {
95
+ sudo: {
96
+ policy: string;
97
+ class: string;
98
+ };
99
+ doas: {
100
+ policy: string;
101
+ class: string;
102
+ };
103
+ dd: {
104
+ policy: string;
105
+ class: string;
106
+ guard: string[];
107
+ };
108
+ eval: string;
109
+ mkfs: {
110
+ policy: string;
111
+ class: string;
112
+ };
113
+ "mkfs.ext4": {
114
+ policy: string;
115
+ class: string;
116
+ };
117
+ "mkfs.xfs": {
118
+ policy: string;
119
+ class: string;
120
+ };
121
+ "mkfs.vfat": {
122
+ policy: string;
123
+ class: string;
124
+ };
125
+ "mkfs.ntfs": {
126
+ policy: string;
127
+ class: string;
128
+ };
129
+ fdisk: {
130
+ policy: string;
131
+ class: string;
132
+ guard: string[];
133
+ };
134
+ parted: {
135
+ policy: string;
136
+ class: string;
137
+ guard: string[];
138
+ };
139
+ shred: {
140
+ policy: string;
141
+ class: string;
142
+ };
143
+ wipefs: {
144
+ policy: string;
145
+ class: string;
146
+ };
147
+ shutdown: {
148
+ policy: string;
149
+ class: string;
150
+ };
151
+ reboot: {
152
+ policy: string;
153
+ class: string;
154
+ };
155
+ halt: {
156
+ policy: string;
157
+ class: string;
158
+ };
159
+ poweroff: {
160
+ policy: string;
161
+ class: string;
162
+ };
163
+ rm: {
164
+ policy: string;
165
+ class: string;
166
+ arg_rest_type: string;
167
+ matcher: {
168
+ flags: {
169
+ "--recursive": {
170
+ alias: string[];
171
+ };
172
+ "--force": {
173
+ alias: string[];
174
+ };
175
+ };
176
+ matcher: ({
177
+ glob: string;
178
+ policy: string;
179
+ tok?: undefined;
180
+ } | {
181
+ tok: string;
182
+ policy: string;
183
+ glob?: undefined;
184
+ })[];
185
+ }[];
186
+ guard: string[];
187
+ };
188
+ chmod: {
189
+ policy: string;
190
+ class: string;
191
+ subcommands: {
192
+ "777": {
193
+ policy: string;
194
+ class: string;
195
+ };
196
+ "0777": {
197
+ policy: string;
198
+ class: string;
199
+ };
200
+ "a+rwx": {
201
+ policy: string;
202
+ class: string;
203
+ };
204
+ "a=rwx": {
205
+ policy: string;
206
+ class: string;
207
+ };
208
+ };
209
+ matcher: {
210
+ flags: {
211
+ "--recursive": {
212
+ alias: string[];
213
+ };
214
+ };
215
+ policy: string;
216
+ }[];
217
+ guard: string[];
218
+ };
219
+ chown: {
220
+ policy: string;
221
+ class: string;
222
+ matcher: {
223
+ flags: {
224
+ "--recursive": {
225
+ alias: string[];
226
+ };
227
+ };
228
+ policy: string;
229
+ }[];
230
+ guard: string[];
231
+ };
232
+ git: {
233
+ policy: string;
234
+ class: string;
235
+ matcher: ({
236
+ flags: {
237
+ "-c": {
238
+ value_type: string;
239
+ };
240
+ "--config-env"?: undefined;
241
+ "-C"?: undefined;
242
+ "--git-dir"?: undefined;
243
+ "--work-tree"?: undefined;
244
+ };
245
+ policy?: undefined;
246
+ class?: undefined;
247
+ } | {
248
+ flags: {
249
+ "--config-env": boolean;
250
+ "-c"?: undefined;
251
+ "-C"?: undefined;
252
+ "--git-dir"?: undefined;
253
+ "--work-tree"?: undefined;
254
+ };
255
+ policy: string;
256
+ class: string;
257
+ } | {
258
+ flags: {
259
+ "-C": {
260
+ value_type: string;
261
+ };
262
+ "-c"?: undefined;
263
+ "--config-env"?: undefined;
264
+ "--git-dir"?: undefined;
265
+ "--work-tree"?: undefined;
266
+ };
267
+ policy: string;
268
+ class?: undefined;
269
+ } | {
270
+ flags: {
271
+ "--git-dir": {
272
+ value_type: string;
273
+ };
274
+ "-c"?: undefined;
275
+ "--config-env"?: undefined;
276
+ "-C"?: undefined;
277
+ "--work-tree"?: undefined;
278
+ };
279
+ policy: string;
280
+ class?: undefined;
281
+ } | {
282
+ flags: {
283
+ "--work-tree": {
284
+ value_type: string;
285
+ };
286
+ "-c"?: undefined;
287
+ "--config-env"?: undefined;
288
+ "-C"?: undefined;
289
+ "--git-dir"?: undefined;
290
+ };
291
+ policy: string;
292
+ class?: undefined;
293
+ })[];
294
+ subcommands: {
295
+ status: string;
296
+ diff: {
297
+ policy: string;
298
+ guard: string[];
299
+ flag_paths: {
300
+ "--output": string;
301
+ };
302
+ matcher: ({
303
+ flags: {
304
+ "--output": {
305
+ abbrev: boolean;
306
+ };
307
+ "--no-index"?: undefined;
308
+ };
309
+ policy: string;
310
+ class: string;
311
+ } | {
312
+ flags: {
313
+ "--no-index": {
314
+ abbrev: boolean;
315
+ };
316
+ "--output"?: undefined;
317
+ };
318
+ policy?: undefined;
319
+ class?: undefined;
320
+ })[];
321
+ };
322
+ log: {
323
+ policy: string;
324
+ guard: string[];
325
+ flag_paths: {
326
+ "--output": string;
327
+ };
328
+ };
329
+ show: {
330
+ policy: string;
331
+ guard: string[];
332
+ flag_paths: {
333
+ "--output": string;
334
+ };
335
+ };
336
+ "rev-parse": string;
337
+ branch: {
338
+ policy: string;
339
+ matcher: ({
340
+ flags: {
341
+ "-D": boolean;
342
+ "--delete"?: undefined;
343
+ "--force"?: undefined;
344
+ "-M"?: undefined;
345
+ "-C"?: undefined;
346
+ "--move"?: undefined;
347
+ };
348
+ policy: string;
349
+ class: string;
350
+ } | {
351
+ flags: {
352
+ "--delete": {
353
+ alias: string[];
354
+ abbrev: boolean;
355
+ };
356
+ "--force": {
357
+ alias: string[];
358
+ abbrev: boolean;
359
+ };
360
+ "-D"?: undefined;
361
+ "-M"?: undefined;
362
+ "-C"?: undefined;
363
+ "--move"?: undefined;
364
+ };
365
+ policy: string;
366
+ class: string;
367
+ } | {
368
+ flags: {
369
+ "-M": boolean;
370
+ "-D"?: undefined;
371
+ "--delete"?: undefined;
372
+ "--force"?: undefined;
373
+ "-C"?: undefined;
374
+ "--move"?: undefined;
375
+ };
376
+ policy: string;
377
+ class: string;
378
+ } | {
379
+ flags: {
380
+ "-C": boolean;
381
+ "-D"?: undefined;
382
+ "--delete"?: undefined;
383
+ "--force"?: undefined;
384
+ "-M"?: undefined;
385
+ "--move"?: undefined;
386
+ };
387
+ policy: string;
388
+ class: string;
389
+ } | {
390
+ flags: {
391
+ "--force": {
392
+ alias: string[];
393
+ abbrev: boolean;
394
+ };
395
+ "-D"?: undefined;
396
+ "--delete"?: undefined;
397
+ "-M"?: undefined;
398
+ "-C"?: undefined;
399
+ "--move"?: undefined;
400
+ };
401
+ policy: string;
402
+ class: string;
403
+ } | {
404
+ flags: {
405
+ "--move": {
406
+ alias: string[];
407
+ abbrev: boolean;
408
+ };
409
+ "--force": {
410
+ alias: string[];
411
+ abbrev: boolean;
412
+ };
413
+ "-D"?: undefined;
414
+ "--delete"?: undefined;
415
+ "-M"?: undefined;
416
+ "-C"?: undefined;
417
+ };
418
+ policy: string;
419
+ class: string;
420
+ })[];
421
+ };
422
+ add: {
423
+ policy: string;
424
+ matcher: {
425
+ flags: {
426
+ "--force": {
427
+ alias: string[];
428
+ abbrev: boolean;
429
+ };
430
+ };
431
+ policy: string;
432
+ class: string;
433
+ }[];
434
+ };
435
+ commit: {
436
+ policy: string;
437
+ matcher: {
438
+ flags: {
439
+ "--no-verify": {
440
+ alias: string[];
441
+ abbrev: boolean;
442
+ };
443
+ };
444
+ policy: string;
445
+ class: string;
446
+ }[];
447
+ flag_paths: {
448
+ "--file": string;
449
+ "-F": string;
450
+ "--template": string;
451
+ "-t": string;
452
+ };
453
+ };
454
+ stash: {
455
+ policy: string;
456
+ subcommands: {
457
+ drop: {
458
+ policy: string;
459
+ class: string;
460
+ };
461
+ clear: {
462
+ policy: string;
463
+ class: string;
464
+ };
465
+ };
466
+ };
467
+ fetch: {
468
+ policy: string;
469
+ matcher: ({
470
+ flags: {
471
+ "--upload-pack": {
472
+ abbrev: boolean;
473
+ };
474
+ "--receive-pack"?: undefined;
475
+ "--exec"?: undefined;
476
+ "-u"?: undefined;
477
+ };
478
+ policy: string;
479
+ class: string;
480
+ glob?: undefined;
481
+ } | {
482
+ flags: {
483
+ "--receive-pack": {
484
+ abbrev: boolean;
485
+ };
486
+ "--upload-pack"?: undefined;
487
+ "--exec"?: undefined;
488
+ "-u"?: undefined;
489
+ };
490
+ policy: string;
491
+ class: string;
492
+ glob?: undefined;
493
+ } | {
494
+ flags: {
495
+ "--exec": {
496
+ abbrev: boolean;
497
+ };
498
+ "--upload-pack"?: undefined;
499
+ "--receive-pack"?: undefined;
500
+ "-u"?: undefined;
501
+ };
502
+ policy: string;
503
+ class: string;
504
+ glob?: undefined;
505
+ } | {
506
+ flags: {
507
+ "-u": boolean;
508
+ "--upload-pack"?: undefined;
509
+ "--receive-pack"?: undefined;
510
+ "--exec"?: undefined;
511
+ };
512
+ policy: string;
513
+ class: string;
514
+ glob?: undefined;
515
+ } | {
516
+ glob: string[];
517
+ policy: string;
518
+ class: string;
519
+ flags?: undefined;
520
+ })[];
521
+ };
522
+ pull: {
523
+ policy: string;
524
+ class: string;
525
+ matcher: ({
526
+ flags: {
527
+ "--upload-pack": {
528
+ abbrev: boolean;
529
+ };
530
+ "--receive-pack"?: undefined;
531
+ "--exec"?: undefined;
532
+ "-u"?: undefined;
533
+ };
534
+ policy: string;
535
+ class: string;
536
+ glob?: undefined;
537
+ } | {
538
+ flags: {
539
+ "--receive-pack": {
540
+ abbrev: boolean;
541
+ };
542
+ "--upload-pack"?: undefined;
543
+ "--exec"?: undefined;
544
+ "-u"?: undefined;
545
+ };
546
+ policy: string;
547
+ class: string;
548
+ glob?: undefined;
549
+ } | {
550
+ flags: {
551
+ "--exec": {
552
+ abbrev: boolean;
553
+ };
554
+ "--upload-pack"?: undefined;
555
+ "--receive-pack"?: undefined;
556
+ "-u"?: undefined;
557
+ };
558
+ policy: string;
559
+ class: string;
560
+ glob?: undefined;
561
+ } | {
562
+ flags: {
563
+ "-u": boolean;
564
+ "--upload-pack"?: undefined;
565
+ "--receive-pack"?: undefined;
566
+ "--exec"?: undefined;
567
+ };
568
+ policy: string;
569
+ class: string;
570
+ glob?: undefined;
571
+ } | {
572
+ glob: string[];
573
+ policy: string;
574
+ class: string;
575
+ flags?: undefined;
576
+ })[];
577
+ };
578
+ checkout: {
579
+ policy: string;
580
+ class: string;
581
+ "--": {
582
+ policy: string;
583
+ arg_rest_type: string;
584
+ };
585
+ };
586
+ push: {
587
+ policy: string;
588
+ class: string;
589
+ matcher: ({
590
+ flags: {
591
+ "--force": {
592
+ alias: string[];
593
+ abbrev: boolean;
594
+ };
595
+ "--force-with-lease"?: undefined;
596
+ "--no-verify"?: undefined;
597
+ };
598
+ policy: string;
599
+ class: string;
600
+ } | {
601
+ flags: {
602
+ "--force-with-lease": {
603
+ abbrev: boolean;
604
+ };
605
+ "--force"?: undefined;
606
+ "--no-verify"?: undefined;
607
+ };
608
+ policy: string;
609
+ class: string;
610
+ } | {
611
+ flags: {
612
+ "--no-verify": {
613
+ abbrev: boolean;
614
+ };
615
+ "--force"?: undefined;
616
+ "--force-with-lease"?: undefined;
617
+ };
618
+ policy: string;
619
+ class: string;
620
+ })[];
621
+ };
622
+ reset: {
623
+ policy: string;
624
+ class: string;
625
+ matcher: {
626
+ flags: {
627
+ "--hard": {
628
+ abbrev: boolean;
629
+ };
630
+ };
631
+ policy: string;
632
+ class: string;
633
+ }[];
634
+ };
635
+ clean: {
636
+ policy: string;
637
+ class: string;
638
+ matcher: {
639
+ flags: {
640
+ "-f": boolean;
641
+ "-d": {
642
+ alias: string[];
643
+ };
644
+ };
645
+ policy: string;
646
+ }[];
647
+ };
648
+ "format-patch": {
649
+ policy: string;
650
+ class: string;
651
+ flag_paths: {
652
+ "--output": string;
653
+ "-o": string;
654
+ };
655
+ };
656
+ clone: {
657
+ policy: string;
658
+ class: string;
659
+ matcher: ({
660
+ flags: {
661
+ "--upload-pack": {
662
+ abbrev: boolean;
663
+ };
664
+ "--receive-pack"?: undefined;
665
+ "--exec"?: undefined;
666
+ "-u"?: undefined;
667
+ };
668
+ policy: string;
669
+ class: string;
670
+ glob?: undefined;
671
+ } | {
672
+ flags: {
673
+ "--receive-pack": {
674
+ abbrev: boolean;
675
+ };
676
+ "--upload-pack"?: undefined;
677
+ "--exec"?: undefined;
678
+ "-u"?: undefined;
679
+ };
680
+ policy: string;
681
+ class: string;
682
+ glob?: undefined;
683
+ } | {
684
+ flags: {
685
+ "--exec": {
686
+ abbrev: boolean;
687
+ };
688
+ "--upload-pack"?: undefined;
689
+ "--receive-pack"?: undefined;
690
+ "-u"?: undefined;
691
+ };
692
+ policy: string;
693
+ class: string;
694
+ glob?: undefined;
695
+ } | {
696
+ flags: {
697
+ "-u": boolean;
698
+ "--upload-pack"?: undefined;
699
+ "--receive-pack"?: undefined;
700
+ "--exec"?: undefined;
701
+ };
702
+ policy: string;
703
+ class: string;
704
+ glob?: undefined;
705
+ } | {
706
+ glob: string[];
707
+ policy: string;
708
+ class: string;
709
+ flags?: undefined;
710
+ })[];
711
+ };
712
+ "ls-remote": {
713
+ policy: string;
714
+ class: string;
715
+ matcher: ({
716
+ flags: {
717
+ "--upload-pack": {
718
+ abbrev: boolean;
719
+ };
720
+ "--receive-pack"?: undefined;
721
+ "--exec"?: undefined;
722
+ "-u"?: undefined;
723
+ };
724
+ policy: string;
725
+ class: string;
726
+ glob?: undefined;
727
+ } | {
728
+ flags: {
729
+ "--receive-pack": {
730
+ abbrev: boolean;
731
+ };
732
+ "--upload-pack"?: undefined;
733
+ "--exec"?: undefined;
734
+ "-u"?: undefined;
735
+ };
736
+ policy: string;
737
+ class: string;
738
+ glob?: undefined;
739
+ } | {
740
+ flags: {
741
+ "--exec": {
742
+ abbrev: boolean;
743
+ };
744
+ "--upload-pack"?: undefined;
745
+ "--receive-pack"?: undefined;
746
+ "-u"?: undefined;
747
+ };
748
+ policy: string;
749
+ class: string;
750
+ glob?: undefined;
751
+ } | {
752
+ flags: {
753
+ "-u": boolean;
754
+ "--upload-pack"?: undefined;
755
+ "--receive-pack"?: undefined;
756
+ "--exec"?: undefined;
757
+ };
758
+ policy: string;
759
+ class: string;
760
+ glob?: undefined;
761
+ } | {
762
+ glob: string[];
763
+ policy: string;
764
+ class: string;
765
+ flags?: undefined;
766
+ })[];
767
+ };
768
+ };
769
+ guard: string[];
770
+ };
771
+ gh: {
772
+ policy: string;
773
+ class: string;
774
+ subcommands: {
775
+ issue: {
776
+ policy: string;
777
+ class: string;
778
+ subcommands: {
779
+ list: string;
780
+ view: string;
781
+ status: string;
782
+ delete: string;
783
+ };
784
+ };
785
+ pr: {
786
+ policy: string;
787
+ class: string;
788
+ subcommands: {
789
+ list: string;
790
+ view: string;
791
+ diff: string;
792
+ status: string;
793
+ checks: string;
794
+ merge: string;
795
+ create: string;
796
+ };
797
+ };
798
+ run: {
799
+ policy: string;
800
+ class: string;
801
+ subcommands: {
802
+ list: string;
803
+ view: string;
804
+ delete: string;
805
+ };
806
+ };
807
+ search: string;
808
+ label: {
809
+ policy: string;
810
+ class: string;
811
+ subcommands: {
812
+ list: string;
813
+ };
814
+ };
815
+ release: {
816
+ policy: string;
817
+ class: string;
818
+ subcommands: {
819
+ list: string;
820
+ view: string;
821
+ delete: string;
822
+ };
823
+ };
824
+ secret: {
825
+ policy: string;
826
+ class: string;
827
+ };
828
+ auth: {
829
+ policy: string;
830
+ class: string;
831
+ };
832
+ gist: {
833
+ policy: string;
834
+ class: string;
835
+ };
836
+ repo: {
837
+ policy: string;
838
+ class: string;
839
+ subcommands: {
840
+ delete: string;
841
+ archive: string;
842
+ };
843
+ };
844
+ };
845
+ };
846
+ npm: {
847
+ policy: string;
848
+ class: string;
849
+ subcommands: {
850
+ run: {
851
+ policy: string;
852
+ family_args: number;
853
+ class: string;
854
+ };
855
+ install: {
856
+ policy: string;
857
+ class: string;
858
+ matcher: {
859
+ flags: {
860
+ "--global": {
861
+ alias: string[];
862
+ };
863
+ };
864
+ policy: string;
865
+ }[];
866
+ };
867
+ publish: {
868
+ policy: string;
869
+ class: string;
870
+ };
871
+ test: {
872
+ policy: string;
873
+ class: string;
874
+ };
875
+ exec: {
876
+ policy: string;
877
+ class: string;
878
+ };
879
+ start: {
880
+ policy: string;
881
+ class: string;
882
+ };
883
+ };
884
+ };
885
+ cargo: {
886
+ policy: string;
887
+ class: string;
888
+ subcommands: {
889
+ test: {
890
+ policy: string;
891
+ class: string;
892
+ };
893
+ run: {
894
+ policy: string;
895
+ class: string;
896
+ };
897
+ bench: {
898
+ policy: string;
899
+ class: string;
900
+ };
901
+ build: {
902
+ policy: string;
903
+ class: string;
904
+ };
905
+ check: {
906
+ policy: string;
907
+ class: string;
908
+ };
909
+ clippy: {
910
+ policy: string;
911
+ class: string;
912
+ };
913
+ publish: {
914
+ policy: string;
915
+ class: string;
916
+ };
917
+ };
918
+ };
919
+ kubectl: {
920
+ policy: string;
921
+ class: string;
922
+ subcommands: {
923
+ get: {
924
+ policy: string;
925
+ flag_paths: {
926
+ "--filename": string;
927
+ "-f": string;
928
+ };
929
+ matcher: ({
930
+ glob: string;
931
+ policy: string;
932
+ class: string;
933
+ flags?: undefined;
934
+ } | {
935
+ flags: {
936
+ "--raw": {
937
+ value_type: string;
938
+ value?: undefined;
939
+ };
940
+ };
941
+ policy: string;
942
+ class: string;
943
+ glob?: undefined;
944
+ } | {
945
+ flags: {
946
+ "--raw": {
947
+ value: string;
948
+ value_type?: undefined;
949
+ };
950
+ };
951
+ policy: string;
952
+ class: string;
953
+ glob?: undefined;
954
+ })[];
955
+ };
956
+ describe: {
957
+ policy: string;
958
+ flag_paths: {
959
+ "--filename": string;
960
+ "-f": string;
961
+ };
962
+ matcher: ({
963
+ glob: string;
964
+ policy: string;
965
+ class: string;
966
+ flags?: undefined;
967
+ } | {
968
+ flags: {
969
+ "--raw": {
970
+ value_type: string;
971
+ value?: undefined;
972
+ };
973
+ };
974
+ policy: string;
975
+ class: string;
976
+ glob?: undefined;
977
+ } | {
978
+ flags: {
979
+ "--raw": {
980
+ value: string;
981
+ value_type?: undefined;
982
+ };
983
+ };
984
+ policy: string;
985
+ class: string;
986
+ glob?: undefined;
987
+ })[];
988
+ };
989
+ logs: string;
990
+ exec: string;
991
+ };
992
+ };
993
+ docker: {
994
+ policy: string;
995
+ class: string;
996
+ matcher: ({
997
+ flags: {
998
+ "--host": {
999
+ alias: string[];
1000
+ };
1001
+ "--version"?: undefined;
1002
+ };
1003
+ policy: string;
1004
+ class: string;
1005
+ } | {
1006
+ flags: {
1007
+ "--version": {
1008
+ alias: string[];
1009
+ };
1010
+ "--host"?: undefined;
1011
+ };
1012
+ policy: string;
1013
+ class?: undefined;
1014
+ })[];
1015
+ subcommands: {
1016
+ ps: string;
1017
+ logs: string;
1018
+ inspect: string;
1019
+ images: string;
1020
+ run: {
1021
+ policy: string;
1022
+ class: string;
1023
+ matcher: ({
1024
+ flags: {
1025
+ "--privileged": boolean;
1026
+ "--pid"?: undefined;
1027
+ "--network"?: undefined;
1028
+ "--volume"?: undefined;
1029
+ "--mount"?: undefined;
1030
+ };
1031
+ policy: string;
1032
+ class: string;
1033
+ } | {
1034
+ flags: {
1035
+ "--pid": {
1036
+ value: string;
1037
+ };
1038
+ "--privileged"?: undefined;
1039
+ "--network"?: undefined;
1040
+ "--volume"?: undefined;
1041
+ "--mount"?: undefined;
1042
+ };
1043
+ policy: string;
1044
+ class: string;
1045
+ } | {
1046
+ flags: {
1047
+ "--network": {
1048
+ alias: string[];
1049
+ value: string;
1050
+ };
1051
+ "--privileged"?: undefined;
1052
+ "--pid"?: undefined;
1053
+ "--volume"?: undefined;
1054
+ "--mount"?: undefined;
1055
+ };
1056
+ policy: string;
1057
+ class: string;
1058
+ } | {
1059
+ flags: {
1060
+ "--volume": {
1061
+ alias: string[];
1062
+ value: string[];
1063
+ };
1064
+ "--privileged"?: undefined;
1065
+ "--pid"?: undefined;
1066
+ "--network"?: undefined;
1067
+ "--mount"?: undefined;
1068
+ };
1069
+ policy: string;
1070
+ class: string;
1071
+ } | {
1072
+ flags: {
1073
+ "--mount": {
1074
+ value: string;
1075
+ };
1076
+ "--privileged"?: undefined;
1077
+ "--pid"?: undefined;
1078
+ "--network"?: undefined;
1079
+ "--volume"?: undefined;
1080
+ };
1081
+ policy: string;
1082
+ class: string;
1083
+ })[];
1084
+ };
1085
+ exec: {
1086
+ policy: string;
1087
+ class: string;
1088
+ };
1089
+ compose: {
1090
+ policy: string;
1091
+ class: string;
1092
+ matcher: ({
1093
+ flags: {
1094
+ "--privileged": boolean;
1095
+ "--pid"?: undefined;
1096
+ "--network"?: undefined;
1097
+ "--volume"?: undefined;
1098
+ "--mount"?: undefined;
1099
+ };
1100
+ policy: string;
1101
+ class: string;
1102
+ } | {
1103
+ flags: {
1104
+ "--pid": {
1105
+ value: string;
1106
+ };
1107
+ "--privileged"?: undefined;
1108
+ "--network"?: undefined;
1109
+ "--volume"?: undefined;
1110
+ "--mount"?: undefined;
1111
+ };
1112
+ policy: string;
1113
+ class: string;
1114
+ } | {
1115
+ flags: {
1116
+ "--network": {
1117
+ alias: string[];
1118
+ value: string;
1119
+ };
1120
+ "--privileged"?: undefined;
1121
+ "--pid"?: undefined;
1122
+ "--volume"?: undefined;
1123
+ "--mount"?: undefined;
1124
+ };
1125
+ policy: string;
1126
+ class: string;
1127
+ } | {
1128
+ flags: {
1129
+ "--volume": {
1130
+ alias: string[];
1131
+ value: string[];
1132
+ };
1133
+ "--privileged"?: undefined;
1134
+ "--pid"?: undefined;
1135
+ "--network"?: undefined;
1136
+ "--mount"?: undefined;
1137
+ };
1138
+ policy: string;
1139
+ class: string;
1140
+ } | {
1141
+ flags: {
1142
+ "--mount": {
1143
+ value: string;
1144
+ };
1145
+ "--privileged"?: undefined;
1146
+ "--pid"?: undefined;
1147
+ "--network"?: undefined;
1148
+ "--volume"?: undefined;
1149
+ };
1150
+ policy: string;
1151
+ class: string;
1152
+ })[];
1153
+ };
1154
+ };
1155
+ };
1156
+ apt: {
1157
+ policy: string;
1158
+ class: string;
1159
+ subcommands: {
1160
+ install: string;
1161
+ };
1162
+ };
1163
+ "apt-get": {
1164
+ policy: string;
1165
+ class: string;
1166
+ subcommands: {
1167
+ install: string;
1168
+ };
1169
+ };
1170
+ brew: {
1171
+ policy: string;
1172
+ class: string;
1173
+ subcommands: {
1174
+ install: string;
1175
+ };
1176
+ };
1177
+ yum: {
1178
+ policy: string;
1179
+ class: string;
1180
+ subcommands: {
1181
+ install: string;
1182
+ };
1183
+ };
1184
+ dnf: {
1185
+ policy: string;
1186
+ class: string;
1187
+ subcommands: {
1188
+ install: string;
1189
+ };
1190
+ };
1191
+ pip: {
1192
+ policy: string;
1193
+ class: string;
1194
+ subcommands: {
1195
+ install: string;
1196
+ };
1197
+ };
1198
+ pip3: {
1199
+ policy: string;
1200
+ class: string;
1201
+ subcommands: {
1202
+ install: string;
1203
+ };
1204
+ };
1205
+ gem: {
1206
+ policy: string;
1207
+ class: string;
1208
+ subcommands: {
1209
+ install: string;
1210
+ };
1211
+ };
1212
+ awk: string;
1213
+ cat: {
1214
+ policy: string;
1215
+ arg_rest_type: string;
1216
+ };
1217
+ cut: {
1218
+ policy: string;
1219
+ arg_rest_type: string;
1220
+ };
1221
+ date: {
1222
+ policy: string;
1223
+ flag_paths: {
1224
+ "--file": string;
1225
+ "-f": string;
1226
+ "--reference": string;
1227
+ "-r": string;
1228
+ };
1229
+ };
1230
+ diff: {
1231
+ policy: string;
1232
+ arg_rest_type: string;
1233
+ flag_paths: {
1234
+ "--from-file": string;
1235
+ "--to-file": string;
1236
+ "-X": string;
1237
+ "--exclude-from": string;
1238
+ };
1239
+ };
1240
+ echo: string;
1241
+ false: string;
1242
+ grep: {
1243
+ policy: string;
1244
+ arg_rest_type: string;
1245
+ flag_paths: {
1246
+ "--file": string;
1247
+ "-f": string;
1248
+ "--exclude-from": string;
1249
+ };
1250
+ };
1251
+ head: {
1252
+ policy: string;
1253
+ arg_rest_type: string;
1254
+ };
1255
+ ls: {
1256
+ policy: string;
1257
+ arg_rest_type: string;
1258
+ };
1259
+ mkdir: {
1260
+ policy: string;
1261
+ arg_rest_type: string;
1262
+ };
1263
+ printf: string;
1264
+ pwd: string;
1265
+ sed: {
1266
+ policy: string;
1267
+ guard: string[];
1268
+ matcher: ({
1269
+ flags: {
1270
+ "--in-place": {
1271
+ alias: string[];
1272
+ abbrev: boolean;
1273
+ };
1274
+ "-e"?: undefined;
1275
+ };
1276
+ policy: string;
1277
+ class: string;
1278
+ } | {
1279
+ flags: {
1280
+ "-e": {
1281
+ alias: string[];
1282
+ value_type: string;
1283
+ };
1284
+ "--in-place"?: undefined;
1285
+ };
1286
+ policy?: undefined;
1287
+ class?: undefined;
1288
+ })[];
1289
+ };
1290
+ sort: {
1291
+ policy: string;
1292
+ arg_rest_type: string;
1293
+ flag_paths: {
1294
+ "--output": string;
1295
+ "-o": string;
1296
+ "--files0-from": string;
1297
+ "--random-source": string;
1298
+ };
1299
+ matcher: ({
1300
+ flags: {
1301
+ "--output": {
1302
+ alias: string[];
1303
+ abbrev: boolean;
1304
+ };
1305
+ "--compress-program"?: undefined;
1306
+ };
1307
+ policy: string;
1308
+ class: string;
1309
+ } | {
1310
+ flags: {
1311
+ "--compress-program": {
1312
+ abbrev: boolean;
1313
+ };
1314
+ "--output"?: undefined;
1315
+ };
1316
+ policy: string;
1317
+ class?: undefined;
1318
+ })[];
1319
+ };
1320
+ stat: {
1321
+ policy: string;
1322
+ arg_rest_type: string;
1323
+ };
1324
+ tail: {
1325
+ policy: string;
1326
+ arg_rest_type: string;
1327
+ };
1328
+ tee: {
1329
+ policy: string;
1330
+ arg_rest_type: string;
1331
+ };
1332
+ test: string;
1333
+ touch: {
1334
+ policy: string;
1335
+ arg_rest_type: string;
1336
+ flag_paths: {
1337
+ "--reference": string;
1338
+ "-r": string;
1339
+ };
1340
+ };
1341
+ tr: string;
1342
+ true: string;
1343
+ uniq: {
1344
+ policy: string;
1345
+ arg_types: string[];
1346
+ arg_rest_type: string;
1347
+ };
1348
+ wc: {
1349
+ policy: string;
1350
+ arg_rest_type: string;
1351
+ flag_paths: {
1352
+ "--files0-from": string;
1353
+ };
1354
+ };
1355
+ which: string;
1356
+ curl: {
1357
+ policy: string;
1358
+ class: string;
1359
+ };
1360
+ wget: {
1361
+ policy: string;
1362
+ class: string;
1363
+ };
1364
+ npx: string;
1365
+ pnpm: {
1366
+ policy: string;
1367
+ family_args: number;
1368
+ };
1369
+ yarn: {
1370
+ policy: string;
1371
+ family_args: number;
1372
+ };
1373
+ make: {
1374
+ policy: string;
1375
+ family_args: number;
1376
+ };
1377
+ harness: {
1378
+ policy: string;
1379
+ class: string;
1380
+ subcommands: {
1381
+ eval: {
1382
+ policy: string;
1383
+ matcher: {
1384
+ flags: {
1385
+ "--mode": {
1386
+ value_type: string;
1387
+ };
1388
+ };
1389
+ policy: string;
1390
+ matcher: {
1391
+ flags: {
1392
+ "--mode": {
1393
+ value: string;
1394
+ };
1395
+ };
1396
+ policy: string;
1397
+ }[];
1398
+ }[];
1399
+ };
1400
+ };
1401
+ };
1402
+ "mkfs.ext2": {
1403
+ policy: string;
1404
+ class: string;
1405
+ };
1406
+ "mkfs.ext3": {
1407
+ policy: string;
1408
+ class: string;
1409
+ };
1410
+ "mkfs.btrfs": {
1411
+ policy: string;
1412
+ class: string;
1413
+ };
1414
+ "mkfs.f2fs": {
1415
+ policy: string;
1416
+ class: string;
1417
+ };
1418
+ "mkfs.exfat": {
1419
+ policy: string;
1420
+ class: string;
1421
+ };
1422
+ "mkfs.fat": {
1423
+ policy: string;
1424
+ class: string;
1425
+ };
1426
+ "mkfs.msdos": {
1427
+ policy: string;
1428
+ class: string;
1429
+ };
1430
+ "mkfs.minix": {
1431
+ policy: string;
1432
+ class: string;
1433
+ };
1434
+ mke2fs: {
1435
+ policy: string;
1436
+ class: string;
1437
+ };
1438
+ sfdisk: {
1439
+ policy: string;
1440
+ class: string;
1441
+ guard: string[];
1442
+ };
1443
+ };
1444
+ };
1445
+ };
1446
+ /** Text of {@link reasonableDefaults} for `policyProgram`. `bindPolicy` takes the object. */
1447
+ export declare const reasonableDefaultsSource: string;
1448
+ //# sourceMappingURL=reasonable-defaults.d.ts.map