@highflame/policy 2.2.8 → 2.2.10
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/_schemas/ai_gateway/context.json +120 -0
- package/_schemas/guardrails/context.json +144 -0
- package/dist/ai_gateway-context.gen.d.ts +5 -1
- package/dist/ai_gateway-context.gen.js +8 -0
- package/dist/guardrails-context.gen.d.ts +5 -1
- package/dist/guardrails-context.gen.js +8 -0
- package/dist/guardrails-detectors.gen.js +2 -2
- package/dist/service-schemas.gen.js +49 -5
- package/package.json +1 -1
|
@@ -348,6 +348,30 @@
|
|
|
348
348
|
"type": "number",
|
|
349
349
|
"required": false,
|
|
350
350
|
"description": "Max secret score across session turns"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"key": "rpm_remaining_pct",
|
|
354
|
+
"type": "number",
|
|
355
|
+
"required": false,
|
|
356
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"key": "rpm_exceeded",
|
|
360
|
+
"type": "boolean",
|
|
361
|
+
"required": false,
|
|
362
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"key": "tpm_remaining_pct",
|
|
366
|
+
"type": "number",
|
|
367
|
+
"required": false,
|
|
368
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"key": "tpm_exceeded",
|
|
372
|
+
"type": "boolean",
|
|
373
|
+
"required": false,
|
|
374
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
351
375
|
}
|
|
352
376
|
]
|
|
353
377
|
},
|
|
@@ -570,6 +594,30 @@
|
|
|
570
594
|
"type": "number",
|
|
571
595
|
"required": false,
|
|
572
596
|
"description": "Max secret score across session turns"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"key": "rpm_remaining_pct",
|
|
600
|
+
"type": "number",
|
|
601
|
+
"required": false,
|
|
602
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"key": "rpm_exceeded",
|
|
606
|
+
"type": "boolean",
|
|
607
|
+
"required": false,
|
|
608
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"key": "tpm_remaining_pct",
|
|
612
|
+
"type": "number",
|
|
613
|
+
"required": false,
|
|
614
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"key": "tpm_exceeded",
|
|
618
|
+
"type": "boolean",
|
|
619
|
+
"required": false,
|
|
620
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
573
621
|
}
|
|
574
622
|
]
|
|
575
623
|
},
|
|
@@ -822,6 +870,30 @@
|
|
|
822
870
|
"type": "number",
|
|
823
871
|
"required": false,
|
|
824
872
|
"description": "Max secret score across session turns"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"key": "rpm_remaining_pct",
|
|
876
|
+
"type": "number",
|
|
877
|
+
"required": false,
|
|
878
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"key": "rpm_exceeded",
|
|
882
|
+
"type": "boolean",
|
|
883
|
+
"required": false,
|
|
884
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"key": "tpm_remaining_pct",
|
|
888
|
+
"type": "number",
|
|
889
|
+
"required": false,
|
|
890
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"key": "tpm_exceeded",
|
|
894
|
+
"type": "boolean",
|
|
895
|
+
"required": false,
|
|
896
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
825
897
|
}
|
|
826
898
|
]
|
|
827
899
|
},
|
|
@@ -1002,6 +1074,30 @@
|
|
|
1002
1074
|
"type": "number",
|
|
1003
1075
|
"required": false,
|
|
1004
1076
|
"description": "Max secret score across session turns"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"key": "rpm_remaining_pct",
|
|
1080
|
+
"type": "number",
|
|
1081
|
+
"required": false,
|
|
1082
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"key": "rpm_exceeded",
|
|
1086
|
+
"type": "boolean",
|
|
1087
|
+
"required": false,
|
|
1088
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"key": "tpm_remaining_pct",
|
|
1092
|
+
"type": "number",
|
|
1093
|
+
"required": false,
|
|
1094
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"key": "tpm_exceeded",
|
|
1098
|
+
"type": "boolean",
|
|
1099
|
+
"required": false,
|
|
1100
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
1005
1101
|
}
|
|
1006
1102
|
]
|
|
1007
1103
|
},
|
|
@@ -1182,6 +1278,30 @@
|
|
|
1182
1278
|
"type": "number",
|
|
1183
1279
|
"required": false,
|
|
1184
1280
|
"description": "Max secret score across session turns"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"key": "rpm_remaining_pct",
|
|
1284
|
+
"type": "number",
|
|
1285
|
+
"required": false,
|
|
1286
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"key": "rpm_exceeded",
|
|
1290
|
+
"type": "boolean",
|
|
1291
|
+
"required": false,
|
|
1292
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"key": "tpm_remaining_pct",
|
|
1296
|
+
"type": "number",
|
|
1297
|
+
"required": false,
|
|
1298
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"key": "tpm_exceeded",
|
|
1302
|
+
"type": "boolean",
|
|
1303
|
+
"required": false,
|
|
1304
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
1185
1305
|
}
|
|
1186
1306
|
]
|
|
1187
1307
|
}
|
|
@@ -433,6 +433,30 @@
|
|
|
433
433
|
"required": false,
|
|
434
434
|
"description": "Whether multi-turn injection patterns were detected (attack spread across multiple conversation turns)"
|
|
435
435
|
},
|
|
436
|
+
{
|
|
437
|
+
"key": "rpm_remaining_pct",
|
|
438
|
+
"type": "number",
|
|
439
|
+
"required": false,
|
|
440
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"key": "rpm_exceeded",
|
|
444
|
+
"type": "boolean",
|
|
445
|
+
"required": false,
|
|
446
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"key": "tpm_remaining_pct",
|
|
450
|
+
"type": "number",
|
|
451
|
+
"required": false,
|
|
452
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"key": "tpm_exceeded",
|
|
456
|
+
"type": "boolean",
|
|
457
|
+
"required": false,
|
|
458
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
459
|
+
},
|
|
436
460
|
{
|
|
437
461
|
"key": "session_pii_detected",
|
|
438
462
|
"type": "boolean",
|
|
@@ -703,6 +727,30 @@
|
|
|
703
727
|
"required": false,
|
|
704
728
|
"description": "Whether the token budget has been exceeded. Use this to enforce cost controls on agentic sessions"
|
|
705
729
|
},
|
|
730
|
+
{
|
|
731
|
+
"key": "rpm_remaining_pct",
|
|
732
|
+
"type": "number",
|
|
733
|
+
"required": false,
|
|
734
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"key": "rpm_exceeded",
|
|
738
|
+
"type": "boolean",
|
|
739
|
+
"required": false,
|
|
740
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"key": "tpm_remaining_pct",
|
|
744
|
+
"type": "number",
|
|
745
|
+
"required": false,
|
|
746
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"key": "tpm_exceeded",
|
|
750
|
+
"type": "boolean",
|
|
751
|
+
"required": false,
|
|
752
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
753
|
+
},
|
|
706
754
|
{
|
|
707
755
|
"key": "content_topics",
|
|
708
756
|
"type": "array",
|
|
@@ -973,6 +1021,30 @@
|
|
|
973
1021
|
"required": false,
|
|
974
1022
|
"description": "Whether multi-turn injection patterns were detected across tool calls in the session"
|
|
975
1023
|
},
|
|
1024
|
+
{
|
|
1025
|
+
"key": "rpm_remaining_pct",
|
|
1026
|
+
"type": "number",
|
|
1027
|
+
"required": false,
|
|
1028
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"key": "rpm_exceeded",
|
|
1032
|
+
"type": "boolean",
|
|
1033
|
+
"required": false,
|
|
1034
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"key": "tpm_remaining_pct",
|
|
1038
|
+
"type": "number",
|
|
1039
|
+
"required": false,
|
|
1040
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"key": "tpm_exceeded",
|
|
1044
|
+
"type": "boolean",
|
|
1045
|
+
"required": false,
|
|
1046
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
1047
|
+
},
|
|
976
1048
|
{
|
|
977
1049
|
"key": "session_pii_detected",
|
|
978
1050
|
"type": "boolean",
|
|
@@ -1189,6 +1261,30 @@
|
|
|
1189
1261
|
"required": false,
|
|
1190
1262
|
"description": "Type of path traversal detected in the file read path"
|
|
1191
1263
|
},
|
|
1264
|
+
{
|
|
1265
|
+
"key": "rpm_remaining_pct",
|
|
1266
|
+
"type": "number",
|
|
1267
|
+
"required": false,
|
|
1268
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"key": "rpm_exceeded",
|
|
1272
|
+
"type": "boolean",
|
|
1273
|
+
"required": false,
|
|
1274
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"key": "tpm_remaining_pct",
|
|
1278
|
+
"type": "number",
|
|
1279
|
+
"required": false,
|
|
1280
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"key": "tpm_exceeded",
|
|
1284
|
+
"type": "boolean",
|
|
1285
|
+
"required": false,
|
|
1286
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
1287
|
+
},
|
|
1192
1288
|
{
|
|
1193
1289
|
"key": "session_pii_detected",
|
|
1194
1290
|
"type": "boolean",
|
|
@@ -1417,6 +1513,30 @@
|
|
|
1417
1513
|
"required": false,
|
|
1418
1514
|
"description": "Type of path traversal detected in the file write path"
|
|
1419
1515
|
},
|
|
1516
|
+
{
|
|
1517
|
+
"key": "rpm_remaining_pct",
|
|
1518
|
+
"type": "number",
|
|
1519
|
+
"required": false,
|
|
1520
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"key": "rpm_exceeded",
|
|
1524
|
+
"type": "boolean",
|
|
1525
|
+
"required": false,
|
|
1526
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"key": "tpm_remaining_pct",
|
|
1530
|
+
"type": "number",
|
|
1531
|
+
"required": false,
|
|
1532
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"key": "tpm_exceeded",
|
|
1536
|
+
"type": "boolean",
|
|
1537
|
+
"required": false,
|
|
1538
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
1539
|
+
},
|
|
1420
1540
|
{
|
|
1421
1541
|
"key": "session_pii_detected",
|
|
1422
1542
|
"type": "boolean",
|
|
@@ -1645,6 +1765,30 @@
|
|
|
1645
1765
|
"required": false,
|
|
1646
1766
|
"description": "Risk score for cross-origin escalation in server connection (0-100)"
|
|
1647
1767
|
},
|
|
1768
|
+
{
|
|
1769
|
+
"key": "rpm_remaining_pct",
|
|
1770
|
+
"type": "number",
|
|
1771
|
+
"required": false,
|
|
1772
|
+
"description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
"key": "rpm_exceeded",
|
|
1776
|
+
"type": "boolean",
|
|
1777
|
+
"required": false,
|
|
1778
|
+
"description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"key": "tpm_remaining_pct",
|
|
1782
|
+
"type": "number",
|
|
1783
|
+
"required": false,
|
|
1784
|
+
"description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)"
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"key": "tpm_exceeded",
|
|
1788
|
+
"type": "boolean",
|
|
1789
|
+
"required": false,
|
|
1790
|
+
"description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy"
|
|
1791
|
+
},
|
|
1648
1792
|
{
|
|
1649
1793
|
"key": "session_pii_detected",
|
|
1650
1794
|
"type": "boolean",
|
|
@@ -33,6 +33,8 @@ export declare const AiGatewayContextKey: {
|
|
|
33
33
|
readonly PrivilegeScope: "privilege_scope";
|
|
34
34
|
readonly ProfanityScore: "profanity_score";
|
|
35
35
|
readonly Role: "role";
|
|
36
|
+
readonly RpmExceeded: "rpm_exceeded";
|
|
37
|
+
readonly RpmRemainingPct: "rpm_remaining_pct";
|
|
36
38
|
readonly RugPullDetected: "rug_pull_detected";
|
|
37
39
|
readonly RugPullScore: "rug_pull_score";
|
|
38
40
|
readonly SecretCount: "secret_count";
|
|
@@ -64,6 +66,8 @@ export declare const AiGatewayContextKey: {
|
|
|
64
66
|
readonly ToolPoisoningDetected: "tool_poisoning_detected";
|
|
65
67
|
readonly ToolPoisoningScore: "tool_poisoning_score";
|
|
66
68
|
readonly ToolRiskScore: "tool_risk_score";
|
|
69
|
+
readonly TpmExceeded: "tpm_exceeded";
|
|
70
|
+
readonly TpmRemainingPct: "tpm_remaining_pct";
|
|
67
71
|
readonly ViolenceScore: "violence_score";
|
|
68
72
|
readonly WeaponsScore: "weapons_score";
|
|
69
73
|
};
|
|
@@ -72,4 +76,4 @@ export type AiGatewayContextKey = (typeof AiGatewayContextKey)[keyof typeof AiGa
|
|
|
72
76
|
* The full set of authorable context attribute keys for AiGateway.
|
|
73
77
|
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
74
78
|
*/
|
|
75
|
-
export declare const AiGatewayContextKeys: readonly ["content", "crime_score", "detected_threats", "hate_speech_score", "highest_severity", "indirect_injection_score", "injection_score", "invisible_chars_detected", "invisible_chars_score", "jailbreak_score", "loop_count", "loop_detected", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_server", "mcp_server_verified", "mcp_tool", "model_name", "model_provider", "pattern_type", "pii_count", "pii_detected", "pii_score", "pii_types", "privilege_scope", "profanity_score", "role", "rug_pull_detected", "rug_pull_score", "secret_count", "secret_types", "secrets_detected", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "suspicious_pattern", "threat_categories", "threat_count", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_risk_score", "violence_score", "weapons_score"];
|
|
79
|
+
export declare const AiGatewayContextKeys: readonly ["content", "crime_score", "detected_threats", "hate_speech_score", "highest_severity", "indirect_injection_score", "injection_score", "invisible_chars_detected", "invisible_chars_score", "jailbreak_score", "loop_count", "loop_detected", "max_threat_severity", "mcp_config_risk", "mcp_risk_score", "mcp_server", "mcp_server_verified", "mcp_tool", "model_name", "model_provider", "pattern_type", "pii_count", "pii_detected", "pii_score", "pii_types", "privilege_scope", "profanity_score", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "secret_count", "secret_types", "secrets_detected", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "suspicious_pattern", "threat_categories", "threat_count", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_risk_score", "tpm_exceeded", "tpm_remaining_pct", "violence_score", "weapons_score"];
|
|
@@ -35,6 +35,8 @@ export const AiGatewayContextKey = {
|
|
|
35
35
|
PrivilegeScope: 'privilege_scope',
|
|
36
36
|
ProfanityScore: 'profanity_score',
|
|
37
37
|
Role: 'role',
|
|
38
|
+
RpmExceeded: 'rpm_exceeded',
|
|
39
|
+
RpmRemainingPct: 'rpm_remaining_pct',
|
|
38
40
|
RugPullDetected: 'rug_pull_detected',
|
|
39
41
|
RugPullScore: 'rug_pull_score',
|
|
40
42
|
SecretCount: 'secret_count',
|
|
@@ -66,6 +68,8 @@ export const AiGatewayContextKey = {
|
|
|
66
68
|
ToolPoisoningDetected: 'tool_poisoning_detected',
|
|
67
69
|
ToolPoisoningScore: 'tool_poisoning_score',
|
|
68
70
|
ToolRiskScore: 'tool_risk_score',
|
|
71
|
+
TpmExceeded: 'tpm_exceeded',
|
|
72
|
+
TpmRemainingPct: 'tpm_remaining_pct',
|
|
69
73
|
ViolenceScore: 'violence_score',
|
|
70
74
|
WeaponsScore: 'weapons_score',
|
|
71
75
|
};
|
|
@@ -102,6 +106,8 @@ export const AiGatewayContextKeys = [
|
|
|
102
106
|
AiGatewayContextKey.PrivilegeScope,
|
|
103
107
|
AiGatewayContextKey.ProfanityScore,
|
|
104
108
|
AiGatewayContextKey.Role,
|
|
109
|
+
AiGatewayContextKey.RpmExceeded,
|
|
110
|
+
AiGatewayContextKey.RpmRemainingPct,
|
|
105
111
|
AiGatewayContextKey.RugPullDetected,
|
|
106
112
|
AiGatewayContextKey.RugPullScore,
|
|
107
113
|
AiGatewayContextKey.SecretCount,
|
|
@@ -133,6 +139,8 @@ export const AiGatewayContextKeys = [
|
|
|
133
139
|
AiGatewayContextKey.ToolPoisoningDetected,
|
|
134
140
|
AiGatewayContextKey.ToolPoisoningScore,
|
|
135
141
|
AiGatewayContextKey.ToolRiskScore,
|
|
142
|
+
AiGatewayContextKey.TpmExceeded,
|
|
143
|
+
AiGatewayContextKey.TpmRemainingPct,
|
|
136
144
|
AiGatewayContextKey.ViolenceScore,
|
|
137
145
|
AiGatewayContextKey.WeaponsScore,
|
|
138
146
|
];
|
|
@@ -85,6 +85,8 @@ export declare const GuardrailsContextKey: {
|
|
|
85
85
|
readonly ProfanityScore: "profanity_score";
|
|
86
86
|
readonly RequestId: "request_id";
|
|
87
87
|
readonly Role: "role";
|
|
88
|
+
readonly RpmExceeded: "rpm_exceeded";
|
|
89
|
+
readonly RpmRemainingPct: "rpm_remaining_pct";
|
|
88
90
|
readonly RugPullDetected: "rug_pull_detected";
|
|
89
91
|
readonly RugPullScore: "rug_pull_score";
|
|
90
92
|
readonly RugPullType: "rug_pull_type";
|
|
@@ -125,6 +127,8 @@ export declare const GuardrailsContextKey: {
|
|
|
125
127
|
readonly ToolPoisoningType: "tool_poisoning_type";
|
|
126
128
|
readonly ToolRiskScore: "tool_risk_score";
|
|
127
129
|
readonly TopicConfidence: "topic_confidence";
|
|
130
|
+
readonly TpmExceeded: "tpm_exceeded";
|
|
131
|
+
readonly TpmRemainingPct: "tpm_remaining_pct";
|
|
128
132
|
readonly ViolenceScore: "violence_score";
|
|
129
133
|
readonly WeaponsScore: "weapons_score";
|
|
130
134
|
};
|
|
@@ -133,4 +137,4 @@ export type GuardrailsContextKey = (typeof GuardrailsContextKey)[keyof typeof Gu
|
|
|
133
137
|
* The full set of authorable context attribute keys for Guardrails.
|
|
134
138
|
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
135
139
|
*/
|
|
136
|
-
export declare const GuardrailsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "detected_language", "detected_script", "detector_count", "direction", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "factuality_score", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "mcp_config_risk", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "multi_turn_detection", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "privilege_scope", "profanity_score", "request_id", "role", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "suspicious_pattern", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "violence_score", "weapons_score"];
|
|
140
|
+
export declare const GuardrailsContextKeys: readonly ["agent_framework", "agent_id", "agent_publisher", "agent_trust_level", "agent_type", "budget_exceeded", "budget_remaining_pct", "code_languages", "code_ratio", "command_injection_detected", "command_injection_score", "command_injection_type", "contains_code", "contains_non_ascii", "content_safety_blocked", "content_safety_score", "content_topics", "content_type", "conversation_turn", "crime_score", "cross_origin_detected", "cross_origin_score", "cross_origin_type", "detected_language", "detected_script", "detector_count", "direction", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "factuality_score", "hallucination_score", "hate_speech_score", "highest_severity", "identity_type", "indirect_injection_score", "indirect_injection_type", "injection_deep_context_score", "injection_pulse_score", "injection_score", "injection_type", "invisible_chars_detected", "invisible_chars_score", "is_english", "is_latin_script", "jailbreak_deep_context_score", "jailbreak_pulse_score", "jailbreak_score", "keyword_categories", "keyword_count", "keyword_matched", "language_confidence", "loop_count", "loop_detected", "loop_tool", "mcp_config_risk", "mcp_risk_score", "mcp_risk_type", "mcp_server", "mcp_server_verified", "mcp_tool", "multi_turn_detection", "param_type_violation", "param_type_violations", "path", "path_traversal_detected", "path_traversal_severity", "path_traversal_type", "pattern_type", "phishing_detected", "pii_count", "pii_detected", "pii_score", "pii_types", "principal", "privilege_scope", "profanity_score", "request_id", "role", "rpm_exceeded", "rpm_remaining_pct", "rug_pull_detected", "rug_pull_score", "rug_pull_type", "script_confidence", "secret_count", "secret_types", "secrets_detected", "sentiment_score", "sequence_risk", "session_command_injection", "session_cumulative_risk_score", "session_injection_detected", "session_max_command_injection_score", "session_max_injection_score", "session_max_jailbreak_score", "session_max_pii_score", "session_max_secret_score", "session_max_sensitivity", "session_original_request", "session_pii_detected", "session_pii_types", "session_secret_types", "session_secrets_detected", "session_threat_turns", "sexual_score", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "suspicious_pattern", "timestamp", "tool_category", "tool_is_builtin", "tool_is_sensitive", "tool_name", "tool_operation_classes", "tool_poisoning_detected", "tool_poisoning_score", "tool_poisoning_type", "tool_risk_score", "topic_confidence", "tpm_exceeded", "tpm_remaining_pct", "violence_score", "weapons_score"];
|
|
@@ -87,6 +87,8 @@ export const GuardrailsContextKey = {
|
|
|
87
87
|
ProfanityScore: 'profanity_score',
|
|
88
88
|
RequestId: 'request_id',
|
|
89
89
|
Role: 'role',
|
|
90
|
+
RpmExceeded: 'rpm_exceeded',
|
|
91
|
+
RpmRemainingPct: 'rpm_remaining_pct',
|
|
90
92
|
RugPullDetected: 'rug_pull_detected',
|
|
91
93
|
RugPullScore: 'rug_pull_score',
|
|
92
94
|
RugPullType: 'rug_pull_type',
|
|
@@ -127,6 +129,8 @@ export const GuardrailsContextKey = {
|
|
|
127
129
|
ToolPoisoningType: 'tool_poisoning_type',
|
|
128
130
|
ToolRiskScore: 'tool_risk_score',
|
|
129
131
|
TopicConfidence: 'topic_confidence',
|
|
132
|
+
TpmExceeded: 'tpm_exceeded',
|
|
133
|
+
TpmRemainingPct: 'tpm_remaining_pct',
|
|
130
134
|
ViolenceScore: 'violence_score',
|
|
131
135
|
WeaponsScore: 'weapons_score',
|
|
132
136
|
};
|
|
@@ -215,6 +219,8 @@ export const GuardrailsContextKeys = [
|
|
|
215
219
|
GuardrailsContextKey.ProfanityScore,
|
|
216
220
|
GuardrailsContextKey.RequestId,
|
|
217
221
|
GuardrailsContextKey.Role,
|
|
222
|
+
GuardrailsContextKey.RpmExceeded,
|
|
223
|
+
GuardrailsContextKey.RpmRemainingPct,
|
|
218
224
|
GuardrailsContextKey.RugPullDetected,
|
|
219
225
|
GuardrailsContextKey.RugPullScore,
|
|
220
226
|
GuardrailsContextKey.RugPullType,
|
|
@@ -255,6 +261,8 @@ export const GuardrailsContextKeys = [
|
|
|
255
261
|
GuardrailsContextKey.ToolPoisoningType,
|
|
256
262
|
GuardrailsContextKey.ToolRiskScore,
|
|
257
263
|
GuardrailsContextKey.TopicConfidence,
|
|
264
|
+
GuardrailsContextKey.TpmExceeded,
|
|
265
|
+
GuardrailsContextKey.TpmRemainingPct,
|
|
258
266
|
GuardrailsContextKey.ViolenceScore,
|
|
259
267
|
GuardrailsContextKey.WeaponsScore,
|
|
260
268
|
];
|
|
@@ -352,14 +352,14 @@ export const GUARDRAILS_DETECTORS = [
|
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
id: "dlp",
|
|
355
|
-
displayName: "
|
|
355
|
+
displayName: "Highflame DLP",
|
|
356
356
|
category: "data_protection",
|
|
357
357
|
stability: "stable",
|
|
358
358
|
tier: "slow",
|
|
359
359
|
inhouse: false,
|
|
360
360
|
model: null,
|
|
361
361
|
latencyP50Ms: 248,
|
|
362
|
-
emits: [{ name: "pii_detected", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True iff
|
|
362
|
+
emits: [{ name: "pii_detected", type: "Bool", modifiable: false, semantic: "boolean_flag", description: "True iff the DLP detector returned at least one PII finding." }, { name: "pii_types", type: "Set<String>", modifiable: false, semantic: "category_set", description: "PII info-types found (Presidio info-type names)." }, { name: "pii_confidence", type: "String", modifiable: false, semantic: "severity_0_100", description: "Highest likelihood level returned by DLP (VERY_UNLIKELY, UNLIKELY, POSSIBLE, LIKELY, VERY_LIKELY, NONE)." }, { name: "info_types", type: "Set<String>", modifiable: false, semantic: "category_set", description: "All DLP info-types detected (alias of pii_types for explicit DLP semantics)." }],
|
|
363
363
|
supportedModes: ["enforce", "monitor", "alert"],
|
|
364
364
|
defendsAgainst: ["pii_leakage", "phi_leakage", "pci_data_exposure"],
|
|
365
365
|
exampleAttacks: [{ title: "Credit card number", vulnerabilityId: "pci_data_exposure", snippet: "Customer record: 4111 1111 1111 1111, exp 04/27.", expectedSignal: {} }],
|
|
@@ -3342,7 +3342,11 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
3342
3342
|
{ "key": "session_max_jailbreak_score", "type": "number", "required": false, "description": "Max jailbreak score across session turns" },
|
|
3343
3343
|
{ "key": "session_max_command_injection_score", "type": "number", "required": false, "description": "Max command-injection score across session turns" },
|
|
3344
3344
|
{ "key": "session_max_pii_score", "type": "number", "required": false, "description": "Max pii score across session turns" },
|
|
3345
|
-
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" }
|
|
3345
|
+
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" },
|
|
3346
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3347
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3348
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3349
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" }
|
|
3346
3350
|
]
|
|
3347
3351
|
},
|
|
3348
3352
|
{
|
|
@@ -3384,7 +3388,11 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
3384
3388
|
{ "key": "session_max_jailbreak_score", "type": "number", "required": false, "description": "Max jailbreak score across session turns" },
|
|
3385
3389
|
{ "key": "session_max_command_injection_score", "type": "number", "required": false, "description": "Max command-injection score across session turns" },
|
|
3386
3390
|
{ "key": "session_max_pii_score", "type": "number", "required": false, "description": "Max pii score across session turns" },
|
|
3387
|
-
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" }
|
|
3391
|
+
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" },
|
|
3392
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3393
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3394
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3395
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" }
|
|
3388
3396
|
]
|
|
3389
3397
|
},
|
|
3390
3398
|
{
|
|
@@ -3431,7 +3439,11 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
3431
3439
|
{ "key": "session_max_jailbreak_score", "type": "number", "required": false, "description": "Max jailbreak score across session turns" },
|
|
3432
3440
|
{ "key": "session_max_command_injection_score", "type": "number", "required": false, "description": "Max command-injection score across session turns" },
|
|
3433
3441
|
{ "key": "session_max_pii_score", "type": "number", "required": false, "description": "Max pii score across session turns" },
|
|
3434
|
-
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" }
|
|
3442
|
+
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" },
|
|
3443
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3444
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3445
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3446
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" }
|
|
3435
3447
|
]
|
|
3436
3448
|
},
|
|
3437
3449
|
{
|
|
@@ -3466,7 +3478,11 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
3466
3478
|
{ "key": "session_max_jailbreak_score", "type": "number", "required": false, "description": "Max jailbreak score across session turns" },
|
|
3467
3479
|
{ "key": "session_max_command_injection_score", "type": "number", "required": false, "description": "Max command-injection score across session turns" },
|
|
3468
3480
|
{ "key": "session_max_pii_score", "type": "number", "required": false, "description": "Max pii score across session turns" },
|
|
3469
|
-
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" }
|
|
3481
|
+
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" },
|
|
3482
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3483
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3484
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3485
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" }
|
|
3470
3486
|
]
|
|
3471
3487
|
},
|
|
3472
3488
|
{
|
|
@@ -3501,7 +3517,11 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
3501
3517
|
{ "key": "session_max_jailbreak_score", "type": "number", "required": false, "description": "Max jailbreak score across session turns" },
|
|
3502
3518
|
{ "key": "session_max_command_injection_score", "type": "number", "required": false, "description": "Max command-injection score across session turns" },
|
|
3503
3519
|
{ "key": "session_max_pii_score", "type": "number", "required": false, "description": "Max pii score across session turns" },
|
|
3504
|
-
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" }
|
|
3520
|
+
{ "key": "session_max_secret_score", "type": "number", "required": false, "description": "Max secret score across session turns" },
|
|
3521
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3522
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3523
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3524
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" }
|
|
3505
3525
|
]
|
|
3506
3526
|
}
|
|
3507
3527
|
]
|
|
@@ -3589,6 +3609,10 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
3589
3609
|
{ "key": "content_safety_blocked", "type": "boolean", "required": false, "description": "Whether content was flagged for blocking by the content safety system" },
|
|
3590
3610
|
{ "key": "conversation_turn", "type": "number", "required": false, "description": "Current conversation turn number. Use for policies that escalate strictness over long conversations" },
|
|
3591
3611
|
{ "key": "multi_turn_detection", "type": "boolean", "required": false, "description": "Whether multi-turn injection patterns were detected (attack spread across multiple conversation turns)" },
|
|
3612
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3613
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3614
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3615
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" },
|
|
3592
3616
|
{ "key": "session_pii_detected", "type": "boolean", "required": false, "description": "Whether PII was detected in any previous turn of the session" },
|
|
3593
3617
|
{ "key": "session_pii_types", "type": "array", "required": false, "description": "PII types detected across the session (accumulated)" },
|
|
3594
3618
|
{ "key": "session_secrets_detected", "type": "boolean", "required": false, "description": "Whether secrets were detected in any previous turn of the session" },
|
|
@@ -3639,6 +3663,10 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
3639
3663
|
{ "key": "loop_tool", "type": "string", "required": false, "description": "Name of the tool involved in the loop" },
|
|
3640
3664
|
{ "key": "budget_remaining_pct", "type": "number", "required": false, "description": "Remaining token budget as percentage (0-100). Use this to warn or block when budget is low. Requires session with token budget configuration" },
|
|
3641
3665
|
{ "key": "budget_exceeded", "type": "boolean", "required": false, "description": "Whether the token budget has been exceeded. Use this to enforce cost controls on agentic sessions" },
|
|
3666
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3667
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3668
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3669
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" },
|
|
3642
3670
|
{ "key": "content_topics", "type": "array", "required": false, "description": "Semantic topics detected in tool arguments or content (e.g., [\'controlled_substances\']). Use .contains() to restrict tool calls involving specific topics" },
|
|
3643
3671
|
{ "key": "topic_confidence", "type": "number", "required": false, "description": "Confidence score from topic classifier for tool content (0-100)" },
|
|
3644
3672
|
{ "key": "secrets_detected", "type": "boolean", "required": false, "description": "Whether secrets were detected in tool arguments or content" },
|
|
@@ -3684,6 +3712,10 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
3684
3712
|
{ "key": "rug_pull_type", "type": "string", "required": false, "description": "Type of rug pull detected: \'risk_spike\' (sudden risk increase), \'pattern_change\' (behavioral shift), \'combined\', or \'none\'" },
|
|
3685
3713
|
{ "key": "conversation_turn", "type": "number", "required": false, "description": "Current conversation turn number for the agentic session" },
|
|
3686
3714
|
{ "key": "multi_turn_detection", "type": "boolean", "required": false, "description": "Whether multi-turn injection patterns were detected across tool calls in the session" },
|
|
3715
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3716
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3717
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3718
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" },
|
|
3687
3719
|
{ "key": "session_pii_detected", "type": "boolean", "required": false, "description": "Whether PII was detected in any previous turn of the session" },
|
|
3688
3720
|
{ "key": "session_pii_types", "type": "array", "required": false, "description": "PII types detected across the session (accumulated)" },
|
|
3689
3721
|
{ "key": "session_secrets_detected", "type": "boolean", "required": false, "description": "Whether secrets were detected in any previous turn of the session" },
|
|
@@ -3725,6 +3757,10 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
3725
3757
|
{ "key": "path_traversal_detected", "type": "boolean", "required": false, "description": "Whether path traversal patterns were detected in the file path being read" },
|
|
3726
3758
|
{ "key": "path_traversal_severity", "type": "string", "required": false, "description": "Severity of path traversal in the file read path" },
|
|
3727
3759
|
{ "key": "path_traversal_type", "type": "string", "required": false, "description": "Type of path traversal detected in the file read path" },
|
|
3760
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3761
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3762
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3763
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" },
|
|
3728
3764
|
{ "key": "session_pii_detected", "type": "boolean", "required": false, "description": "Whether PII was detected in any previous turn of the session" },
|
|
3729
3765
|
{ "key": "session_pii_types", "type": "array", "required": false, "description": "PII types detected across the session (accumulated)" },
|
|
3730
3766
|
{ "key": "session_secrets_detected", "type": "boolean", "required": false, "description": "Whether secrets were detected in any previous turn of the session" },
|
|
@@ -3768,6 +3804,10 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
3768
3804
|
{ "key": "path_traversal_detected", "type": "boolean", "required": false, "description": "Whether path traversal patterns were detected in the file path being written" },
|
|
3769
3805
|
{ "key": "path_traversal_severity", "type": "string", "required": false, "description": "Severity of path traversal in the file write path" },
|
|
3770
3806
|
{ "key": "path_traversal_type", "type": "string", "required": false, "description": "Type of path traversal detected in the file write path" },
|
|
3807
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3808
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3809
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3810
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" },
|
|
3771
3811
|
{ "key": "session_pii_detected", "type": "boolean", "required": false, "description": "Whether PII was detected in any previous turn of the session" },
|
|
3772
3812
|
{ "key": "session_pii_types", "type": "array", "required": false, "description": "PII types detected across the session (accumulated)" },
|
|
3773
3813
|
{ "key": "session_secrets_detected", "type": "boolean", "required": false, "description": "Whether secrets were detected in any previous turn of the session" },
|
|
@@ -3811,6 +3851,10 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
3811
3851
|
{ "key": "cross_origin_detected", "type": "boolean", "required": false, "description": "Whether cross-origin escalation patterns were detected in the MCP server connection" },
|
|
3812
3852
|
{ "key": "cross_origin_type", "type": "string", "required": false, "description": "Type of cross-origin escalation detected in server connection" },
|
|
3813
3853
|
{ "key": "cross_origin_score", "type": "number", "required": false, "description": "Risk score for cross-origin escalation in server connection (0-100)" },
|
|
3854
|
+
{ "key": "rpm_remaining_pct", "type": "number", "required": false, "description": "Remaining RPM (requests per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3855
|
+
{ "key": "rpm_exceeded", "type": "boolean", "required": false, "description": "Whether the RPM limit has been exceeded. Use this to enforce rate limits via Cedar policy" },
|
|
3856
|
+
{ "key": "tpm_remaining_pct", "type": "number", "required": false, "description": "Remaining TPM (tokens per minute) as percentage (0-100). Gateway-metered, Shield-decided (ADR 0014)" },
|
|
3857
|
+
{ "key": "tpm_exceeded", "type": "boolean", "required": false, "description": "Whether the TPM limit has been exceeded. Use this to enforce token rate limits via Cedar policy" },
|
|
3814
3858
|
{ "key": "session_pii_detected", "type": "boolean", "required": false, "description": "Whether PII was detected in any previous turn of the session" },
|
|
3815
3859
|
{ "key": "session_pii_types", "type": "array", "required": false, "description": "PII types detected across the session (accumulated)" },
|
|
3816
3860
|
{ "key": "session_secrets_detected", "type": "boolean", "required": false, "description": "Whether secrets were detected in any previous turn of the session" },
|