neatlogs-cli 0.1.0-team-test.6 → 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.
- package/CHANGELOG.md +18 -4
- package/LICENSE +21 -0
- package/README.md +33 -2
- package/dist/bin.js +670 -467
- package/docs/command-reference.md +18 -18
- package/package.json +3 -2
package/dist/bin.js
CHANGED
|
@@ -148,7 +148,7 @@ var public_openapi_default = {
|
|
|
148
148
|
description: "Local dev"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
|
-
url: "https://cloud.neatlogs.com",
|
|
151
|
+
url: "https://neatlogs-dev-cloud.neatlogs.com",
|
|
152
152
|
description: "dev.neatlogs.com backend"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
@@ -430,7 +430,7 @@ var public_openapi_default = {
|
|
|
430
430
|
instance: {
|
|
431
431
|
type: "string",
|
|
432
432
|
maxLength: 2048,
|
|
433
|
-
pattern: "^\\/
|
|
433
|
+
pattern: "^\\/[aA][pP][iI]\\/[vV][0-9]+\\/[pP][uU][bB][lL][iI][cC](?:\\/[^?#\\r\\n]*)?$"
|
|
434
434
|
},
|
|
435
435
|
requestId: {
|
|
436
436
|
type: "string",
|
|
@@ -477,6 +477,189 @@ var public_openapi_default = {
|
|
|
477
477
|
],
|
|
478
478
|
additionalProperties: false
|
|
479
479
|
},
|
|
480
|
+
PublicDetectionIssueSemanticsInput: {
|
|
481
|
+
type: "object",
|
|
482
|
+
properties: {
|
|
483
|
+
schema_version: {
|
|
484
|
+
type: "string",
|
|
485
|
+
const: "detector-issue-semantics-v1"
|
|
486
|
+
},
|
|
487
|
+
polarity: {
|
|
488
|
+
type: "string",
|
|
489
|
+
enum: [
|
|
490
|
+
"problem",
|
|
491
|
+
"healthy",
|
|
492
|
+
"informational",
|
|
493
|
+
"unknown"
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
authority: {
|
|
497
|
+
default: "none",
|
|
498
|
+
type: "string",
|
|
499
|
+
enum: [
|
|
500
|
+
"none",
|
|
501
|
+
"project_authoritative"
|
|
502
|
+
]
|
|
503
|
+
},
|
|
504
|
+
truth_role: {
|
|
505
|
+
type: "string",
|
|
506
|
+
minLength: 1,
|
|
507
|
+
maxLength: 100
|
|
508
|
+
},
|
|
509
|
+
contract_id: {
|
|
510
|
+
type: "string",
|
|
511
|
+
minLength: 1,
|
|
512
|
+
maxLength: 256
|
|
513
|
+
},
|
|
514
|
+
contract_version: {
|
|
515
|
+
type: "string",
|
|
516
|
+
minLength: 1,
|
|
517
|
+
maxLength: 100
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
required: [
|
|
521
|
+
"schema_version",
|
|
522
|
+
"polarity"
|
|
523
|
+
],
|
|
524
|
+
additionalProperties: false
|
|
525
|
+
},
|
|
526
|
+
PublicDetectionIssueSemanticsOutput: {
|
|
527
|
+
type: "object",
|
|
528
|
+
properties: {
|
|
529
|
+
schema_version: {
|
|
530
|
+
type: "string",
|
|
531
|
+
const: "detector-issue-semantics-v1"
|
|
532
|
+
},
|
|
533
|
+
polarity: {
|
|
534
|
+
type: "string",
|
|
535
|
+
enum: [
|
|
536
|
+
"problem",
|
|
537
|
+
"healthy",
|
|
538
|
+
"informational",
|
|
539
|
+
"unknown"
|
|
540
|
+
]
|
|
541
|
+
},
|
|
542
|
+
authority: {
|
|
543
|
+
default: "none",
|
|
544
|
+
type: "string",
|
|
545
|
+
enum: [
|
|
546
|
+
"none",
|
|
547
|
+
"project_authoritative"
|
|
548
|
+
]
|
|
549
|
+
},
|
|
550
|
+
truth_role: {
|
|
551
|
+
type: "string",
|
|
552
|
+
minLength: 1,
|
|
553
|
+
maxLength: 100
|
|
554
|
+
},
|
|
555
|
+
contract_id: {
|
|
556
|
+
type: "string",
|
|
557
|
+
minLength: 1,
|
|
558
|
+
maxLength: 256
|
|
559
|
+
},
|
|
560
|
+
contract_version: {
|
|
561
|
+
type: "string",
|
|
562
|
+
minLength: 1,
|
|
563
|
+
maxLength: 100
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
required: [
|
|
567
|
+
"schema_version",
|
|
568
|
+
"polarity",
|
|
569
|
+
"authority"
|
|
570
|
+
],
|
|
571
|
+
additionalProperties: false
|
|
572
|
+
},
|
|
573
|
+
PublicDetectionSummary: {
|
|
574
|
+
type: "object",
|
|
575
|
+
properties: {
|
|
576
|
+
createdAt: {
|
|
577
|
+
type: "string",
|
|
578
|
+
format: "date-time",
|
|
579
|
+
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
580
|
+
},
|
|
581
|
+
displayName: {
|
|
582
|
+
type: "string",
|
|
583
|
+
minLength: 1,
|
|
584
|
+
maxLength: 255
|
|
585
|
+
},
|
|
586
|
+
groupId: {
|
|
587
|
+
type: "string",
|
|
588
|
+
format: "uuid",
|
|
589
|
+
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
590
|
+
},
|
|
591
|
+
groupName: {
|
|
592
|
+
anyOf: [
|
|
593
|
+
{
|
|
594
|
+
type: "string",
|
|
595
|
+
maxLength: 255
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
type: "null"
|
|
599
|
+
}
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
id: {
|
|
603
|
+
type: "string",
|
|
604
|
+
format: "uuid",
|
|
605
|
+
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
606
|
+
},
|
|
607
|
+
isActive: {
|
|
608
|
+
type: "boolean"
|
|
609
|
+
},
|
|
610
|
+
issueSemantics: {
|
|
611
|
+
anyOf: [
|
|
612
|
+
{
|
|
613
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
type: "null"
|
|
617
|
+
}
|
|
618
|
+
]
|
|
619
|
+
},
|
|
620
|
+
slug: {
|
|
621
|
+
type: "string",
|
|
622
|
+
minLength: 1,
|
|
623
|
+
maxLength: 100
|
|
624
|
+
},
|
|
625
|
+
threshold: {
|
|
626
|
+
type: "number",
|
|
627
|
+
minimum: 0,
|
|
628
|
+
maximum: 1
|
|
629
|
+
},
|
|
630
|
+
type: {
|
|
631
|
+
type: "string",
|
|
632
|
+
enum: [
|
|
633
|
+
"classifier",
|
|
634
|
+
"regex",
|
|
635
|
+
"conditional",
|
|
636
|
+
"pii",
|
|
637
|
+
"custom_trained",
|
|
638
|
+
"code",
|
|
639
|
+
"trace_rules",
|
|
640
|
+
"decision"
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
updatedAt: {
|
|
644
|
+
type: "string",
|
|
645
|
+
format: "date-time",
|
|
646
|
+
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
required: [
|
|
650
|
+
"createdAt",
|
|
651
|
+
"displayName",
|
|
652
|
+
"groupId",
|
|
653
|
+
"groupName",
|
|
654
|
+
"id",
|
|
655
|
+
"isActive",
|
|
656
|
+
"slug",
|
|
657
|
+
"threshold",
|
|
658
|
+
"type",
|
|
659
|
+
"updatedAt"
|
|
660
|
+
],
|
|
661
|
+
additionalProperties: false
|
|
662
|
+
},
|
|
480
663
|
PublicSavedFilter: {
|
|
481
664
|
additionalProperties: false,
|
|
482
665
|
properties: {
|
|
@@ -31116,6 +31299,16 @@ var public_openapi_default = {
|
|
|
31116
31299
|
default: true,
|
|
31117
31300
|
type: "boolean"
|
|
31118
31301
|
},
|
|
31302
|
+
issueSemantics: {
|
|
31303
|
+
anyOf: [
|
|
31304
|
+
{
|
|
31305
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
31306
|
+
},
|
|
31307
|
+
{
|
|
31308
|
+
type: "null"
|
|
31309
|
+
}
|
|
31310
|
+
]
|
|
31311
|
+
},
|
|
31119
31312
|
runOn: {
|
|
31120
31313
|
default: {
|
|
31121
31314
|
frequency: "trace"
|
|
@@ -31253,6 +31446,16 @@ var public_openapi_default = {
|
|
|
31253
31446
|
default: true,
|
|
31254
31447
|
type: "boolean"
|
|
31255
31448
|
},
|
|
31449
|
+
issueSemantics: {
|
|
31450
|
+
anyOf: [
|
|
31451
|
+
{
|
|
31452
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
31453
|
+
},
|
|
31454
|
+
{
|
|
31455
|
+
type: "null"
|
|
31456
|
+
}
|
|
31457
|
+
]
|
|
31458
|
+
},
|
|
31256
31459
|
runOn: {
|
|
31257
31460
|
default: {
|
|
31258
31461
|
frequency: "trace"
|
|
@@ -31418,6 +31621,16 @@ var public_openapi_default = {
|
|
|
31418
31621
|
default: true,
|
|
31419
31622
|
type: "boolean"
|
|
31420
31623
|
},
|
|
31624
|
+
issueSemantics: {
|
|
31625
|
+
anyOf: [
|
|
31626
|
+
{
|
|
31627
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
31628
|
+
},
|
|
31629
|
+
{
|
|
31630
|
+
type: "null"
|
|
31631
|
+
}
|
|
31632
|
+
]
|
|
31633
|
+
},
|
|
31421
31634
|
runOn: {
|
|
31422
31635
|
default: {
|
|
31423
31636
|
frequency: "trace"
|
|
@@ -32257,6 +32470,16 @@ var public_openapi_default = {
|
|
|
32257
32470
|
default: true,
|
|
32258
32471
|
type: "boolean"
|
|
32259
32472
|
},
|
|
32473
|
+
issueSemantics: {
|
|
32474
|
+
anyOf: [
|
|
32475
|
+
{
|
|
32476
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
32477
|
+
},
|
|
32478
|
+
{
|
|
32479
|
+
type: "null"
|
|
32480
|
+
}
|
|
32481
|
+
]
|
|
32482
|
+
},
|
|
32260
32483
|
runOn: {
|
|
32261
32484
|
default: {
|
|
32262
32485
|
frequency: "trace"
|
|
@@ -32951,6 +33174,16 @@ var public_openapi_default = {
|
|
|
32951
33174
|
default: true,
|
|
32952
33175
|
type: "boolean"
|
|
32953
33176
|
},
|
|
33177
|
+
issueSemantics: {
|
|
33178
|
+
anyOf: [
|
|
33179
|
+
{
|
|
33180
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
33181
|
+
},
|
|
33182
|
+
{
|
|
33183
|
+
type: "null"
|
|
33184
|
+
}
|
|
33185
|
+
]
|
|
33186
|
+
},
|
|
32954
33187
|
runOn: {
|
|
32955
33188
|
default: {
|
|
32956
33189
|
frequency: "trace"
|
|
@@ -33088,6 +33321,16 @@ var public_openapi_default = {
|
|
|
33088
33321
|
default: true,
|
|
33089
33322
|
type: "boolean"
|
|
33090
33323
|
},
|
|
33324
|
+
issueSemantics: {
|
|
33325
|
+
anyOf: [
|
|
33326
|
+
{
|
|
33327
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
33328
|
+
},
|
|
33329
|
+
{
|
|
33330
|
+
type: "null"
|
|
33331
|
+
}
|
|
33332
|
+
]
|
|
33333
|
+
},
|
|
33091
33334
|
runOn: {
|
|
33092
33335
|
default: {
|
|
33093
33336
|
frequency: "trace"
|
|
@@ -33253,6 +33496,16 @@ var public_openapi_default = {
|
|
|
33253
33496
|
default: true,
|
|
33254
33497
|
type: "boolean"
|
|
33255
33498
|
},
|
|
33499
|
+
issueSemantics: {
|
|
33500
|
+
anyOf: [
|
|
33501
|
+
{
|
|
33502
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
33503
|
+
},
|
|
33504
|
+
{
|
|
33505
|
+
type: "null"
|
|
33506
|
+
}
|
|
33507
|
+
]
|
|
33508
|
+
},
|
|
33256
33509
|
runOn: {
|
|
33257
33510
|
default: {
|
|
33258
33511
|
frequency: "trace"
|
|
@@ -34092,6 +34345,16 @@ var public_openapi_default = {
|
|
|
34092
34345
|
default: true,
|
|
34093
34346
|
type: "boolean"
|
|
34094
34347
|
},
|
|
34348
|
+
issueSemantics: {
|
|
34349
|
+
anyOf: [
|
|
34350
|
+
{
|
|
34351
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
34352
|
+
},
|
|
34353
|
+
{
|
|
34354
|
+
type: "null"
|
|
34355
|
+
}
|
|
34356
|
+
]
|
|
34357
|
+
},
|
|
34095
34358
|
runOn: {
|
|
34096
34359
|
default: {
|
|
34097
34360
|
frequency: "trace"
|
|
@@ -34799,6 +35062,16 @@ var public_openapi_default = {
|
|
|
34799
35062
|
default: true,
|
|
34800
35063
|
type: "boolean"
|
|
34801
35064
|
},
|
|
35065
|
+
issueSemantics: {
|
|
35066
|
+
anyOf: [
|
|
35067
|
+
{
|
|
35068
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
35069
|
+
},
|
|
35070
|
+
{
|
|
35071
|
+
type: "null"
|
|
35072
|
+
}
|
|
35073
|
+
]
|
|
35074
|
+
},
|
|
34802
35075
|
runOn: {
|
|
34803
35076
|
default: {
|
|
34804
35077
|
frequency: "trace"
|
|
@@ -34936,6 +35209,16 @@ var public_openapi_default = {
|
|
|
34936
35209
|
default: true,
|
|
34937
35210
|
type: "boolean"
|
|
34938
35211
|
},
|
|
35212
|
+
issueSemantics: {
|
|
35213
|
+
anyOf: [
|
|
35214
|
+
{
|
|
35215
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
35216
|
+
},
|
|
35217
|
+
{
|
|
35218
|
+
type: "null"
|
|
35219
|
+
}
|
|
35220
|
+
]
|
|
35221
|
+
},
|
|
34939
35222
|
runOn: {
|
|
34940
35223
|
default: {
|
|
34941
35224
|
frequency: "trace"
|
|
@@ -35101,6 +35384,16 @@ var public_openapi_default = {
|
|
|
35101
35384
|
default: true,
|
|
35102
35385
|
type: "boolean"
|
|
35103
35386
|
},
|
|
35387
|
+
issueSemantics: {
|
|
35388
|
+
anyOf: [
|
|
35389
|
+
{
|
|
35390
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
35391
|
+
},
|
|
35392
|
+
{
|
|
35393
|
+
type: "null"
|
|
35394
|
+
}
|
|
35395
|
+
]
|
|
35396
|
+
},
|
|
35104
35397
|
runOn: {
|
|
35105
35398
|
default: {
|
|
35106
35399
|
frequency: "trace"
|
|
@@ -35940,6 +36233,16 @@ var public_openapi_default = {
|
|
|
35940
36233
|
default: true,
|
|
35941
36234
|
type: "boolean"
|
|
35942
36235
|
},
|
|
36236
|
+
issueSemantics: {
|
|
36237
|
+
anyOf: [
|
|
36238
|
+
{
|
|
36239
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
36240
|
+
},
|
|
36241
|
+
{
|
|
36242
|
+
type: "null"
|
|
36243
|
+
}
|
|
36244
|
+
]
|
|
36245
|
+
},
|
|
35943
36246
|
runOn: {
|
|
35944
36247
|
default: {
|
|
35945
36248
|
frequency: "trace"
|
|
@@ -36586,84 +36889,7 @@ var public_openapi_default = {
|
|
|
36586
36889
|
detections: {
|
|
36587
36890
|
type: "array",
|
|
36588
36891
|
items: {
|
|
36589
|
-
|
|
36590
|
-
properties: {
|
|
36591
|
-
createdAt: {
|
|
36592
|
-
type: "string",
|
|
36593
|
-
format: "date-time",
|
|
36594
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
36595
|
-
},
|
|
36596
|
-
displayName: {
|
|
36597
|
-
type: "string",
|
|
36598
|
-
minLength: 1,
|
|
36599
|
-
maxLength: 255
|
|
36600
|
-
},
|
|
36601
|
-
groupId: {
|
|
36602
|
-
type: "string",
|
|
36603
|
-
format: "uuid",
|
|
36604
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
36605
|
-
},
|
|
36606
|
-
groupName: {
|
|
36607
|
-
anyOf: [
|
|
36608
|
-
{
|
|
36609
|
-
type: "string",
|
|
36610
|
-
maxLength: 255
|
|
36611
|
-
},
|
|
36612
|
-
{
|
|
36613
|
-
type: "null"
|
|
36614
|
-
}
|
|
36615
|
-
]
|
|
36616
|
-
},
|
|
36617
|
-
id: {
|
|
36618
|
-
type: "string",
|
|
36619
|
-
format: "uuid",
|
|
36620
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
36621
|
-
},
|
|
36622
|
-
isActive: {
|
|
36623
|
-
type: "boolean"
|
|
36624
|
-
},
|
|
36625
|
-
slug: {
|
|
36626
|
-
type: "string",
|
|
36627
|
-
minLength: 1,
|
|
36628
|
-
maxLength: 100
|
|
36629
|
-
},
|
|
36630
|
-
threshold: {
|
|
36631
|
-
type: "number",
|
|
36632
|
-
minimum: 0,
|
|
36633
|
-
maximum: 1
|
|
36634
|
-
},
|
|
36635
|
-
type: {
|
|
36636
|
-
type: "string",
|
|
36637
|
-
enum: [
|
|
36638
|
-
"classifier",
|
|
36639
|
-
"regex",
|
|
36640
|
-
"conditional",
|
|
36641
|
-
"pii",
|
|
36642
|
-
"custom_trained",
|
|
36643
|
-
"code",
|
|
36644
|
-
"trace_rules",
|
|
36645
|
-
"decision"
|
|
36646
|
-
]
|
|
36647
|
-
},
|
|
36648
|
-
updatedAt: {
|
|
36649
|
-
type: "string",
|
|
36650
|
-
format: "date-time",
|
|
36651
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
36652
|
-
}
|
|
36653
|
-
},
|
|
36654
|
-
required: [
|
|
36655
|
-
"createdAt",
|
|
36656
|
-
"displayName",
|
|
36657
|
-
"groupId",
|
|
36658
|
-
"groupName",
|
|
36659
|
-
"id",
|
|
36660
|
-
"isActive",
|
|
36661
|
-
"slug",
|
|
36662
|
-
"threshold",
|
|
36663
|
-
"type",
|
|
36664
|
-
"updatedAt"
|
|
36665
|
-
],
|
|
36666
|
-
additionalProperties: false
|
|
36892
|
+
$ref: "#/components/schemas/PublicDetectionSummary"
|
|
36667
36893
|
}
|
|
36668
36894
|
},
|
|
36669
36895
|
page: {
|
|
@@ -37214,84 +37440,7 @@ var public_openapi_default = {
|
|
|
37214
37440
|
type: "object",
|
|
37215
37441
|
properties: {
|
|
37216
37442
|
data: {
|
|
37217
|
-
|
|
37218
|
-
properties: {
|
|
37219
|
-
createdAt: {
|
|
37220
|
-
type: "string",
|
|
37221
|
-
format: "date-time",
|
|
37222
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
37223
|
-
},
|
|
37224
|
-
displayName: {
|
|
37225
|
-
type: "string",
|
|
37226
|
-
minLength: 1,
|
|
37227
|
-
maxLength: 255
|
|
37228
|
-
},
|
|
37229
|
-
groupId: {
|
|
37230
|
-
type: "string",
|
|
37231
|
-
format: "uuid",
|
|
37232
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
37233
|
-
},
|
|
37234
|
-
groupName: {
|
|
37235
|
-
anyOf: [
|
|
37236
|
-
{
|
|
37237
|
-
type: "string",
|
|
37238
|
-
maxLength: 255
|
|
37239
|
-
},
|
|
37240
|
-
{
|
|
37241
|
-
type: "null"
|
|
37242
|
-
}
|
|
37243
|
-
]
|
|
37244
|
-
},
|
|
37245
|
-
id: {
|
|
37246
|
-
type: "string",
|
|
37247
|
-
format: "uuid",
|
|
37248
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
37249
|
-
},
|
|
37250
|
-
isActive: {
|
|
37251
|
-
type: "boolean"
|
|
37252
|
-
},
|
|
37253
|
-
slug: {
|
|
37254
|
-
type: "string",
|
|
37255
|
-
minLength: 1,
|
|
37256
|
-
maxLength: 100
|
|
37257
|
-
},
|
|
37258
|
-
threshold: {
|
|
37259
|
-
type: "number",
|
|
37260
|
-
minimum: 0,
|
|
37261
|
-
maximum: 1
|
|
37262
|
-
},
|
|
37263
|
-
type: {
|
|
37264
|
-
type: "string",
|
|
37265
|
-
enum: [
|
|
37266
|
-
"classifier",
|
|
37267
|
-
"regex",
|
|
37268
|
-
"conditional",
|
|
37269
|
-
"pii",
|
|
37270
|
-
"custom_trained",
|
|
37271
|
-
"code",
|
|
37272
|
-
"trace_rules",
|
|
37273
|
-
"decision"
|
|
37274
|
-
]
|
|
37275
|
-
},
|
|
37276
|
-
updatedAt: {
|
|
37277
|
-
type: "string",
|
|
37278
|
-
format: "date-time",
|
|
37279
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
37280
|
-
}
|
|
37281
|
-
},
|
|
37282
|
-
required: [
|
|
37283
|
-
"createdAt",
|
|
37284
|
-
"displayName",
|
|
37285
|
-
"groupId",
|
|
37286
|
-
"groupName",
|
|
37287
|
-
"id",
|
|
37288
|
-
"isActive",
|
|
37289
|
-
"slug",
|
|
37290
|
-
"threshold",
|
|
37291
|
-
"type",
|
|
37292
|
-
"updatedAt"
|
|
37293
|
-
],
|
|
37294
|
-
additionalProperties: false
|
|
37443
|
+
$ref: "#/components/schemas/PublicDetectionSummary"
|
|
37295
37444
|
},
|
|
37296
37445
|
requestId: {
|
|
37297
37446
|
type: "string",
|
|
@@ -37734,6 +37883,16 @@ var public_openapi_default = {
|
|
|
37734
37883
|
default: true,
|
|
37735
37884
|
type: "boolean"
|
|
37736
37885
|
},
|
|
37886
|
+
issueSemantics: {
|
|
37887
|
+
anyOf: [
|
|
37888
|
+
{
|
|
37889
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
37890
|
+
},
|
|
37891
|
+
{
|
|
37892
|
+
type: "null"
|
|
37893
|
+
}
|
|
37894
|
+
]
|
|
37895
|
+
},
|
|
37737
37896
|
runOn: {
|
|
37738
37897
|
default: {
|
|
37739
37898
|
frequency: "trace"
|
|
@@ -37865,6 +38024,16 @@ var public_openapi_default = {
|
|
|
37865
38024
|
default: true,
|
|
37866
38025
|
type: "boolean"
|
|
37867
38026
|
},
|
|
38027
|
+
issueSemantics: {
|
|
38028
|
+
anyOf: [
|
|
38029
|
+
{
|
|
38030
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
38031
|
+
},
|
|
38032
|
+
{
|
|
38033
|
+
type: "null"
|
|
38034
|
+
}
|
|
38035
|
+
]
|
|
38036
|
+
},
|
|
37868
38037
|
runOn: {
|
|
37869
38038
|
default: {
|
|
37870
38039
|
frequency: "trace"
|
|
@@ -38020,6 +38189,16 @@ var public_openapi_default = {
|
|
|
38020
38189
|
default: true,
|
|
38021
38190
|
type: "boolean"
|
|
38022
38191
|
},
|
|
38192
|
+
issueSemantics: {
|
|
38193
|
+
anyOf: [
|
|
38194
|
+
{
|
|
38195
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
38196
|
+
},
|
|
38197
|
+
{
|
|
38198
|
+
type: "null"
|
|
38199
|
+
}
|
|
38200
|
+
]
|
|
38201
|
+
},
|
|
38023
38202
|
runOn: {
|
|
38024
38203
|
default: {
|
|
38025
38204
|
frequency: "trace"
|
|
@@ -38853,6 +39032,16 @@ var public_openapi_default = {
|
|
|
38853
39032
|
default: true,
|
|
38854
39033
|
type: "boolean"
|
|
38855
39034
|
},
|
|
39035
|
+
issueSemantics: {
|
|
39036
|
+
anyOf: [
|
|
39037
|
+
{
|
|
39038
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
39039
|
+
},
|
|
39040
|
+
{
|
|
39041
|
+
type: "null"
|
|
39042
|
+
}
|
|
39043
|
+
]
|
|
39044
|
+
},
|
|
38856
39045
|
runOn: {
|
|
38857
39046
|
default: {
|
|
38858
39047
|
frequency: "trace"
|
|
@@ -39595,6 +39784,16 @@ var public_openapi_default = {
|
|
|
39595
39784
|
isActive: {
|
|
39596
39785
|
type: "boolean"
|
|
39597
39786
|
},
|
|
39787
|
+
issueSemantics: {
|
|
39788
|
+
anyOf: [
|
|
39789
|
+
{
|
|
39790
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
39791
|
+
},
|
|
39792
|
+
{
|
|
39793
|
+
type: "null"
|
|
39794
|
+
}
|
|
39795
|
+
]
|
|
39796
|
+
},
|
|
39598
39797
|
slug: {
|
|
39599
39798
|
type: "string",
|
|
39600
39799
|
minLength: 1,
|
|
@@ -39779,6 +39978,16 @@ var public_openapi_default = {
|
|
|
39779
39978
|
isActive: {
|
|
39780
39979
|
type: "boolean"
|
|
39781
39980
|
},
|
|
39981
|
+
issueSemantics: {
|
|
39982
|
+
anyOf: [
|
|
39983
|
+
{
|
|
39984
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
39985
|
+
},
|
|
39986
|
+
{
|
|
39987
|
+
type: "null"
|
|
39988
|
+
}
|
|
39989
|
+
]
|
|
39990
|
+
},
|
|
39782
39991
|
slug: {
|
|
39783
39992
|
type: "string",
|
|
39784
39993
|
minLength: 1,
|
|
@@ -39992,6 +40201,16 @@ var public_openapi_default = {
|
|
|
39992
40201
|
isActive: {
|
|
39993
40202
|
type: "boolean"
|
|
39994
40203
|
},
|
|
40204
|
+
issueSemantics: {
|
|
40205
|
+
anyOf: [
|
|
40206
|
+
{
|
|
40207
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
40208
|
+
},
|
|
40209
|
+
{
|
|
40210
|
+
type: "null"
|
|
40211
|
+
}
|
|
40212
|
+
]
|
|
40213
|
+
},
|
|
39995
40214
|
slug: {
|
|
39996
40215
|
type: "string",
|
|
39997
40216
|
minLength: 1,
|
|
@@ -40883,6 +41102,16 @@ var public_openapi_default = {
|
|
|
40883
41102
|
isActive: {
|
|
40884
41103
|
type: "boolean"
|
|
40885
41104
|
},
|
|
41105
|
+
issueSemantics: {
|
|
41106
|
+
anyOf: [
|
|
41107
|
+
{
|
|
41108
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
41109
|
+
},
|
|
41110
|
+
{
|
|
41111
|
+
type: "null"
|
|
41112
|
+
}
|
|
41113
|
+
]
|
|
41114
|
+
},
|
|
40886
41115
|
slug: {
|
|
40887
41116
|
type: "string",
|
|
40888
41117
|
minLength: 1,
|
|
@@ -41073,6 +41302,16 @@ var public_openapi_default = {
|
|
|
41073
41302
|
isActive: {
|
|
41074
41303
|
type: "boolean"
|
|
41075
41304
|
},
|
|
41305
|
+
issueSemantics: {
|
|
41306
|
+
anyOf: [
|
|
41307
|
+
{
|
|
41308
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
41309
|
+
},
|
|
41310
|
+
{
|
|
41311
|
+
type: "null"
|
|
41312
|
+
}
|
|
41313
|
+
]
|
|
41314
|
+
},
|
|
41076
41315
|
slug: {
|
|
41077
41316
|
type: "string",
|
|
41078
41317
|
minLength: 1,
|
|
@@ -41294,6 +41533,16 @@ var public_openapi_default = {
|
|
|
41294
41533
|
isActive: {
|
|
41295
41534
|
type: "boolean"
|
|
41296
41535
|
},
|
|
41536
|
+
issueSemantics: {
|
|
41537
|
+
anyOf: [
|
|
41538
|
+
{
|
|
41539
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
41540
|
+
},
|
|
41541
|
+
{
|
|
41542
|
+
type: "null"
|
|
41543
|
+
}
|
|
41544
|
+
]
|
|
41545
|
+
},
|
|
41297
41546
|
slug: {
|
|
41298
41547
|
type: "string",
|
|
41299
41548
|
minLength: 1,
|
|
@@ -41506,6 +41755,16 @@ var public_openapi_default = {
|
|
|
41506
41755
|
isActive: {
|
|
41507
41756
|
type: "boolean"
|
|
41508
41757
|
},
|
|
41758
|
+
issueSemantics: {
|
|
41759
|
+
anyOf: [
|
|
41760
|
+
{
|
|
41761
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
41762
|
+
},
|
|
41763
|
+
{
|
|
41764
|
+
type: "null"
|
|
41765
|
+
}
|
|
41766
|
+
]
|
|
41767
|
+
},
|
|
41509
41768
|
slug: {
|
|
41510
41769
|
type: "string",
|
|
41511
41770
|
minLength: 1,
|
|
@@ -42614,84 +42873,7 @@ var public_openapi_default = {
|
|
|
42614
42873
|
type: "object",
|
|
42615
42874
|
properties: {
|
|
42616
42875
|
data: {
|
|
42617
|
-
|
|
42618
|
-
properties: {
|
|
42619
|
-
createdAt: {
|
|
42620
|
-
type: "string",
|
|
42621
|
-
format: "date-time",
|
|
42622
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
42623
|
-
},
|
|
42624
|
-
displayName: {
|
|
42625
|
-
type: "string",
|
|
42626
|
-
minLength: 1,
|
|
42627
|
-
maxLength: 255
|
|
42628
|
-
},
|
|
42629
|
-
groupId: {
|
|
42630
|
-
type: "string",
|
|
42631
|
-
format: "uuid",
|
|
42632
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
42633
|
-
},
|
|
42634
|
-
groupName: {
|
|
42635
|
-
anyOf: [
|
|
42636
|
-
{
|
|
42637
|
-
type: "string",
|
|
42638
|
-
maxLength: 255
|
|
42639
|
-
},
|
|
42640
|
-
{
|
|
42641
|
-
type: "null"
|
|
42642
|
-
}
|
|
42643
|
-
]
|
|
42644
|
-
},
|
|
42645
|
-
id: {
|
|
42646
|
-
type: "string",
|
|
42647
|
-
format: "uuid",
|
|
42648
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
42649
|
-
},
|
|
42650
|
-
isActive: {
|
|
42651
|
-
type: "boolean"
|
|
42652
|
-
},
|
|
42653
|
-
slug: {
|
|
42654
|
-
type: "string",
|
|
42655
|
-
minLength: 1,
|
|
42656
|
-
maxLength: 100
|
|
42657
|
-
},
|
|
42658
|
-
threshold: {
|
|
42659
|
-
type: "number",
|
|
42660
|
-
minimum: 0,
|
|
42661
|
-
maximum: 1
|
|
42662
|
-
},
|
|
42663
|
-
type: {
|
|
42664
|
-
type: "string",
|
|
42665
|
-
enum: [
|
|
42666
|
-
"classifier",
|
|
42667
|
-
"regex",
|
|
42668
|
-
"conditional",
|
|
42669
|
-
"pii",
|
|
42670
|
-
"custom_trained",
|
|
42671
|
-
"code",
|
|
42672
|
-
"trace_rules",
|
|
42673
|
-
"decision"
|
|
42674
|
-
]
|
|
42675
|
-
},
|
|
42676
|
-
updatedAt: {
|
|
42677
|
-
type: "string",
|
|
42678
|
-
format: "date-time",
|
|
42679
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
42680
|
-
}
|
|
42681
|
-
},
|
|
42682
|
-
required: [
|
|
42683
|
-
"createdAt",
|
|
42684
|
-
"displayName",
|
|
42685
|
-
"groupId",
|
|
42686
|
-
"groupName",
|
|
42687
|
-
"id",
|
|
42688
|
-
"isActive",
|
|
42689
|
-
"slug",
|
|
42690
|
-
"threshold",
|
|
42691
|
-
"type",
|
|
42692
|
-
"updatedAt"
|
|
42693
|
-
],
|
|
42694
|
-
additionalProperties: false
|
|
42876
|
+
$ref: "#/components/schemas/PublicDetectionSummary"
|
|
42695
42877
|
},
|
|
42696
42878
|
requestId: {
|
|
42697
42879
|
type: "string",
|
|
@@ -43976,6 +44158,16 @@ var public_openapi_default = {
|
|
|
43976
44158
|
format: "uuid",
|
|
43977
44159
|
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
43978
44160
|
},
|
|
44161
|
+
issueSemantics: {
|
|
44162
|
+
anyOf: [
|
|
44163
|
+
{
|
|
44164
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
44165
|
+
},
|
|
44166
|
+
{
|
|
44167
|
+
type: "null"
|
|
44168
|
+
}
|
|
44169
|
+
]
|
|
44170
|
+
},
|
|
43979
44171
|
runOn: {
|
|
43980
44172
|
type: "object",
|
|
43981
44173
|
properties: {
|
|
@@ -45276,84 +45468,7 @@ var public_openapi_default = {
|
|
|
45276
45468
|
type: "object",
|
|
45277
45469
|
properties: {
|
|
45278
45470
|
data: {
|
|
45279
|
-
|
|
45280
|
-
properties: {
|
|
45281
|
-
createdAt: {
|
|
45282
|
-
type: "string",
|
|
45283
|
-
format: "date-time",
|
|
45284
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
45285
|
-
},
|
|
45286
|
-
displayName: {
|
|
45287
|
-
type: "string",
|
|
45288
|
-
minLength: 1,
|
|
45289
|
-
maxLength: 255
|
|
45290
|
-
},
|
|
45291
|
-
groupId: {
|
|
45292
|
-
type: "string",
|
|
45293
|
-
format: "uuid",
|
|
45294
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
45295
|
-
},
|
|
45296
|
-
groupName: {
|
|
45297
|
-
anyOf: [
|
|
45298
|
-
{
|
|
45299
|
-
type: "string",
|
|
45300
|
-
maxLength: 255
|
|
45301
|
-
},
|
|
45302
|
-
{
|
|
45303
|
-
type: "null"
|
|
45304
|
-
}
|
|
45305
|
-
]
|
|
45306
|
-
},
|
|
45307
|
-
id: {
|
|
45308
|
-
type: "string",
|
|
45309
|
-
format: "uuid",
|
|
45310
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
45311
|
-
},
|
|
45312
|
-
isActive: {
|
|
45313
|
-
type: "boolean"
|
|
45314
|
-
},
|
|
45315
|
-
slug: {
|
|
45316
|
-
type: "string",
|
|
45317
|
-
minLength: 1,
|
|
45318
|
-
maxLength: 100
|
|
45319
|
-
},
|
|
45320
|
-
threshold: {
|
|
45321
|
-
type: "number",
|
|
45322
|
-
minimum: 0,
|
|
45323
|
-
maximum: 1
|
|
45324
|
-
},
|
|
45325
|
-
type: {
|
|
45326
|
-
type: "string",
|
|
45327
|
-
enum: [
|
|
45328
|
-
"classifier",
|
|
45329
|
-
"regex",
|
|
45330
|
-
"conditional",
|
|
45331
|
-
"pii",
|
|
45332
|
-
"custom_trained",
|
|
45333
|
-
"code",
|
|
45334
|
-
"trace_rules",
|
|
45335
|
-
"decision"
|
|
45336
|
-
]
|
|
45337
|
-
},
|
|
45338
|
-
updatedAt: {
|
|
45339
|
-
type: "string",
|
|
45340
|
-
format: "date-time",
|
|
45341
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
45342
|
-
}
|
|
45343
|
-
},
|
|
45344
|
-
required: [
|
|
45345
|
-
"createdAt",
|
|
45346
|
-
"displayName",
|
|
45347
|
-
"groupId",
|
|
45348
|
-
"groupName",
|
|
45349
|
-
"id",
|
|
45350
|
-
"isActive",
|
|
45351
|
-
"slug",
|
|
45352
|
-
"threshold",
|
|
45353
|
-
"type",
|
|
45354
|
-
"updatedAt"
|
|
45355
|
-
],
|
|
45356
|
-
additionalProperties: false
|
|
45471
|
+
$ref: "#/components/schemas/PublicDetectionSummary"
|
|
45357
45472
|
},
|
|
45358
45473
|
requestId: {
|
|
45359
45474
|
type: "string",
|
|
@@ -46465,6 +46580,16 @@ var public_openapi_default = {
|
|
|
46465
46580
|
default: true,
|
|
46466
46581
|
type: "boolean"
|
|
46467
46582
|
},
|
|
46583
|
+
issueSemantics: {
|
|
46584
|
+
anyOf: [
|
|
46585
|
+
{
|
|
46586
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
46587
|
+
},
|
|
46588
|
+
{
|
|
46589
|
+
type: "null"
|
|
46590
|
+
}
|
|
46591
|
+
]
|
|
46592
|
+
},
|
|
46468
46593
|
runOn: {
|
|
46469
46594
|
default: {
|
|
46470
46595
|
frequency: "trace"
|
|
@@ -46602,6 +46727,16 @@ var public_openapi_default = {
|
|
|
46602
46727
|
default: true,
|
|
46603
46728
|
type: "boolean"
|
|
46604
46729
|
},
|
|
46730
|
+
issueSemantics: {
|
|
46731
|
+
anyOf: [
|
|
46732
|
+
{
|
|
46733
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
46734
|
+
},
|
|
46735
|
+
{
|
|
46736
|
+
type: "null"
|
|
46737
|
+
}
|
|
46738
|
+
]
|
|
46739
|
+
},
|
|
46605
46740
|
runOn: {
|
|
46606
46741
|
default: {
|
|
46607
46742
|
frequency: "trace"
|
|
@@ -46767,6 +46902,16 @@ var public_openapi_default = {
|
|
|
46767
46902
|
default: true,
|
|
46768
46903
|
type: "boolean"
|
|
46769
46904
|
},
|
|
46905
|
+
issueSemantics: {
|
|
46906
|
+
anyOf: [
|
|
46907
|
+
{
|
|
46908
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
46909
|
+
},
|
|
46910
|
+
{
|
|
46911
|
+
type: "null"
|
|
46912
|
+
}
|
|
46913
|
+
]
|
|
46914
|
+
},
|
|
46770
46915
|
runOn: {
|
|
46771
46916
|
default: {
|
|
46772
46917
|
frequency: "trace"
|
|
@@ -47606,6 +47751,16 @@ var public_openapi_default = {
|
|
|
47606
47751
|
default: true,
|
|
47607
47752
|
type: "boolean"
|
|
47608
47753
|
},
|
|
47754
|
+
issueSemantics: {
|
|
47755
|
+
anyOf: [
|
|
47756
|
+
{
|
|
47757
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
47758
|
+
},
|
|
47759
|
+
{
|
|
47760
|
+
type: "null"
|
|
47761
|
+
}
|
|
47762
|
+
]
|
|
47763
|
+
},
|
|
47609
47764
|
runOn: {
|
|
47610
47765
|
default: {
|
|
47611
47766
|
frequency: "trace"
|
|
@@ -177006,7 +177161,18 @@ var HUMAN_CLI_OAUTH_SCOPES = Object.freeze(
|
|
|
177006
177161
|
)
|
|
177007
177162
|
);
|
|
177008
177163
|
var ALLOWED_SCOPES = new Set(HUMAN_CLI_OAUTH_SCOPES);
|
|
177009
|
-
var DEFAULT_CLI_OAUTH_SCOPES =
|
|
177164
|
+
var DEFAULT_CLI_OAUTH_SCOPES = Object.freeze([
|
|
177165
|
+
"context:read",
|
|
177166
|
+
"organization:read",
|
|
177167
|
+
"billing:read",
|
|
177168
|
+
"profile:read",
|
|
177169
|
+
"observability:read",
|
|
177170
|
+
"evaluation:read",
|
|
177171
|
+
"configuration:read",
|
|
177172
|
+
"sharing:read",
|
|
177173
|
+
"access:read",
|
|
177174
|
+
"offline_access"
|
|
177175
|
+
]);
|
|
177010
177176
|
var deviceAuthorizationSchema = z.object({
|
|
177011
177177
|
device_code: z.string().regex(DEVICE_CODE),
|
|
177012
177178
|
expires_in: z.number().int().min(60).max(1800),
|
|
@@ -177438,10 +177604,10 @@ import { Command, CommanderError, Option } from "commander";
|
|
|
177438
177604
|
// package.json
|
|
177439
177605
|
var package_default = {
|
|
177440
177606
|
name: "neatlogs-cli",
|
|
177441
|
-
version: "0.1.0
|
|
177607
|
+
version: "0.1.0",
|
|
177442
177608
|
description: "Non-interactive CLI for the NeatLogs public API",
|
|
177443
177609
|
homepage: "https://github.com/neatlogs/neatlogs-app#readme",
|
|
177444
|
-
license: "
|
|
177610
|
+
license: "MIT",
|
|
177445
177611
|
repository: {
|
|
177446
177612
|
type: "git",
|
|
177447
177613
|
url: "git+https://github.com/neatlogs/neatlogs-app.git",
|
|
@@ -177455,6 +177621,7 @@ var package_default = {
|
|
|
177455
177621
|
"README.md",
|
|
177456
177622
|
"SECURITY.md",
|
|
177457
177623
|
"CHANGELOG.md",
|
|
177624
|
+
"LICENSE",
|
|
177458
177625
|
"docs"
|
|
177459
177626
|
],
|
|
177460
177627
|
type: "module",
|
|
@@ -177926,6 +178093,8 @@ function isJsonLineWithinByteBudget(value, maximumBytes) {
|
|
|
177926
178093
|
|
|
177927
178094
|
// src/handler-builder.ts
|
|
177928
178095
|
var PUBLIC_RESPONSE_COMPONENT_NAMES = [
|
|
178096
|
+
"PublicDetectionIssueSemanticsOutput",
|
|
178097
|
+
"PublicDetectionSummary",
|
|
177929
178098
|
"PublicSavedFilter",
|
|
177930
178099
|
"PublicSavedFilterEnvelope",
|
|
177931
178100
|
"PublicSavedFilterGroup1",
|
|
@@ -183646,9 +183815,15 @@ function isOpaqueId(value, maxLength = 255) {
|
|
|
183646
183815
|
|
|
183647
183816
|
// src/commands/shared.ts
|
|
183648
183817
|
var automaticallyGeneratedMutationKeys = /* @__PURE__ */ new Set();
|
|
183649
|
-
function invalidArguments() {
|
|
183818
|
+
function invalidArguments(error, field) {
|
|
183650
183819
|
throw new CliError({
|
|
183651
183820
|
code: "INVALID_ARGUMENTS",
|
|
183821
|
+
detail: "Check the listed fields and run this command with --help for usage.",
|
|
183822
|
+
errors: error?.issues.slice(0, 20).map((issue) => ({
|
|
183823
|
+
code: issue.code,
|
|
183824
|
+
message: "Invalid value; see command help for the expected format and bounds.",
|
|
183825
|
+
path: [...field ? [field] : [], ...issue.path].map(String).join(".")
|
|
183826
|
+
})),
|
|
183652
183827
|
exitCode: ExitCode.Usage
|
|
183653
183828
|
});
|
|
183654
183829
|
}
|
|
@@ -183668,7 +183843,7 @@ function exactUuidConfirmation(confirmation, target) {
|
|
|
183668
183843
|
}
|
|
183669
183844
|
function uuid3(value) {
|
|
183670
183845
|
const parsed = z20.string().uuid().transform((id) => id.toLowerCase()).safeParse(value);
|
|
183671
|
-
if (!parsed.success) invalidArguments();
|
|
183846
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183672
183847
|
return parsed.data;
|
|
183673
183848
|
}
|
|
183674
183849
|
function mutationKey(value) {
|
|
@@ -183684,12 +183859,12 @@ function postgresUuid(value) {
|
|
|
183684
183859
|
const parsed = z20.string().regex(
|
|
183685
183860
|
/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/
|
|
183686
183861
|
).transform((id) => id.toLowerCase()).safeParse(value);
|
|
183687
|
-
if (!parsed.success) invalidArguments();
|
|
183862
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183688
183863
|
return parsed.data;
|
|
183689
183864
|
}
|
|
183690
183865
|
function opaqueId(value, maxLength = 255) {
|
|
183691
183866
|
const parsed = z20.string().refine((candidate) => isOpaqueId(candidate, maxLength)).safeParse(value);
|
|
183692
|
-
if (!parsed.success) invalidArguments();
|
|
183867
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183693
183868
|
return parsed.data;
|
|
183694
183869
|
}
|
|
183695
183870
|
|
|
@@ -183716,7 +183891,7 @@ function registerAccountCommands(program, executeOnline, readJsonBody) {
|
|
|
183716
183891
|
profile.command("update").option("--name <name>", "public display name").option("--bio <bio>", "public biography").option("--clear-bio", "clear the public biography").option("--timezone <iana>", "IANA timezone").option("--clear-timezone", "clear the timezone").option("--language <language>", "language code").action(
|
|
183717
183892
|
async (options) => {
|
|
183718
183893
|
const parsed = profileUpdateOptionsSchema.safeParse(options);
|
|
183719
|
-
if (!parsed.success) invalidArguments();
|
|
183894
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183720
183895
|
const body = {};
|
|
183721
183896
|
if (parsed.data.name !== void 0) body.name = parsed.data.name;
|
|
183722
183897
|
if (parsed.data.bio !== void 0) body.bio = parsed.data.bio;
|
|
@@ -183800,7 +183975,7 @@ function registerAlertCommands(program, executeOnline, readJsonBody = async () =
|
|
|
183800
183975
|
alerts.command("test").description("dry-run or deliver a bounded alert test").argument("<alert-rule-id>").requiredOption("--mode <mode>", "dry-run or deliver").option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(
|
|
183801
183976
|
async (alertRuleId, options) => {
|
|
183802
183977
|
const mode = testModeSchema.safeParse(options.mode);
|
|
183803
|
-
if (!mode.success) invalidArguments();
|
|
183978
|
+
if (!mode.success) invalidArguments(mode.error);
|
|
183804
183979
|
await executeOnline(testAlertRuleHandler, "curated", {
|
|
183805
183980
|
body: { mode: mode.data === "dry-run" ? "dry_run" : "deliver" },
|
|
183806
183981
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -183857,7 +184032,7 @@ function registerAlertCommands(program, executeOnline, readJsonBody = async () =
|
|
|
183857
184032
|
alerts.command("changes").description("list privacy-safe alert rule changes").argument("<alert-rule-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
183858
184033
|
async (alertRuleId, options) => {
|
|
183859
184034
|
const parsed = changesOptionsSchema.safeParse(options);
|
|
183860
|
-
if (!parsed.success) invalidArguments();
|
|
184035
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183861
184036
|
const query = {};
|
|
183862
184037
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
183863
184038
|
if (parsed.data.limit !== void 0) {
|
|
@@ -183872,7 +184047,7 @@ function registerAlertCommands(program, executeOnline, readJsonBody = async () =
|
|
|
183872
184047
|
alerts.command("history").description("list alert fire history").option("--alert-rule-id <uuid>", "filter by alert rule").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--end-time <timestamp>", "inclusive ISO-8601 end time").option("--limit <number>", "page size (1-100)").option("--start-time <timestamp>", "inclusive ISO-8601 start time").action(
|
|
183873
184048
|
async (options) => {
|
|
183874
184049
|
const parsed = historyOptionsSchema.safeParse(options);
|
|
183875
|
-
if (!parsed.success) invalidArguments();
|
|
184050
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183876
184051
|
const query = {};
|
|
183877
184052
|
if (parsed.data.alertRuleId)
|
|
183878
184053
|
query.alertRuleId = parsed.data.alertRuleId;
|
|
@@ -183887,7 +184062,7 @@ function registerAlertCommands(program, executeOnline, readJsonBody = async () =
|
|
|
183887
184062
|
alerts.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--enabled <state>", "all, true, or false").option("--limit <number>", "page size (1-100)").option("--rule-type <type>", "alert rule type").action(
|
|
183888
184063
|
async (options) => {
|
|
183889
184064
|
const parsed = listOptionsSchema.safeParse(options);
|
|
183890
|
-
if (!parsed.success) invalidArguments();
|
|
184065
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183891
184066
|
const query = {};
|
|
183892
184067
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
183893
184068
|
if (parsed.data.enabled) query.enabled = parsed.data.enabled;
|
|
@@ -183961,7 +184136,7 @@ var savedViewFields = [
|
|
|
183961
184136
|
];
|
|
183962
184137
|
function parseSavedView(body) {
|
|
183963
184138
|
const parsed = savedViewBody.safeParse(boundedBody(body));
|
|
183964
|
-
if (!parsed.success) invalidArguments();
|
|
184139
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183965
184140
|
return {
|
|
183966
184141
|
filters: savedViewFields.flatMap(([sourceField, field, id]) => {
|
|
183967
184142
|
const values = parsed.data.filters[sourceField];
|
|
@@ -183979,7 +184154,7 @@ function parseBase(options) {
|
|
|
183979
184154
|
to: options.to,
|
|
183980
184155
|
workflow: options.workflow
|
|
183981
184156
|
});
|
|
183982
|
-
if (!parsed.success) invalidArguments();
|
|
184157
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183983
184158
|
const filters = {
|
|
183984
184159
|
...parsed.data.detection ? { detections: parsed.data.detection } : {},
|
|
183985
184160
|
...parsed.data.session ? { sessionIds: parsed.data.session } : {},
|
|
@@ -183998,7 +184173,7 @@ function boundedBody(body) {
|
|
|
183998
184173
|
return body;
|
|
183999
184174
|
}
|
|
184000
184175
|
function scopeOptions(command) {
|
|
184001
|
-
return command.requiredOption("--from <timestamp>", "inclusive RFC 3339 start").requiredOption("--to <timestamp>", "exclusive RFC 3339 end").option("--workflow <names>", "comma-separated workflow names").option("--session <ids>", "comma-separated session IDs").option("--status <values>", "comma-separated OK,ERROR values").option("--detection <names>", "comma-separated detection names");
|
|
184176
|
+
return command.requiredOption("--from <timestamp>", "inclusive RFC 3339 start (required)").requiredOption("--to <timestamp>", "exclusive RFC 3339 end (required)").option("--workflow <names>", "comma-separated workflow names").option("--session <ids>", "comma-separated session IDs").option("--status <values>", "comma-separated OK,ERROR values").option("--detection <names>", "comma-separated detection names");
|
|
184002
184177
|
}
|
|
184003
184178
|
function registerAnalyticsCommands(program, executeOnline, readJsonBody, readExportRequest) {
|
|
184004
184179
|
const analytics = program.command("analytics").description("bounded trace analytics");
|
|
@@ -184009,7 +184184,7 @@ function registerAnalyticsCommands(program, executeOnline, readJsonBody, readExp
|
|
|
184009
184184
|
const parsed = analyticsExportRequestSchema.safeParse(
|
|
184010
184185
|
await readExportRequest()
|
|
184011
184186
|
);
|
|
184012
|
-
if (!parsed.success) invalidArguments();
|
|
184187
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184013
184188
|
await executeOnline(exportAnalyticsHandler, "curated", {
|
|
184014
184189
|
body: parsed.data
|
|
184015
184190
|
});
|
|
@@ -184055,8 +184230,9 @@ function registerAnalyticsCommands(program, executeOnline, readJsonBody, readExp
|
|
|
184055
184230
|
async (options) => {
|
|
184056
184231
|
const field = z23.enum(["workflowName", "detections", "sessionId", "status"]).safeParse(options.field);
|
|
184057
184232
|
const limit2 = z23.coerce.number().int().min(1).max(50).safeParse(options.limit);
|
|
184058
|
-
if (!
|
|
184059
|
-
|
|
184233
|
+
if (!field.success) invalidArguments(field.error, "field");
|
|
184234
|
+
if (!limit2.success) invalidArguments(limit2.error, "limit");
|
|
184235
|
+
if ((options.search?.length ?? 0) > 100) invalidArguments();
|
|
184060
184236
|
const body = boundedBody({
|
|
184061
184237
|
...parseBase(options),
|
|
184062
184238
|
fields: [field.data],
|
|
@@ -184071,7 +184247,7 @@ function registerAnalyticsCommands(program, executeOnline, readJsonBody, readExp
|
|
|
184071
184247
|
scopeOptions(analytics.command("chart")).requiredOption("--granularity <value>", "minute_5, hour, or day").option("--timezone <iana>", "IANA timezone", "UTC").action(
|
|
184072
184248
|
async (options) => {
|
|
184073
184249
|
const granularity = z23.enum(["minute_5", "hour", "day"]).safeParse(options.granularity);
|
|
184074
|
-
if (!granularity.success) invalidArguments();
|
|
184250
|
+
if (!granularity.success) invalidArguments(granularity.error);
|
|
184075
184251
|
const body = boundedBody({
|
|
184076
184252
|
...parseBase(options),
|
|
184077
184253
|
granularity: granularity.data,
|
|
@@ -184261,7 +184437,7 @@ function registerBillingCommands(program, executeOnline) {
|
|
|
184261
184437
|
).option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
184262
184438
|
async (organizationId, options) => {
|
|
184263
184439
|
const parsed = alertOptionsSchema.safeParse(options);
|
|
184264
|
-
if (!parsed.success) invalidArguments();
|
|
184440
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184265
184441
|
const query = {};
|
|
184266
184442
|
if (parsed.data.state) query.state = parsed.data.state;
|
|
184267
184443
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
@@ -184333,7 +184509,7 @@ function registerCommentCommands(program, executeOnline, readContent = async ()
|
|
|
184333
184509
|
);
|
|
184334
184510
|
comments.command("list").requiredOption("--trace <trace-id>", "opaque trace ID").option("--resolved <boolean>", "true or false").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").action(async (options) => {
|
|
184335
184511
|
const parsed = listOptionsSchema2.safeParse(options);
|
|
184336
|
-
if (!parsed.success) invalidArguments();
|
|
184512
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184337
184513
|
await executeOnline(listCommentThreadsHandler, "curated", {
|
|
184338
184514
|
pathParameters: { traceId: opaqueId(parsed.data.trace) },
|
|
184339
184515
|
query: {
|
|
@@ -184345,7 +184521,7 @@ function registerCommentCommands(program, executeOnline, readContent = async ()
|
|
|
184345
184521
|
});
|
|
184346
184522
|
comments.command("get").argument("<thread-id>").requiredOption("--trace <trace-id>", "opaque trace ID").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "message page size (1-50)").action(async (threadId, options) => {
|
|
184347
184523
|
const parsed = getOptionsSchema.safeParse(options);
|
|
184348
|
-
if (!parsed.success) invalidArguments();
|
|
184524
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184349
184525
|
await executeOnline(getCommentThreadHandler, "curated", {
|
|
184350
184526
|
pathParameters: {
|
|
184351
184527
|
threadId: uuid3(threadId),
|
|
@@ -184612,7 +184788,7 @@ var migrationReplacementOptions = lifecycleOptions.extend({
|
|
|
184612
184788
|
function addListCommand(command, handler2, executeOnline) {
|
|
184613
184789
|
command.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").action(async (options) => {
|
|
184614
184790
|
const parsed = listOptions.safeParse(options);
|
|
184615
|
-
if (!parsed.success) invalidArguments();
|
|
184791
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184616
184792
|
const query = {};
|
|
184617
184793
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
184618
184794
|
if (parsed.data.limit !== void 0) {
|
|
@@ -184657,8 +184833,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184657
184833
|
).option("--idempotency-key <key>", "stable UUID for retrying issuance").action(async (migrationId, options) => {
|
|
184658
184834
|
const id = uuid3(migrationId);
|
|
184659
184835
|
const parsed = migrationReplacementOptions.safeParse(options);
|
|
184660
|
-
if (!parsed.success
|
|
184661
|
-
|
|
184836
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184837
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184662
184838
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184663
184839
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184664
184840
|
const response = await executeOnline(
|
|
@@ -184688,8 +184864,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184688
184864
|
migrations.command(name).argument("<migration-id>").requiredOption("--confirm <migration-id>", "repeat the migration UUID").option("--idempotency-key <key>", "stable UUID for retrying the action").action(async (migrationId, options) => {
|
|
184689
184865
|
const id = uuid3(migrationId);
|
|
184690
184866
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184691
|
-
if (!parsed.success
|
|
184692
|
-
|
|
184867
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184868
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184693
184869
|
await executeOnline(handler2, "curated", {
|
|
184694
184870
|
body: { confirmation: id },
|
|
184695
184871
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -184708,7 +184884,7 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184708
184884
|
).option("--idempotency-key <key>", "stable UUID for retrying the action").action(async (migrationId, options) => {
|
|
184709
184885
|
const id = uuid3(migrationId);
|
|
184710
184886
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184711
|
-
if (!parsed.success) invalidArguments();
|
|
184887
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184712
184888
|
await executeOnline(revokeCredentialMigrationSourceHandler, "curated", {
|
|
184713
184889
|
body: { confirmation: uuid3(parsed.data.confirm) },
|
|
184714
184890
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -184727,7 +184903,7 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184727
184903
|
[]
|
|
184728
184904
|
).option("--expires-in-days <days>").option("--rate-limit <per-minute>").option("--idempotency-key <key>").action(async (options) => {
|
|
184729
184905
|
const parsed = createApiKeyOptions.safeParse(options);
|
|
184730
|
-
if (!parsed.success) invalidArguments();
|
|
184906
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184731
184907
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184732
184908
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184733
184909
|
const response = await executeOnline(createApiKeyHandler, "none", {
|
|
@@ -184759,8 +184935,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184759
184935
|
apiKeys.command("rotate").argument("<credential-id>").requiredOption("--confirm <credential-id>").option("--idempotency-key <key>").action(async (credentialId, options) => {
|
|
184760
184936
|
const id = uuid3(credentialId);
|
|
184761
184937
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184762
|
-
if (!parsed.success
|
|
184763
|
-
|
|
184938
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184939
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184764
184940
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184765
184941
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184766
184942
|
const response = await executeOnline(rotateApiKeyHandler, "none", {
|
|
@@ -184785,8 +184961,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184785
184961
|
apiKeys.command("revoke").argument("<credential-id>").requiredOption("--confirm <credential-id>").option("--idempotency-key <key>").action(async (credentialId, options) => {
|
|
184786
184962
|
const id = uuid3(credentialId);
|
|
184787
184963
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184788
|
-
if (!parsed.success
|
|
184789
|
-
|
|
184964
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184965
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184790
184966
|
await executeOnline(revokeApiKeyHandler, "curated", {
|
|
184791
184967
|
body: { confirmation: id },
|
|
184792
184968
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -184797,7 +184973,7 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184797
184973
|
addListCommand(ingest, listIngestCredentialsHandler, executeOnline);
|
|
184798
184974
|
ingest.command("create").requiredOption("--name <name>").option("--expires-in-days <days>").option("--idempotency-key <key>").action(async (options) => {
|
|
184799
184975
|
const parsed = createIngestOptions.safeParse(options);
|
|
184800
|
-
if (!parsed.success) invalidArguments();
|
|
184976
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184801
184977
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184802
184978
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184803
184979
|
const response = await executeOnline(
|
|
@@ -184829,8 +185005,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184829
185005
|
ingest.command("rotate").argument("<credential-id>").requiredOption("--confirm <credential-id>").option("--idempotency-key <key>").action(async (credentialId, options) => {
|
|
184830
185006
|
const id = uuid3(credentialId);
|
|
184831
185007
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184832
|
-
if (!parsed.success
|
|
184833
|
-
|
|
185008
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185009
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184834
185010
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184835
185011
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184836
185012
|
const response = await executeOnline(
|
|
@@ -184859,8 +185035,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184859
185035
|
ingest.command("revoke").argument("<credential-id>").requiredOption("--confirm <credential-id>").option("--idempotency-key <key>").action(async (credentialId, options) => {
|
|
184860
185036
|
const id = uuid3(credentialId);
|
|
184861
185037
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184862
|
-
if (!parsed.success
|
|
184863
|
-
|
|
185038
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185039
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184864
185040
|
await executeOnline(revokeIngestCredentialHandler, "curated", {
|
|
184865
185041
|
body: { confirmation: id },
|
|
184866
185042
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -184898,13 +185074,15 @@ var jsonObjectSchema = z29.record(z29.string(), z29.unknown());
|
|
|
184898
185074
|
var batchFieldsSchema = z29.array(z29.string().min(1).max(1024)).max(128);
|
|
184899
185075
|
function jsonValue(value, schema, maxBytes) {
|
|
184900
185076
|
if (Buffer.byteLength(value, "utf8") > maxBytes) invalidArguments();
|
|
185077
|
+
let decoded;
|
|
184901
185078
|
try {
|
|
184902
|
-
|
|
184903
|
-
if (!parsed.success) invalidArguments();
|
|
184904
|
-
return parsed.data;
|
|
185079
|
+
decoded = JSON.parse(value);
|
|
184905
185080
|
} catch {
|
|
184906
185081
|
invalidArguments();
|
|
184907
185082
|
}
|
|
185083
|
+
const parsed = schema.safeParse(decoded);
|
|
185084
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185085
|
+
return parsed.data;
|
|
184908
185086
|
}
|
|
184909
185087
|
function registerDetectionCommands(program, executeOnline, readPreviewRequest, readComputeRequest) {
|
|
184910
185088
|
const detections = program.command("detections").description("detection catalog commands");
|
|
@@ -184915,7 +185093,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184915
185093
|
const parsed = detectionPreviewRequestSchema.safeParse(
|
|
184916
185094
|
await readPreviewRequest()
|
|
184917
185095
|
);
|
|
184918
|
-
if (!parsed.success) invalidArguments();
|
|
185096
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184919
185097
|
await executeOnline(previewDetectionHandler, "curated", {
|
|
184920
185098
|
body: parsed.data
|
|
184921
185099
|
});
|
|
@@ -184927,7 +185105,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184927
185105
|
const parsed = detectionGenerateRequestSchema.safeParse(
|
|
184928
185106
|
await readComputeRequest()
|
|
184929
185107
|
);
|
|
184930
|
-
if (!parsed.success) invalidArguments();
|
|
185108
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184931
185109
|
await executeOnline(generateDetectionHandler, "curated", {
|
|
184932
185110
|
body: parsed.data
|
|
184933
185111
|
});
|
|
@@ -184939,7 +185117,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184939
185117
|
const parsed = detectionSuggestionRunRequestSchema.safeParse(
|
|
184940
185118
|
await readComputeRequest()
|
|
184941
185119
|
);
|
|
184942
|
-
if (!parsed.success) invalidArguments();
|
|
185120
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184943
185121
|
await executeOnline(createDetectionSuggestionRunHandler, "curated", {
|
|
184944
185122
|
body: parsed.data,
|
|
184945
185123
|
idempotencyKey: mutationKey(options.idempotencyKey)
|
|
@@ -184966,7 +185144,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184966
185144
|
cursor: z29.string().min(1).max(1024).optional(),
|
|
184967
185145
|
limit: z29.coerce.number().int().min(1).max(50).optional()
|
|
184968
185146
|
}).strict().safeParse(options);
|
|
184969
|
-
if (!parsed.success) invalidArguments();
|
|
185147
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184970
185148
|
const query = {};
|
|
184971
185149
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
184972
185150
|
if (parsed.data.limit !== void 0)
|
|
@@ -184997,7 +185175,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184997
185175
|
detections.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--group <uuid>", "filter by detection group UUID").option("--limit <number>", "page size (1-100)").option("--status <status>", "active, paused, disabled, inactive, or all").action(
|
|
184998
185176
|
async (options) => {
|
|
184999
185177
|
const parsed = detectionListOptionsSchema.safeParse(options);
|
|
185000
|
-
if (!parsed.success) invalidArguments();
|
|
185178
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185001
185179
|
const query = {};
|
|
185002
185180
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185003
185181
|
if (parsed.data.group) query.groupId = parsed.data.group;
|
|
@@ -185017,8 +185195,9 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185017
185195
|
const type = detectionTypeSchema.safeParse(options.type);
|
|
185018
185196
|
const name = z29.string().trim().min(1).max(255).safeParse(options.name);
|
|
185019
185197
|
const threshold = z29.coerce.number().min(0).max(1).optional().safeParse(options.threshold);
|
|
185020
|
-
if (!
|
|
185021
|
-
|
|
185198
|
+
if (!type.success) invalidArguments(type.error, "type");
|
|
185199
|
+
if (!name.success) invalidArguments(name.error, "name");
|
|
185200
|
+
if (!threshold.success) invalidArguments(threshold.error, "threshold");
|
|
185022
185201
|
const body = {
|
|
185023
185202
|
config: jsonValue(options.config, jsonObjectSchema, 512 * 1024),
|
|
185024
185203
|
displayName: name.data,
|
|
@@ -185055,7 +185234,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185055
185234
|
if (options.group !== void 0) body.groupId = uuid3(options.group);
|
|
185056
185235
|
if (options.name !== void 0) {
|
|
185057
185236
|
const name = z29.string().trim().min(1).max(255).safeParse(options.name);
|
|
185058
|
-
if (!name.success) invalidArguments();
|
|
185237
|
+
if (!name.success) invalidArguments(name.error);
|
|
185059
185238
|
body.displayName = name.data;
|
|
185060
185239
|
}
|
|
185061
185240
|
if (options.clearDescription) body.description = null;
|
|
@@ -185063,7 +185242,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185063
185242
|
body.description = options.description;
|
|
185064
185243
|
if (options.threshold !== void 0) {
|
|
185065
185244
|
const threshold = z29.coerce.number().min(0).max(1).safeParse(options.threshold);
|
|
185066
|
-
if (!threshold.success) invalidArguments();
|
|
185245
|
+
if (!threshold.success) invalidArguments(threshold.error);
|
|
185067
185246
|
body.threshold = threshold.data;
|
|
185068
185247
|
}
|
|
185069
185248
|
if (options.config !== void 0) {
|
|
@@ -185119,7 +185298,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185119
185298
|
detections.command("history").argument("<detection-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185120
185299
|
async (detectionId, options) => {
|
|
185121
185300
|
const parsed = detectionHitOptionsSchema.safeParse(options);
|
|
185122
|
-
if (!parsed.success) invalidArguments();
|
|
185301
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185123
185302
|
const query = {};
|
|
185124
185303
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185125
185304
|
if (parsed.data.limit !== void 0) {
|
|
@@ -185134,7 +185313,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185134
185313
|
detections.command("hits").argument("<detection-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185135
185314
|
async (detectionId, options) => {
|
|
185136
185315
|
const parsed = detectionHitOptionsSchema.safeParse(options);
|
|
185137
|
-
if (!parsed.success) invalidArguments();
|
|
185316
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185138
185317
|
const query = {};
|
|
185139
185318
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185140
185319
|
if (parsed.data.limit !== void 0) {
|
|
@@ -185149,7 +185328,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185149
185328
|
detections.command("trends").argument("<detection-id>").requiredOption("--from <timestamp>", "inclusive UTC start timestamp").requiredOption("--to <timestamp>", "exclusive UTC end timestamp").option("--granularity <value>", "hour, day, or week", "day").action(
|
|
185150
185329
|
async (detectionId, options) => {
|
|
185151
185330
|
const parsed = detectionTrendOptionsSchema.safeParse(options);
|
|
185152
|
-
if (!parsed.success) invalidArguments();
|
|
185331
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185153
185332
|
await executeOnline(getDetectionTrendsHandler, "curated", {
|
|
185154
185333
|
pathParameters: { detectionId: uuid3(detectionId) },
|
|
185155
185334
|
query: parsed.data
|
|
@@ -185282,7 +185461,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185282
185461
|
).action(
|
|
185283
185462
|
async (evaluationId, options) => {
|
|
185284
185463
|
const parsed = evaluationExportOptionsSchema.safeParse(options);
|
|
185285
|
-
if (!parsed.success) invalidArguments();
|
|
185464
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185286
185465
|
const query = {
|
|
185287
185466
|
from: parsed.data.from,
|
|
185288
185467
|
to: parsed.data.to
|
|
@@ -185315,7 +185494,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185315
185494
|
limit: z30.coerce.number().int().min(1).max(100).optional(),
|
|
185316
185495
|
status: z30.enum(["draft", "active", "completed", "archived", "all"]).optional()
|
|
185317
185496
|
}).strict().safeParse(options);
|
|
185318
|
-
if (!parsed.success) invalidArguments();
|
|
185497
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185319
185498
|
const query = {};
|
|
185320
185499
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185321
185500
|
if (parsed.data.limit !== void 0)
|
|
@@ -185342,7 +185521,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185342
185521
|
const batchSchedule = publicEvaluationDurationSchema.safeParse(
|
|
185343
185522
|
options.batchSchedule
|
|
185344
185523
|
);
|
|
185345
|
-
if (!batchSchedule.success) invalidArguments();
|
|
185524
|
+
if (!batchSchedule.success) invalidArguments(batchSchedule.error);
|
|
185346
185525
|
await executeOnline(updateEvaluationHandler, "curated", {
|
|
185347
185526
|
body: { batchSchedule: batchSchedule.data },
|
|
185348
185527
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -185353,7 +185532,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185353
185532
|
batches.command("list").argument("<evaluation-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185354
185533
|
async (evaluationId, options) => {
|
|
185355
185534
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185356
|
-
if (!parsed.success) invalidArguments();
|
|
185535
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185357
185536
|
const query = {};
|
|
185358
185537
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185359
185538
|
if (parsed.data.limit !== void 0)
|
|
@@ -185391,7 +185570,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185391
185570
|
).action(
|
|
185392
185571
|
async (evaluationId, batchId, options) => {
|
|
185393
185572
|
const parsed = evaluationBatchReportExportOptionsSchema.safeParse(options);
|
|
185394
|
-
if (!parsed.success) invalidArguments();
|
|
185573
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185395
185574
|
const request = {
|
|
185396
185575
|
pathParameters: {
|
|
185397
185576
|
batchId: uuid3(batchId),
|
|
@@ -185417,7 +185596,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185417
185596
|
batches.command("cube").argument("<evaluation-id>").argument("<batch-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185418
185597
|
async (evaluationId, batchId, options) => {
|
|
185419
185598
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185420
|
-
if (!parsed.success) invalidArguments();
|
|
185599
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185421
185600
|
const query = {};
|
|
185422
185601
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185423
185602
|
if (parsed.data.limit !== void 0)
|
|
@@ -185449,7 +185628,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185449
185628
|
maxAssignments: options.maxAssignments,
|
|
185450
185629
|
maxItems: options.maxItems
|
|
185451
185630
|
});
|
|
185452
|
-
if (!body.success) invalidArguments();
|
|
185631
|
+
if (!body.success) invalidArguments(body.error);
|
|
185453
185632
|
await executeOnline(dispatchEvaluationBatchHandler, "curated", {
|
|
185454
185633
|
body: body.data,
|
|
185455
185634
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -185480,7 +185659,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185480
185659
|
evaluations.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").option("--status <status>", "draft, active, completed, archived, or all").action(
|
|
185481
185660
|
async (options) => {
|
|
185482
185661
|
const parsed = evaluationListOptionsSchema.safeParse(options);
|
|
185483
|
-
if (!parsed.success) invalidArguments();
|
|
185662
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185484
185663
|
const query = {};
|
|
185485
185664
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185486
185665
|
if (parsed.data.limit !== void 0)
|
|
@@ -185491,14 +185670,14 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185491
185670
|
);
|
|
185492
185671
|
evaluations.command("stats").option("--period <period>", "24h, 7d, 30d, 90d, or all").action(async (options) => {
|
|
185493
185672
|
const parsed = evaluationStatsOptionsSchema.safeParse(options);
|
|
185494
|
-
if (!parsed.success) invalidArguments();
|
|
185673
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185495
185674
|
const query = {};
|
|
185496
185675
|
if (parsed.data.period) query.period = parsed.data.period;
|
|
185497
185676
|
await executeOnline(getEvaluationStatsHandler, "curated", { query });
|
|
185498
185677
|
});
|
|
185499
185678
|
evaluations.command("cohorts").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(async (options) => {
|
|
185500
185679
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185501
|
-
if (!parsed.success) invalidArguments();
|
|
185680
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185502
185681
|
const query = {};
|
|
185503
185682
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185504
185683
|
if (parsed.data.limit !== void 0)
|
|
@@ -185508,7 +185687,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185508
185687
|
evaluations.command("responses").argument("<evaluation-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185509
185688
|
async (evaluationId, options) => {
|
|
185510
185689
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185511
|
-
if (!parsed.success) invalidArguments();
|
|
185690
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185512
185691
|
const query = {};
|
|
185513
185692
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185514
185693
|
if (parsed.data.limit !== void 0)
|
|
@@ -185552,7 +185731,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185552
185731
|
assignMe: options.assignMe,
|
|
185553
185732
|
reviewDuration: options.reviewDuration
|
|
185554
185733
|
});
|
|
185555
|
-
if (!parsed.success) invalidArguments();
|
|
185734
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185556
185735
|
await executeOnline(launchEvaluationHandler, "curated", {
|
|
185557
185736
|
body: parsed.data,
|
|
185558
185737
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -185639,7 +185818,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185639
185818
|
items.command("list").argument("<evaluation-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185640
185819
|
async (evaluationId, options) => {
|
|
185641
185820
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185642
|
-
if (!parsed.success) invalidArguments();
|
|
185821
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185643
185822
|
const query = {};
|
|
185644
185823
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185645
185824
|
if (parsed.data.limit !== void 0)
|
|
@@ -185734,7 +185913,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185734
185913
|
const parsed = evaluatorRunRequestSchema.safeParse(
|
|
185735
185914
|
await readRunRequest()
|
|
185736
185915
|
);
|
|
185737
|
-
if (!parsed.success) invalidArguments();
|
|
185916
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185738
185917
|
await executeOnline(createEvaluatorRunHandler, "curated", {
|
|
185739
185918
|
body: parsed.data,
|
|
185740
185919
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -185774,7 +185953,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185774
185953
|
const parsed = evaluatorPreviewRequestSchema.safeParse(
|
|
185775
185954
|
await readComputeRequest()
|
|
185776
185955
|
);
|
|
185777
|
-
if (!parsed.success) invalidArguments();
|
|
185956
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185778
185957
|
await executeOnline(previewEvaluatorHandler, "curated", {
|
|
185779
185958
|
body: parsed.data
|
|
185780
185959
|
});
|
|
@@ -185786,7 +185965,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185786
185965
|
const parsed = evaluatorPlaygroundRequestSchema.safeParse(
|
|
185787
185966
|
await readComputeRequest()
|
|
185788
185967
|
);
|
|
185789
|
-
if (!parsed.success) invalidArguments();
|
|
185968
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185790
185969
|
await executeOnline(playgroundEvaluatorHandler, "curated", {
|
|
185791
185970
|
body: parsed.data,
|
|
185792
185971
|
pathParameters: { evaluatorId: uuid3(evaluatorId) }
|
|
@@ -185795,7 +185974,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185795
185974
|
evaluators.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").option("--type <type>", "llm_judge or agent_judge").option("--include-archived", "include archived evaluator definitions").action(
|
|
185796
185975
|
async (options) => {
|
|
185797
185976
|
const parsed = listOptionsSchema3.safeParse(options);
|
|
185798
|
-
if (!parsed.success) invalidArguments();
|
|
185977
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185799
185978
|
const query = {};
|
|
185800
185979
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185801
185980
|
if (parsed.data.includeArchived) query.includeArchived = "true";
|
|
@@ -185818,7 +185997,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185818
185997
|
evaluators.command("runs").argument("<evaluator-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185819
185998
|
async (evaluatorId, options) => {
|
|
185820
185999
|
const parsed = runListOptionsSchema.safeParse(options);
|
|
185821
|
-
if (!parsed.success) invalidArguments();
|
|
186000
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185822
186001
|
const query = {};
|
|
185823
186002
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185824
186003
|
if (parsed.data.limit !== void 0)
|
|
@@ -185894,7 +186073,7 @@ var traceOptionSchema = z32.object({ trace: z32.string().min(1).max(255) }).stri
|
|
|
185894
186073
|
var bulkRequestSchema = z32.object({ items: z32.array(z32.unknown()).min(1).max(100) }).strict();
|
|
185895
186074
|
function pageInput(options) {
|
|
185896
186075
|
const parsed = pageOptionsSchema.safeParse(options);
|
|
185897
|
-
if (!parsed.success) invalidArguments();
|
|
186076
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185898
186077
|
return {
|
|
185899
186078
|
pathParameters: { traceId: opaqueId(parsed.data.trace) },
|
|
185900
186079
|
query: {
|
|
@@ -185905,7 +186084,7 @@ function pageInput(options) {
|
|
|
185905
186084
|
}
|
|
185906
186085
|
function traceId(options) {
|
|
185907
186086
|
const parsed = traceOptionSchema.safeParse(options);
|
|
185908
|
-
if (!parsed.success) invalidArguments();
|
|
186087
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185909
186088
|
return opaqueId(parsed.data.trace);
|
|
185910
186089
|
}
|
|
185911
186090
|
function registerFeedbackCommands(program, executeOnline, readJsonBody = async () => invalidArguments(), readBulkRequest = async () => invalidArguments()) {
|
|
@@ -185915,7 +186094,7 @@ function registerFeedbackCommands(program, executeOnline, readJsonBody = async (
|
|
|
185915
186094
|
"read one bounded feedback bulk request from stdin"
|
|
185916
186095
|
).option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(async (options) => {
|
|
185917
186096
|
const parsed = bulkRequestSchema.safeParse(await readBulkRequest());
|
|
185918
|
-
if (!parsed.success) invalidArguments();
|
|
186097
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185919
186098
|
const response = await executeOnline(
|
|
185920
186099
|
bulkMutateFeedbackHandler,
|
|
185921
186100
|
"curated",
|
|
@@ -186038,7 +186217,7 @@ function registerFilterCommands(program, executeOnline, readJsonBody) {
|
|
|
186038
186217
|
const filters = program.command("filters").description("personal saved trace-filter commands");
|
|
186039
186218
|
filters.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(async (options) => {
|
|
186040
186219
|
const parsed = listOptionsSchema4.safeParse(options);
|
|
186041
|
-
if (!parsed.success) invalidArguments();
|
|
186220
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
186042
186221
|
const query = {};
|
|
186043
186222
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
186044
186223
|
if (parsed.data.limit !== void 0)
|
|
@@ -186095,7 +186274,7 @@ function registerDetectionGroupCommands(program, executeOnline) {
|
|
|
186095
186274
|
const groups = program.command("groups").description("detection group catalog commands");
|
|
186096
186275
|
groups.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(async (options) => {
|
|
186097
186276
|
const parsed = groupListOptionsSchema.safeParse(options);
|
|
186098
|
-
if (!parsed.success) invalidArguments();
|
|
186277
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
186099
186278
|
const query = {};
|
|
186100
186279
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
186101
186280
|
if (parsed.data.limit !== void 0) {
|
|
@@ -186116,7 +186295,9 @@ function registerDetectionGroupCommands(program, executeOnline) {
|
|
|
186116
186295
|
const idempotencyKey = idempotencyKeySchema.safeParse(
|
|
186117
186296
|
options.idempotencyKey
|
|
186118
186297
|
);
|
|
186119
|
-
if (!
|
|
186298
|
+
if (!name.success) invalidArguments(name.error, "name");
|
|
186299
|
+
if (!idempotencyKey.success)
|
|
186300
|
+
invalidArguments(idempotencyKey.error, "idempotencyKey");
|
|
186120
186301
|
await executeOnline(createDetectionGroupHandler, "curated", {
|
|
186121
186302
|
body: { name: name.data },
|
|
186122
186303
|
idempotencyKey: mutationKey(idempotencyKey.data)
|
|
@@ -186132,7 +186313,9 @@ function registerDetectionGroupCommands(program, executeOnline) {
|
|
|
186132
186313
|
const idempotencyKey = idempotencyKeySchema.safeParse(
|
|
186133
186314
|
options.idempotencyKey
|
|
186134
186315
|
);
|
|
186135
|
-
if (!
|
|
186316
|
+
if (!name.success) invalidArguments(name.error, "name");
|
|
186317
|
+
if (!idempotencyKey.success)
|
|
186318
|
+
invalidArguments(idempotencyKey.error, "idempotencyKey");
|
|
186136
186319
|
await executeOnline(updateDetectionGroupHandler, "curated", {
|
|
186137
186320
|
body: { name: name.data },
|
|
186138
186321
|
idempotencyKey: mutationKey(idempotencyKey.data),
|
|
@@ -186153,7 +186336,9 @@ function registerDetectionGroupCommands(program, executeOnline) {
|
|
|
186153
186336
|
const idempotencyKey = idempotencyKeySchema.safeParse(
|
|
186154
186337
|
options.idempotencyKey
|
|
186155
186338
|
);
|
|
186156
|
-
if (
|
|
186339
|
+
if (!idempotencyKey.success)
|
|
186340
|
+
invalidArguments(idempotencyKey.error, "idempotencyKey");
|
|
186341
|
+
if (confirmation !== parsedGroupId) {
|
|
186157
186342
|
invalidArguments();
|
|
186158
186343
|
}
|
|
186159
186344
|
await executeOnline(deleteDetectionGroupHandler, "curated", {
|
|
@@ -186715,6 +186900,10 @@ async function executePublicTransport(input) {
|
|
|
186715
186900
|
}
|
|
186716
186901
|
async function decodePublicResponse(response, handler2, input, prepared) {
|
|
186717
186902
|
const generatedKey = prepared.generatedIdempotencyKey;
|
|
186903
|
+
const responseRequestId = safeString(
|
|
186904
|
+
response.headers.get("x-request-id"),
|
|
186905
|
+
SAFE_REQUEST_ID
|
|
186906
|
+
);
|
|
186718
186907
|
if (response.status >= 300 && response.status < 400) {
|
|
186719
186908
|
throw errorWithGeneratedIdempotencyKey(
|
|
186720
186909
|
new CliError({
|
|
@@ -186747,7 +186936,9 @@ async function decodePublicResponse(response, handler2, input, prepared) {
|
|
|
186747
186936
|
throw errorWithGeneratedIdempotencyKey(
|
|
186748
186937
|
new CliError({
|
|
186749
186938
|
code: "INVALID_RESPONSE",
|
|
186750
|
-
exitCode: ExitCode.ServerOrContract
|
|
186939
|
+
exitCode: ExitCode.ServerOrContract,
|
|
186940
|
+
instance: responseRequestId ? handler2.path : void 0,
|
|
186941
|
+
requestId: responseRequestId
|
|
186751
186942
|
}),
|
|
186752
186943
|
generatedKey
|
|
186753
186944
|
);
|
|
@@ -186757,7 +186948,9 @@ async function decodePublicResponse(response, handler2, input, prepared) {
|
|
|
186757
186948
|
throw errorWithGeneratedIdempotencyKey(
|
|
186758
186949
|
new CliError({
|
|
186759
186950
|
code: "INVALID_RESPONSE",
|
|
186760
|
-
exitCode: ExitCode.ServerOrContract
|
|
186951
|
+
exitCode: ExitCode.ServerOrContract,
|
|
186952
|
+
instance: responseRequestId ? handler2.path : void 0,
|
|
186953
|
+
requestId: responseRequestId
|
|
186761
186954
|
}),
|
|
186762
186955
|
generatedKey
|
|
186763
186956
|
);
|
|
@@ -187337,7 +187530,7 @@ function registerGuestCommands(program, dependencies) {
|
|
|
187337
187530
|
).option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-25)").action(
|
|
187338
187531
|
async (options) => {
|
|
187339
187532
|
const parsedOptions = contextOptions.safeParse(options);
|
|
187340
|
-
if (!parsedOptions.success) invalidArguments();
|
|
187533
|
+
if (!parsedOptions.success) invalidArguments(parsedOptions.error);
|
|
187341
187534
|
const client = clientFor(dependencies);
|
|
187342
187535
|
const request = await parseGuestContextRequest(dependencies.stdin);
|
|
187343
187536
|
const query = {};
|
|
@@ -187392,7 +187585,7 @@ var listOptionsSchema5 = z38.object({
|
|
|
187392
187585
|
}).strict();
|
|
187393
187586
|
function listQuery(options) {
|
|
187394
187587
|
const parsed = listOptionsSchema5.safeParse(options);
|
|
187395
|
-
if (!parsed.success) invalidArguments();
|
|
187588
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187396
187589
|
const query = {};
|
|
187397
187590
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
187398
187591
|
if (parsed.data.limit !== void 0) query.limit = String(parsed.data.limit);
|
|
@@ -187545,12 +187738,12 @@ var issuePageSchema = z39.object({
|
|
|
187545
187738
|
}).strict();
|
|
187546
187739
|
function provider(value) {
|
|
187547
187740
|
const parsed = providerSchema.safeParse(value);
|
|
187548
|
-
if (!parsed.success) invalidArguments();
|
|
187741
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187549
187742
|
return parsed.data;
|
|
187550
187743
|
}
|
|
187551
187744
|
function issuePage(options) {
|
|
187552
187745
|
const parsed = issuePageSchema.safeParse(options);
|
|
187553
|
-
if (!parsed.success) invalidArguments();
|
|
187746
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187554
187747
|
return {
|
|
187555
187748
|
...parsed.data.cursor ? { cursor: parsed.data.cursor } : {},
|
|
187556
187749
|
...parsed.data.limit === void 0 ? {} : { limit: String(parsed.data.limit) }
|
|
@@ -187567,7 +187760,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187567
187760
|
integrations.command("test").argument("<provider-id>").option("--idempotency-key <key>", "stable UUID for retrying this test").action(
|
|
187568
187761
|
async (providerId, options) => {
|
|
187569
187762
|
const parsed = testedProviderSchema.safeParse(providerId);
|
|
187570
|
-
if (!parsed.success) invalidArguments();
|
|
187763
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187571
187764
|
await executeOnline(testIntegrationProviderHandler, "curated", {
|
|
187572
187765
|
body: {},
|
|
187573
187766
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -187578,7 +187771,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187578
187771
|
integrations.command("oauth-start").argument("<provider-id>").option("--idempotency-key <key>", "stable UUID for retrying this handoff").action(
|
|
187579
187772
|
async (providerId, options) => {
|
|
187580
187773
|
const parsed = oauthProviderSchema.safeParse(providerId);
|
|
187581
|
-
if (!parsed.success) invalidArguments();
|
|
187774
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187582
187775
|
await executeOnline(createIntegrationOAuthHandoffHandler, "curated", {
|
|
187583
187776
|
body: {},
|
|
187584
187777
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -187588,7 +187781,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187588
187781
|
);
|
|
187589
187782
|
integrations.command("oauth-status").argument("<provider-id>").argument("<handoff-id>").action(async (providerId, handoffId) => {
|
|
187590
187783
|
const parsed = oauthProviderSchema.safeParse(providerId);
|
|
187591
|
-
if (!parsed.success) invalidArguments();
|
|
187784
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187592
187785
|
await executeOnline(getIntegrationOAuthHandoffHandler, "curated", {
|
|
187593
187786
|
pathParameters: {
|
|
187594
187787
|
handoffId: uuid3(handoffId),
|
|
@@ -187609,7 +187802,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187609
187802
|
).action(
|
|
187610
187803
|
async (providerId, targetIdOrOptions, possibleOptions) => {
|
|
187611
187804
|
const parsedProvider = issueProviderSchema.safeParse(providerId);
|
|
187612
|
-
if (!parsedProvider.success) invalidArguments();
|
|
187805
|
+
if (!parsedProvider.success) invalidArguments(parsedProvider.error);
|
|
187613
187806
|
const hasTarget = name !== "issue-targets";
|
|
187614
187807
|
const options = hasTarget ? possibleOptions : targetIdOrOptions;
|
|
187615
187808
|
const pathParameters = {
|
|
@@ -187617,7 +187810,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187617
187810
|
};
|
|
187618
187811
|
if (hasTarget) {
|
|
187619
187812
|
const parsedTarget = issueTargetSchema.safeParse(targetIdOrOptions);
|
|
187620
|
-
if (!parsedTarget.success) invalidArguments();
|
|
187813
|
+
if (!parsedTarget.success) invalidArguments(parsedTarget.error);
|
|
187621
187814
|
pathParameters.targetId = parsedTarget.data;
|
|
187622
187815
|
}
|
|
187623
187816
|
await executeOnline(handler2, "curated", {
|
|
@@ -187633,7 +187826,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187633
187826
|
).action(
|
|
187634
187827
|
async (providerId, options) => {
|
|
187635
187828
|
const parsed = issueProviderSchema.safeParse(providerId);
|
|
187636
|
-
if (!parsed.success) invalidArguments();
|
|
187829
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187637
187830
|
await executeOnline(createIntegrationIssueRunHandler, "curated", {
|
|
187638
187831
|
body: await readJsonBody(),
|
|
187639
187832
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -187643,7 +187836,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187643
187836
|
);
|
|
187644
187837
|
integrations.command("issue-status").argument("<provider-id>").argument("<run-id>").action(async (providerId, runId) => {
|
|
187645
187838
|
const parsed = issueProviderSchema.safeParse(providerId);
|
|
187646
|
-
if (!parsed.success) invalidArguments();
|
|
187839
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187647
187840
|
await executeOnline(getIntegrationIssueRunHandler, "curated", {
|
|
187648
187841
|
pathParameters: {
|
|
187649
187842
|
providerId: parsed.data,
|
|
@@ -187769,7 +187962,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187769
187962
|
const traces = program.command("traces").description("trace and span metadata commands");
|
|
187770
187963
|
traces.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--from <timestamp>", "inclusive RFC 3339 start timestamp").option("--to <timestamp>", "inclusive RFC 3339 end timestamp").option("--limit <number>", "page size (1-50)").option("--status <status>", "trace status filter").option("--workflow <name>", "workflow name filter").option("--session <id>", "opaque session ID filter").action(async (options) => {
|
|
187771
187964
|
const parsed = traceListOptionsSchema.safeParse(options);
|
|
187772
|
-
if (!parsed.success) invalidArguments();
|
|
187965
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187773
187966
|
const query = dateRangeQuery(
|
|
187774
187967
|
parsed.data,
|
|
187775
187968
|
parsed.data.session ? opaqueId(parsed.data.session) : void 0
|
|
@@ -187799,7 +187992,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187799
187992
|
);
|
|
187800
187993
|
traces.command("export").argument("<trace-id>").option("--format <format>", "safe export format: json, markdown, or csv").action(async (traceId2, options) => {
|
|
187801
187994
|
const parsed = exportFormat.safeParse(options.format);
|
|
187802
|
-
if (!parsed.success) invalidArguments();
|
|
187995
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187803
187996
|
const query = parsed.data ? { format: parsed.data } : void 0;
|
|
187804
187997
|
await executeOnline(
|
|
187805
187998
|
exportPublicTraceHandler,
|
|
@@ -187833,8 +188026,9 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187833
188026
|
async (rawQuery, options) => {
|
|
187834
188027
|
const parsedQuery = searchQuerySchema.safeParse(rawQuery);
|
|
187835
188028
|
const parsedOptions = searchOptionsSchema.safeParse(options);
|
|
187836
|
-
if (!
|
|
187837
|
-
invalidArguments();
|
|
188029
|
+
if (!parsedQuery.success)
|
|
188030
|
+
invalidArguments(parsedQuery.error, "query");
|
|
188031
|
+
if (!parsedOptions.success) invalidArguments(parsedOptions.error);
|
|
187838
188032
|
const body = dateRangeQuery(
|
|
187839
188033
|
parsedOptions.data,
|
|
187840
188034
|
parsedOptions.data.session ? opaqueId(parsedOptions.data.session) : void 0
|
|
@@ -187852,7 +188046,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187852
188046
|
traces.command("raw-spans").argument("<trace-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").option("--status <status>", "span status filter").option("--type <type>", "span type filter").action(
|
|
187853
188047
|
async (traceId2, options) => {
|
|
187854
188048
|
const parsed = spanListOptionsSchema.safeParse(options);
|
|
187855
|
-
if (!parsed.success) invalidArguments();
|
|
188049
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187856
188050
|
const query = {};
|
|
187857
188051
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
187858
188052
|
if (parsed.data.limit !== void 0)
|
|
@@ -187871,7 +188065,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187871
188065
|
).action(
|
|
187872
188066
|
async (traceId2, spanId, options) => {
|
|
187873
188067
|
const fields = payloadFieldsSchema.safeParse(options.fields);
|
|
187874
|
-
if (!fields.success) invalidArguments();
|
|
188068
|
+
if (!fields.success) invalidArguments(fields.error);
|
|
187875
188069
|
await executeOnline(getPublicSpanPayloadHandler, "curated", {
|
|
187876
188070
|
pathParameters: {
|
|
187877
188071
|
spanId: opaqueId(spanId, 128),
|
|
@@ -187885,7 +188079,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187885
188079
|
spans.command("list").argument("<trace-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").option("--status <status>", "span status filter").option("--type <type>", "span type filter").action(
|
|
187886
188080
|
async (traceId2, options) => {
|
|
187887
188081
|
const parsed = spanListOptionsSchema.safeParse(options);
|
|
187888
|
-
if (!parsed.success) invalidArguments();
|
|
188082
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187889
188083
|
const query = {};
|
|
187890
188084
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
187891
188085
|
if (parsed.data.limit !== void 0)
|
|
@@ -187909,7 +188103,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187909
188103
|
const sessions = program.command("sessions").description("session metadata commands");
|
|
187910
188104
|
sessions.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--from <timestamp>", "inclusive RFC 3339 start timestamp").option("--to <timestamp>", "inclusive RFC 3339 end timestamp").option("--limit <number>", "page size (1-50)").option("--status <status>", "session status filter").option("--workflow <name>", "workflow name filter").action(async (options) => {
|
|
187911
188105
|
const parsed = sessionListOptionsSchema.safeParse(options);
|
|
187912
|
-
if (!parsed.success) invalidArguments();
|
|
188106
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187913
188107
|
await executeOnline(listPublicSessionsHandler, "curated", {
|
|
187914
188108
|
query: dateRangeQuery(parsed.data)
|
|
187915
188109
|
});
|
|
@@ -187917,7 +188111,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187917
188111
|
sessions.command("get").argument("<session-id>").option("--cursor <cursor>", "opaque trace cursor from the previous page").option("--limit <number>", "trace page size (1-50)").action(
|
|
187918
188112
|
async (sessionId, options) => {
|
|
187919
188113
|
const parsed = pageOptionsSchema2.safeParse(options);
|
|
187920
|
-
if (!parsed.success) invalidArguments();
|
|
188114
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187921
188115
|
const query = {};
|
|
187922
188116
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
187923
188117
|
if (parsed.data.limit !== void 0)
|
|
@@ -187930,7 +188124,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187930
188124
|
);
|
|
187931
188125
|
sessions.command("export").argument("<session-id>").option("--format <format>", "safe export format: json, markdown, or csv").action(async (sessionId, options) => {
|
|
187932
188126
|
const parsed = exportFormat.safeParse(options.format);
|
|
187933
|
-
if (!parsed.success) invalidArguments();
|
|
188127
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187934
188128
|
const query = parsed.data ? { format: parsed.data } : void 0;
|
|
187935
188129
|
await executeOnline(
|
|
187936
188130
|
exportPublicSessionHandler,
|
|
@@ -188026,7 +188220,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188026
188220
|
const organizations = program.command("orgs").description("organization discovery commands");
|
|
188027
188221
|
organizations.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(async (options) => {
|
|
188028
188222
|
const parsed = organizationListOptionsSchema.safeParse(options);
|
|
188029
|
-
if (!parsed.success) invalidArguments();
|
|
188223
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188030
188224
|
const query = {};
|
|
188031
188225
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
188032
188226
|
if (parsed.data.limit !== void 0)
|
|
@@ -188042,7 +188236,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188042
188236
|
audit.command("list").argument("<organization-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188043
188237
|
async (organizationId, options) => {
|
|
188044
188238
|
const parsed = organizationAccessListOptionsSchema.safeParse(options);
|
|
188045
|
-
if (!parsed.success) invalidArguments();
|
|
188239
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188046
188240
|
await executeOnline(listAuditLifecycleEventsHandler, "curated", {
|
|
188047
188241
|
pathParameters: { organizationId: uuid3(organizationId) },
|
|
188048
188242
|
query: pageQuery(parsed.data)
|
|
@@ -188052,7 +188246,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188052
188246
|
audit.command("export").argument("<organization-id>").requiredOption("--from <timestamp>", "inclusive ISO 8601 start timestamp").requiredOption("--to <timestamp>", "exclusive ISO 8601 end timestamp").option("--limit <number>", "maximum rows (1-5000)").action(
|
|
188053
188247
|
async (organizationId, options) => {
|
|
188054
188248
|
const parsed = auditExportOptionsSchema.safeParse(options);
|
|
188055
|
-
if (!parsed.success) invalidArguments();
|
|
188249
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188056
188250
|
const query = {
|
|
188057
188251
|
from: parsed.data.from,
|
|
188058
188252
|
to: parsed.data.to
|
|
@@ -188070,7 +188264,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188070
188264
|
members.command("list").argument("<organization-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188071
188265
|
async (organizationId, options) => {
|
|
188072
188266
|
const parsed = organizationAccessListOptionsSchema.safeParse(options);
|
|
188073
|
-
if (!parsed.success) invalidArguments();
|
|
188267
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188074
188268
|
await executeOnline(listOrganizationMembersHandler, "curated", {
|
|
188075
188269
|
pathParameters: { organizationId: uuid3(organizationId) },
|
|
188076
188270
|
query: pageQuery(parsed.data)
|
|
@@ -188097,7 +188291,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188097
188291
|
).action(
|
|
188098
188292
|
async (organizationId, userId, options) => {
|
|
188099
188293
|
const parsed = memberRoleUpdateOptionsSchema.safeParse(options);
|
|
188100
|
-
if (!parsed.success) invalidArguments();
|
|
188294
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188101
188295
|
await executeOnline(updateOrganizationMemberRoleHandler, "curated", {
|
|
188102
188296
|
body: {
|
|
188103
188297
|
expectedRole: parsed.data.expectedRole,
|
|
@@ -188127,7 +188321,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188127
188321
|
).action(
|
|
188128
188322
|
async (organizationId, userId, options) => {
|
|
188129
188323
|
const parsed = memberRemoveOptionsSchema.safeParse(options);
|
|
188130
|
-
if (!parsed.success) invalidArguments();
|
|
188324
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188131
188325
|
const membershipId = postgresUuid(parsed.data.membershipId);
|
|
188132
188326
|
if (postgresUuid(parsed.data.confirm) !== membershipId) {
|
|
188133
188327
|
invalidArguments();
|
|
@@ -188146,7 +188340,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188146
188340
|
invitations.command("list").argument("<organization-id>").option("--state <state>", "all, pending, or expired").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188147
188341
|
async (organizationId, options) => {
|
|
188148
188342
|
const parsed = invitationListOptionsSchema.safeParse(options);
|
|
188149
|
-
if (!parsed.success) invalidArguments();
|
|
188343
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188150
188344
|
const query = {};
|
|
188151
188345
|
if (parsed.data.state) query.state = parsed.data.state;
|
|
188152
188346
|
Object.assign(query, pageQuery(parsed.data));
|
|
@@ -188165,7 +188359,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188165
188359
|
).action(
|
|
188166
188360
|
async (organizationId, options) => {
|
|
188167
188361
|
const parsed = invitationCreateOptionsSchema.safeParse(options);
|
|
188168
|
-
if (!parsed.success) invalidArguments();
|
|
188362
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188169
188363
|
await executeOnline(createOrganizationInvitationHandler, "curated", {
|
|
188170
188364
|
body: { email: parsed.data.email, role: parsed.data.role },
|
|
188171
188365
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -188179,7 +188373,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188179
188373
|
).action(
|
|
188180
188374
|
async (organizationId, invitationId, options) => {
|
|
188181
188375
|
const parsed = invitationMutationOptionsSchema.safeParse(options);
|
|
188182
|
-
if (!parsed.success) invalidArguments();
|
|
188376
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188183
188377
|
await executeOnline(resendOrganizationInvitationHandler, "curated", {
|
|
188184
188378
|
body: { email: parsed.data.email },
|
|
188185
188379
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -188199,7 +188393,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188199
188393
|
).action(
|
|
188200
188394
|
async (organizationId, invitationIdValue, options) => {
|
|
188201
188395
|
const parsed = invitationRevokeOptionsSchema.safeParse(options);
|
|
188202
|
-
if (!parsed.success) invalidArguments();
|
|
188396
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188203
188397
|
const invitationId = uuid3(invitationIdValue);
|
|
188204
188398
|
if (uuid3(parsed.data.confirm) !== invitationId) invalidArguments();
|
|
188205
188399
|
await executeOnline(revokeOrganizationInvitationHandler, "curated", {
|
|
@@ -188221,11 +188415,11 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188221
188415
|
).action(
|
|
188222
188416
|
async (options) => {
|
|
188223
188417
|
const parsed = invitationAcceptOptionsSchema.safeParse(options);
|
|
188224
|
-
if (!parsed.success) invalidArguments();
|
|
188418
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188225
188419
|
const tokenResult = invitationTokenSchema.safeParse(
|
|
188226
188420
|
(await readInvitationToken()).replace(/\r?\n$/, "")
|
|
188227
188421
|
);
|
|
188228
|
-
if (!tokenResult.success) invalidArguments();
|
|
188422
|
+
if (!tokenResult.success) invalidArguments(tokenResult.error);
|
|
188229
188423
|
await executeOnline(acceptOrganizationInvitationHandler, "curated", {
|
|
188230
188424
|
body: { token: tokenResult.data },
|
|
188231
188425
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey)
|
|
@@ -188235,7 +188429,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188235
188429
|
const roles = organizations.command("roles").description("organization role assignment options");
|
|
188236
188430
|
roles.command("list").argument("<organization-id>").requiredOption("--action <action>", "invitation or member-role-change").action(async (organizationId, options) => {
|
|
188237
188431
|
const parsed = roleListOptionsSchema.safeParse(options);
|
|
188238
|
-
if (!parsed.success) invalidArguments();
|
|
188432
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188239
188433
|
await executeOnline(listOrganizationRolesHandler, "curated", {
|
|
188240
188434
|
pathParameters: { organizationId: uuid3(organizationId) },
|
|
188241
188435
|
query: { action: parsed.data.action }
|
|
@@ -188356,7 +188550,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188356
188550
|
).action(
|
|
188357
188551
|
async (options) => {
|
|
188358
188552
|
const parsed = projectCreateOptionsSchema.safeParse(options);
|
|
188359
|
-
if (!parsed.success) invalidArguments();
|
|
188553
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188360
188554
|
await executeOnline(createProjectHandler, "curated", {
|
|
188361
188555
|
body: {
|
|
188362
188556
|
name: parsed.data.name,
|
|
@@ -188373,7 +188567,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188373
188567
|
).action(
|
|
188374
188568
|
async (options) => {
|
|
188375
188569
|
const parsed = projectUpdateOptionsSchema.safeParse(options);
|
|
188376
|
-
if (!parsed.success) invalidArguments();
|
|
188570
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188377
188571
|
await executeOnline(updateProjectHandler, "curated", {
|
|
188378
188572
|
body: {
|
|
188379
188573
|
...parsed.data.name === void 0 ? {} : { name: parsed.data.name },
|
|
@@ -188386,7 +188580,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188386
188580
|
projects.command("list").option("--organization <uuid>", "filter by organization UUID").option("--include-archived", "include archived projects").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188387
188581
|
async (options) => {
|
|
188388
188582
|
const parsed = projectListOptionsSchema.safeParse(options);
|
|
188389
|
-
if (!parsed.success) invalidArguments();
|
|
188583
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188390
188584
|
const query = {};
|
|
188391
188585
|
if (parsed.data.organization) {
|
|
188392
188586
|
query.organizationId = parsed.data.organization;
|
|
@@ -188416,7 +188610,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188416
188610
|
"schedule archive-state deletion; recovery does not replay accepted telemetry; not activation-ready until durable accepted-event replay is implemented"
|
|
188417
188611
|
).requiredOption("--project-id <uuid>", "exact project UUID").requiredOption("--project-name <name>", "exact current project name").requiredOption("--digest <sha256>", "preview digest").requiredOption("--confirm <uuid>", "repeat the exact project UUID").option("--idempotency-key <key>", "stable UUID for retrying this schedule").action(async (options) => {
|
|
188418
188612
|
const parsed = projectDeletionScheduleOptionsSchema.safeParse(options);
|
|
188419
|
-
if (!parsed.success) invalidArguments();
|
|
188613
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188420
188614
|
await executeOnline(scheduleProjectDeletionHandler, "curated", {
|
|
188421
188615
|
body: {
|
|
188422
188616
|
digest: parsed.data.digest,
|
|
@@ -188431,7 +188625,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188431
188625
|
"restore archive state only; recovery does not replay accepted telemetry"
|
|
188432
188626
|
).requiredOption("--project-id <uuid>", "exact project UUID").requiredOption("--run-id <uuid>", "deletion run UUID").requiredOption("--confirm <uuid>", "repeat the exact project UUID").option("--idempotency-key <key>", "stable UUID for retrying recovery").action(async (options) => {
|
|
188433
188627
|
const parsed = projectDeletionRecoveryOptionsSchema.safeParse(options);
|
|
188434
|
-
if (!parsed.success) invalidArguments();
|
|
188628
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188435
188629
|
await executeOnline(recoverProjectDeletionHandler, "curated", {
|
|
188436
188630
|
body: {
|
|
188437
188631
|
projectId: parsed.data.projectId,
|
|
@@ -188522,7 +188716,7 @@ async function createPromptFromStdin(input) {
|
|
|
188522
188716
|
}
|
|
188523
188717
|
async function promptBodyFromOptions(options, readPromptContent) {
|
|
188524
188718
|
const name = z43.string().trim().min(1).max(255).safeParse(options.name);
|
|
188525
|
-
if (!name.success) invalidArguments();
|
|
188719
|
+
if (!name.success) invalidArguments(name.error);
|
|
188526
188720
|
if (options.content !== void 0 && options.contentStdin === true) {
|
|
188527
188721
|
invalidArguments();
|
|
188528
188722
|
}
|
|
@@ -188567,7 +188761,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188567
188761
|
prompts.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--label <label>", "active label filter").option("--limit <number>", "page size (1-100)").option("--name <name>", "exact prompt name filter").option("--source <source>", "exact prompt source filter").action(
|
|
188568
188762
|
async (options) => {
|
|
188569
188763
|
const parsed = listOptionsSchema6.safeParse(options);
|
|
188570
|
-
if (!parsed.success) invalidArguments();
|
|
188764
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188571
188765
|
await executeOnline(listPromptsHandler, "curated", {
|
|
188572
188766
|
query: {
|
|
188573
188767
|
...parsed.data.label ? { label: parsed.data.label } : {},
|
|
@@ -188598,7 +188792,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188598
188792
|
"read one bounded prompt label assignment request from stdin"
|
|
188599
188793
|
).option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(async (options) => {
|
|
188600
188794
|
const parsed = bulkLabelRequestSchema.safeParse(await readBulkRequest());
|
|
188601
|
-
if (!parsed.success) invalidArguments();
|
|
188795
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188602
188796
|
await executeOnline(bulkMovePromptLabelsHandler, "curated", {
|
|
188603
188797
|
body: parsed.data,
|
|
188604
188798
|
idempotencyKey: mutationKey(options.idempotencyKey)
|
|
@@ -188612,7 +188806,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188612
188806
|
prompts.command("history").argument("<prompt-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188613
188807
|
async (promptId, options) => {
|
|
188614
188808
|
const parsed = pageOptionsSchema3.safeParse(options);
|
|
188615
|
-
if (!parsed.success) invalidArguments();
|
|
188809
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188616
188810
|
await executeOnline(listPromptHistoryHandler, "curated", {
|
|
188617
188811
|
pathParameters: { promptId: uuid3(promptId) },
|
|
188618
188812
|
query: pageQuery2(parsed.data)
|
|
@@ -188638,7 +188832,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188638
188832
|
prompts.command("changelog").argument("<prompt-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").action(
|
|
188639
188833
|
async (promptId, options) => {
|
|
188640
188834
|
const parsed = collaborationPageOptionsSchema.safeParse(options);
|
|
188641
|
-
if (!parsed.success) invalidArguments();
|
|
188835
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188642
188836
|
await executeOnline(listPromptChangelogHandler, "curated", {
|
|
188643
188837
|
pathParameters: { promptId: uuid3(promptId) },
|
|
188644
188838
|
query: pageQuery2(parsed.data)
|
|
@@ -188648,7 +188842,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188648
188842
|
prompts.command("comments").argument("<prompt-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-20)").action(
|
|
188649
188843
|
async (promptId, options) => {
|
|
188650
188844
|
const parsed = commentPageOptionsSchema.safeParse(options);
|
|
188651
|
-
if (!parsed.success) invalidArguments();
|
|
188845
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188652
188846
|
await executeOnline(listPromptCommentsHandler, "curated", {
|
|
188653
188847
|
pathParameters: { promptId: uuid3(promptId) },
|
|
188654
188848
|
query: pageQuery2(parsed.data)
|
|
@@ -188720,7 +188914,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188720
188914
|
prompts.command("label-remove").description("remove one active label from a prompt version").argument("<prompt-id>").argument("<label>").option("--idempotency-key <key>").action(
|
|
188721
188915
|
async (promptId, label, options) => {
|
|
188722
188916
|
const parsedLabel = promptLabelSchema.safeParse(label);
|
|
188723
|
-
if (!parsedLabel.success) invalidArguments();
|
|
188917
|
+
if (!parsedLabel.success) invalidArguments(parsedLabel.error);
|
|
188724
188918
|
await executeOnline(removePromptLabelHandler, "curated", {
|
|
188725
188919
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
188726
188920
|
pathParameters: {
|
|
@@ -188862,7 +189056,7 @@ function addAccountPageCommand(parent, handler2, executeOnline) {
|
|
|
188862
189056
|
parent.command("list").argument("<service-account-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188863
189057
|
async (serviceAccountId, options) => {
|
|
188864
189058
|
const parsed = listOptionsSchema7.safeParse(options);
|
|
188865
|
-
if (!parsed.success) invalidArguments();
|
|
189059
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188866
189060
|
await executeOnline(handler2, "curated", {
|
|
188867
189061
|
pathParameters: { serviceAccountId: uuid3(serviceAccountId) },
|
|
188868
189062
|
query: pageQuery3(parsed.data)
|
|
@@ -188880,7 +189074,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188880
189074
|
).option("--description <description>").option("--idempotency-key <key>").action(
|
|
188881
189075
|
async (organizationId, options) => {
|
|
188882
189076
|
const parsed = createOptionsSchema.safeParse(options);
|
|
188883
|
-
if (!parsed.success) invalidArguments();
|
|
189077
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188884
189078
|
const { binding, description, idempotencyKey, name } = parsed.data;
|
|
188885
189079
|
await executeOnline(createServiceAccountHandler, "curated", {
|
|
188886
189080
|
body: {
|
|
@@ -188896,7 +189090,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188896
189090
|
serviceAccounts.command("list").argument("<organization-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188897
189091
|
async (organizationId, options) => {
|
|
188898
189092
|
const parsed = listOptionsSchema7.safeParse(options);
|
|
188899
|
-
if (!parsed.success) invalidArguments();
|
|
189093
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188900
189094
|
await executeOnline(listServiceAccountsHandler, "curated", {
|
|
188901
189095
|
pathParameters: { organizationId: uuid3(organizationId) },
|
|
188902
189096
|
query: pageQuery3(parsed.data)
|
|
@@ -188911,7 +189105,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188911
189105
|
serviceAccounts.command("update").argument("<service-account-id>").option("--name <name>").option("--description <description>").option("--idempotency-key <key>").action(
|
|
188912
189106
|
async (serviceAccountId, options) => {
|
|
188913
189107
|
const parsed = updateOptionsSchema.safeParse(options);
|
|
188914
|
-
if (!parsed.success) invalidArguments();
|
|
189108
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188915
189109
|
const { idempotencyKey, ...body } = parsed.data;
|
|
188916
189110
|
await executeOnline(updateServiceAccountHandler, "curated", {
|
|
188917
189111
|
body,
|
|
@@ -188927,7 +189121,8 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188927
189121
|
async (serviceAccountId, options) => {
|
|
188928
189122
|
const parsedServiceAccountId = uuid3(serviceAccountId);
|
|
188929
189123
|
const parsed = destructiveReasonOptionsSchema.safeParse(options);
|
|
188930
|
-
if (!parsed.success
|
|
189124
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189125
|
+
if (parsed.data.confirm !== serviceAccountId) {
|
|
188931
189126
|
invalidArguments();
|
|
188932
189127
|
}
|
|
188933
189128
|
await executeOnline(disableServiceAccountHandler, "curated", {
|
|
@@ -188946,7 +189141,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188946
189141
|
bindings.command("add").argument("<service-account-id>").requiredOption("--project-id <project-id>").requiredOption("--role <role>").option("--idempotency-key <key>").action(
|
|
188947
189142
|
async (serviceAccountId, options) => {
|
|
188948
189143
|
const parsed = bindingCreateOptionsSchema.safeParse(options);
|
|
188949
|
-
if (!parsed.success) invalidArguments();
|
|
189144
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188950
189145
|
await executeOnline(createServiceAccountBindingHandler, "curated", {
|
|
188951
189146
|
body: {
|
|
188952
189147
|
projectId: uuid3(parsed.data.projectId),
|
|
@@ -188960,7 +189155,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188960
189155
|
bindings.command("set-role").argument("<service-account-id>").argument("<binding-id>").requiredOption("--role <role>").option("--idempotency-key <key>").action(
|
|
188961
189156
|
async (serviceAccountId, bindingId, options) => {
|
|
188962
189157
|
const parsed = bindingRoleOptionsSchema.safeParse(options);
|
|
188963
|
-
if (!parsed.success) invalidArguments();
|
|
189158
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188964
189159
|
await executeOnline(updateServiceAccountBindingHandler, "curated", {
|
|
188965
189160
|
body: { role: parsed.data.role },
|
|
188966
189161
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -188977,7 +189172,8 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188977
189172
|
).option("--idempotency-key <key>").action(
|
|
188978
189173
|
async (serviceAccountId, bindingId, options) => {
|
|
188979
189174
|
const parsed = bindingRemoveOptionsSchema.safeParse(options);
|
|
188980
|
-
if (!parsed.success
|
|
189175
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189176
|
+
if (parsed.data.confirm !== bindingId) {
|
|
188981
189177
|
invalidArguments();
|
|
188982
189178
|
}
|
|
188983
189179
|
await executeOnline(deleteServiceAccountBindingHandler, "curated", {
|
|
@@ -189008,7 +189204,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
189008
189204
|
parsedTokenId
|
|
189009
189205
|
);
|
|
189010
189206
|
const parsed = reasonOptionsSchema.safeParse(reasonOptions);
|
|
189011
|
-
if (!parsed.success) invalidArguments();
|
|
189207
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189012
189208
|
await executeOnline(revokeServiceAccountTokenHandler, "curated", {
|
|
189013
189209
|
body: parsed.data.reason ? { reason: parsed.data.reason } : {},
|
|
189014
189210
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -189023,7 +189219,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
189023
189219
|
).option("--expires-in-days <days>").option("--idempotency-key <key>").action(
|
|
189024
189220
|
async (serviceAccountId, options) => {
|
|
189025
189221
|
const parsed = mintOptionsSchema.safeParse(options);
|
|
189026
|
-
if (!parsed.success) invalidArguments();
|
|
189222
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189027
189223
|
const body = {
|
|
189028
189224
|
...parsed.data.expiresInDays === void 0 ? {} : { expiresInDays: parsed.data.expiresInDays },
|
|
189029
189225
|
name: parsed.data.name,
|
|
@@ -189062,7 +189258,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
189062
189258
|
[]
|
|
189063
189259
|
).option("--expires-in-days <days>").option("--idempotency-key <key>").action(async (tokenId, options) => {
|
|
189064
189260
|
const parsed = mintOptionsSchema.safeParse(options);
|
|
189065
|
-
if (!parsed.success) invalidArguments();
|
|
189261
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189066
189262
|
const body = {
|
|
189067
189263
|
...parsed.data.expiresInDays === void 0 ? {} : { expiresInDays: parsed.data.expiresInDays },
|
|
189068
189264
|
name: parsed.data.name,
|
|
@@ -189204,7 +189400,7 @@ function registerSharingCommands(program, executeOnline, renderSecret, resolvedP
|
|
|
189204
189400
|
const guestLinks = program.command("guest-links").description("redacted guest-link metadata");
|
|
189205
189401
|
guestLinks.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").action(async (options) => {
|
|
189206
189402
|
const parsed = listOptions2.safeParse(options);
|
|
189207
|
-
if (!parsed.success) invalidArguments();
|
|
189403
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189208
189404
|
const query = {};
|
|
189209
189405
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
189210
189406
|
if (parsed.data.limit !== void 0)
|
|
@@ -189217,7 +189413,7 @@ function registerSharingCommands(program, executeOnline, renderSecret, resolvedP
|
|
|
189217
189413
|
const parsedRecipient = recipientEmail.safeParse(
|
|
189218
189414
|
options.recipientEmail
|
|
189219
189415
|
);
|
|
189220
|
-
if (!parsedRecipient.success) invalidArguments();
|
|
189416
|
+
if (!parsedRecipient.success) invalidArguments(parsedRecipient.error);
|
|
189221
189417
|
const idempotencyKey = mutationKey(options.idempotencyKey);
|
|
189222
189418
|
const replayKey = randomBytes3(32).toString("base64url");
|
|
189223
189419
|
const response = await executeOnline(mintGuestLinkHandler, "none", {
|
|
@@ -189248,7 +189444,7 @@ function registerSharingCommands(program, executeOnline, renderSecret, resolvedP
|
|
|
189248
189444
|
"read one bounded guest-link bulk mint request from stdin"
|
|
189249
189445
|
).option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(async (options) => {
|
|
189250
189446
|
const parsed = bulkMintRequestSchema.safeParse(await readBulkRequest());
|
|
189251
|
-
if (!parsed.success) invalidArguments();
|
|
189447
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189252
189448
|
const idempotencyKey = mutationKey(options.idempotencyKey);
|
|
189253
189449
|
const replayKey = randomBytes3(32).toString("base64url");
|
|
189254
189450
|
const response = await executeOnline(bulkMintGuestLinksHandler, "none", {
|
|
@@ -189275,7 +189471,7 @@ function registerSharingCommands(program, executeOnline, renderSecret, resolvedP
|
|
|
189275
189471
|
"read one bounded guest-link bulk revoke request from stdin"
|
|
189276
189472
|
).option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(async (options) => {
|
|
189277
189473
|
const parsed = bulkRevokeRequestSchema.safeParse(await readBulkRequest());
|
|
189278
|
-
if (!parsed.success) invalidArguments();
|
|
189474
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189279
189475
|
await executeOnline(bulkRevokeGuestLinksHandler, "curated", {
|
|
189280
189476
|
body: parsed.data,
|
|
189281
189477
|
idempotencyKey: mutationKey(options.idempotencyKey)
|
|
@@ -189367,7 +189563,7 @@ function attachSkillMutationCommands(skills, executeOnline, deleteHandler, impor
|
|
|
189367
189563
|
idempotencyKey: z47.string().optional(),
|
|
189368
189564
|
name: z47.string().min(1).max(64).regex(/^[a-z0-9-]+$/).optional()
|
|
189369
189565
|
}).strict().safeParse(options);
|
|
189370
|
-
if (!parsed.success) invalidArguments();
|
|
189566
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189371
189567
|
await executeOnline(importHandler, "curated", {
|
|
189372
189568
|
body: {
|
|
189373
189569
|
...parsed.data.description === void 0 ? {} : { description: parsed.data.description },
|
|
@@ -189414,7 +189610,7 @@ function registerSkillCommands(program, executeOnline, readSkillContent, readUpd
|
|
|
189414
189610
|
).requiredOption("--ref <sha>", "full immutable 40-character commit SHA").requiredOption("--path <path>", "relative path ending in SKILL.md").option("--idempotency-key <key>", "stable UUID for retrying this import").action(
|
|
189415
189611
|
async (options) => {
|
|
189416
189612
|
const parsed = githubImportOptionsSchema.safeParse(options);
|
|
189417
|
-
if (!parsed.success) invalidArguments();
|
|
189613
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189418
189614
|
await executeOnline(importGithubSkillHandler, "curated", {
|
|
189419
189615
|
body: {
|
|
189420
189616
|
path: parsed.data.path,
|
|
@@ -189429,7 +189625,7 @@ function registerSkillCommands(program, executeOnline, readSkillContent, readUpd
|
|
|
189429
189625
|
skills.command("list").option("--include-archived", "include archived evaluator skills").option("--limit <number>", "page size (1-100)").option("--cursor <cursor>", "opaque cursor returned by the previous page").action(
|
|
189430
189626
|
async (options) => {
|
|
189431
189627
|
const parsed = listOptionsSchema8.safeParse(options);
|
|
189432
|
-
if (!parsed.success) invalidArguments();
|
|
189628
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189433
189629
|
const query = {};
|
|
189434
189630
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
189435
189631
|
if (parsed.data.includeArchived) query.includeArchived = "true";
|
|
@@ -189482,7 +189678,7 @@ function registerToolingCommands(program, executeOnline, readJsonBody = async ()
|
|
|
189482
189678
|
var limitSchema = z48.coerce.number().int().min(1).max(100);
|
|
189483
189679
|
function limit(value) {
|
|
189484
189680
|
const parsed = limitSchema.safeParse(value);
|
|
189485
|
-
if (!parsed.success) invalidArguments();
|
|
189681
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189486
189682
|
return parsed.data;
|
|
189487
189683
|
}
|
|
189488
189684
|
function registerConnectionCommands(command, executeOnline, readJsonBody, handlers) {
|
|
@@ -189622,7 +189818,7 @@ function registerWebhookCommands(program, executeOnline, readJsonBody = async ()
|
|
|
189622
189818
|
webhooks.command("deliveries").argument("<webhook-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
189623
189819
|
async (webhookId, options) => {
|
|
189624
189820
|
const parsed = deliveryListOptionsSchema.safeParse(options);
|
|
189625
|
-
if (!parsed.success) invalidArguments();
|
|
189821
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189626
189822
|
const query = {};
|
|
189627
189823
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
189628
189824
|
if (parsed.data.limit !== void 0)
|
|
@@ -189825,6 +190021,17 @@ var PUBLIC_EVALUATOR_RUN_REQUEST_MAX_BYTES = 64 * 1024;
|
|
|
189825
190021
|
var PUBLIC_DETECTION_PREVIEW_REQUEST_MAX_BYTES = 320 * 1024;
|
|
189826
190022
|
var PUBLIC_DETECTION_COMPUTE_REQUEST_MAX_BYTES = 64 * 1024;
|
|
189827
190023
|
|
|
190024
|
+
// src/usage-error.ts
|
|
190025
|
+
function commanderUsageError(error) {
|
|
190026
|
+
const option = error.message.match(/--[a-z][a-z0-9-]*/)?.[0];
|
|
190027
|
+
const detail = error.code === "commander.missingMandatoryOptionValue" && option ? `Missing required option ${option}. Run this command with --help for usage.` : "Invalid command arguments. Run this command with --help for usage.";
|
|
190028
|
+
return new CliError({
|
|
190029
|
+
code: "INVALID_ARGUMENTS",
|
|
190030
|
+
detail,
|
|
190031
|
+
exitCode: ExitCode.Usage
|
|
190032
|
+
});
|
|
190033
|
+
}
|
|
190034
|
+
|
|
189828
190035
|
// src/cli.ts
|
|
189829
190036
|
var MAX_GENERIC_BODY_BYTES = 512 * 1024;
|
|
189830
190037
|
var MAX_COMMENT_CONTENT_BYTES = 1e4;
|
|
@@ -190495,14 +190702,10 @@ async function runCli(argv, dependencies) {
|
|
|
190495
190702
|
if (error.code === "commander.helpDisplayed" || error.code === "commander.version") {
|
|
190496
190703
|
return ExitCode.Success;
|
|
190497
190704
|
}
|
|
190498
|
-
const cliError2 =
|
|
190499
|
-
code: "INVALID_ARGUMENTS",
|
|
190500
|
-
exitCode: ExitCode.Usage
|
|
190501
|
-
});
|
|
190705
|
+
const cliError2 = commanderUsageError(error);
|
|
190502
190706
|
if (machineDiagnostics)
|
|
190503
190707
|
writeJson(dependencies.stderr, diagnostic(cliError2));
|
|
190504
|
-
else dependencies.stderr.write(
|
|
190505
|
-
`);
|
|
190708
|
+
else dependencies.stderr.write(humanDiagnostic(cliError2));
|
|
190506
190709
|
return cliError2.exitCode;
|
|
190507
190710
|
}
|
|
190508
190711
|
const cliError = asCliError(error);
|