@highflame/policy 2.1.3 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +41 -0
  2. package/_schemas/guardrails/context.json +466 -76
  3. package/_schemas/guardrails/schema.cedarschema +39 -3
  4. package/_schemas/guardrails/templates/defaults/injection.cedar +6 -6
  5. package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +2 -2
  6. package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +1 -1
  7. package/_schemas/overwatch/context.json +443 -5
  8. package/_schemas/overwatch/schema.cedarschema +42 -4
  9. package/_schemas/palisade/context.json +1 -1
  10. package/_schemas/sentry/context.json +1165 -0
  11. package/_schemas/sentry/schema.cedarschema +388 -0
  12. package/_schemas/sentry/templates/defaults/baseline.cedar +24 -0
  13. package/_schemas/sentry/templates/defaults/content_safety.cedar +232 -0
  14. package/_schemas/sentry/templates/defaults/file_safety.cedar +174 -0
  15. package/_schemas/sentry/templates/defaults/organization.cedar +207 -0
  16. package/_schemas/sentry/templates/defaults/pii.cedar +229 -0
  17. package/_schemas/sentry/templates/defaults/semantic.cedar +167 -0
  18. package/_schemas/sentry/templates/templates.json +93 -0
  19. package/dist/builder.d.ts +32 -0
  20. package/dist/builder.js +6 -6
  21. package/dist/condition-groups.d.ts +69 -0
  22. package/dist/condition-groups.js +305 -0
  23. package/dist/guardrails-context.gen.d.ts +19 -2
  24. package/dist/guardrails-context.gen.js +19 -2
  25. package/dist/guardrails-defaults.gen.js +9 -9
  26. package/dist/index.d.ts +6 -1
  27. package/dist/index.js +6 -1
  28. package/dist/overwatch-context.gen.d.ts +17 -0
  29. package/dist/overwatch-context.gen.js +17 -0
  30. package/dist/sentry-context.gen.d.ts +76 -0
  31. package/dist/sentry-context.gen.js +77 -0
  32. package/dist/sentry-defaults.gen.d.ts +61 -0
  33. package/dist/sentry-defaults.gen.js +1235 -0
  34. package/dist/sentry-entities.gen.d.ts +11 -0
  35. package/dist/sentry-entities.gen.js +33 -0
  36. package/dist/service-schemas.gen.d.ts +12 -2
  37. package/dist/service-schemas.gen.js +861 -25
  38. package/dist/types.d.ts +6 -1
  39. package/dist/types.js +6 -1
  40. package/package.json +1 -1
  41. package/_schemas/guardrails/templates/profiles/chat_assistant.cedar +0 -85
  42. package/_schemas/guardrails/templates/profiles/code_agent.cedar +0 -125
  43. package/_schemas/guardrails/templates/profiles/data_pipeline.cedar +0 -111
@@ -96,8 +96,12 @@ namespace Guardrails {
96
96
  "detector_count": Long,
97
97
 
98
98
  // Security - Injection & Jailbreak (optional)
99
- "injection_score"?: Long, // 0-100
100
- "jailbreak_score"?: Long, // 0-100
99
+ "injection_confidence"?: Long, // Combined injection confidence: MAX(pulse, deep_context)
100
+ "jailbreak_confidence"?: Long, // Combined jailbreak confidence: MAX(pulse, deep_context)
101
+ "injection_pulse_score"?: Long, // 0-100 Pulse single-turn classifier
102
+ "injection_deep_context_score"?: Long, // 0-100 DeepContext multi-turn
103
+ "jailbreak_pulse_score"?: Long, // 0-100 Pulse single-turn classifier
104
+ "jailbreak_deep_context_score"?: Long, // 0-100 DeepContext multi-turn
101
105
  "injection_type"?: String, // "prompt" | "sql" | "command" | "none"
102
106
 
103
107
  // Privacy - Secrets (optional)
@@ -183,6 +187,12 @@ namespace Guardrails {
183
187
  "session_injection_detected"?: Bool,
184
188
  "session_command_injection"?: Bool,
185
189
  "session_threat_turns"?: Long,
190
+ "session_max_injection_score"?: Long,
191
+ "session_max_jailbreak_score"?: Long,
192
+ "session_max_command_injection_score"?: Long,
193
+ "session_max_pii_score"?: Long,
194
+ "session_max_secret_score"?: Long,
195
+ "session_cumulative_risk_score"?: Long,
186
196
 
187
197
  };
188
198
 
@@ -227,7 +237,9 @@ namespace Guardrails {
227
237
  "secret_types"?: Set<String>,
228
238
  "pii_detected"?: Bool,
229
239
  "pii_types"?: Set<String>,
230
- "injection_score"?: Long,
240
+ "injection_confidence"?: Long,
241
+ "injection_pulse_score"?: Long, // 0-100 Pulse single-turn classifier
242
+ "injection_deep_context_score"?: Long, // 0-100 DeepContext multi-turn
231
243
 
232
244
  // Security - Pattern Detection (optional)
233
245
  "command_injection_detected"?: Bool,
@@ -276,6 +288,12 @@ namespace Guardrails {
276
288
  "session_injection_detected"?: Bool,
277
289
  "session_command_injection"?: Bool,
278
290
  "session_threat_turns"?: Long,
291
+ "session_max_injection_score"?: Long,
292
+ "session_max_jailbreak_score"?: Long,
293
+ "session_max_command_injection_score"?: Long,
294
+ "session_max_pii_score"?: Long,
295
+ "session_max_secret_score"?: Long,
296
+ "session_cumulative_risk_score"?: Long,
279
297
 
280
298
  };
281
299
 
@@ -304,6 +322,12 @@ namespace Guardrails {
304
322
  "session_injection_detected"?: Bool,
305
323
  "session_command_injection"?: Bool,
306
324
  "session_threat_turns"?: Long,
325
+ "session_max_injection_score"?: Long,
326
+ "session_max_jailbreak_score"?: Long,
327
+ "session_max_command_injection_score"?: Long,
328
+ "session_max_pii_score"?: Long,
329
+ "session_max_secret_score"?: Long,
330
+ "session_cumulative_risk_score"?: Long,
307
331
 
308
332
  };
309
333
 
@@ -332,6 +356,12 @@ namespace Guardrails {
332
356
  "session_injection_detected"?: Bool,
333
357
  "session_command_injection"?: Bool,
334
358
  "session_threat_turns"?: Long,
359
+ "session_max_injection_score"?: Long,
360
+ "session_max_jailbreak_score"?: Long,
361
+ "session_max_command_injection_score"?: Long,
362
+ "session_max_pii_score"?: Long,
363
+ "session_max_secret_score"?: Long,
364
+ "session_cumulative_risk_score"?: Long,
335
365
 
336
366
  };
337
367
 
@@ -368,6 +398,12 @@ namespace Guardrails {
368
398
  "session_injection_detected"?: Bool,
369
399
  "session_command_injection"?: Bool,
370
400
  "session_threat_turns"?: Long,
401
+ "session_max_injection_score"?: Long,
402
+ "session_max_jailbreak_score"?: Long,
403
+ "session_max_command_injection_score"?: Long,
404
+ "session_max_pii_score"?: Long,
405
+ "session_max_secret_score"?: Long,
406
+ "session_cumulative_risk_score"?: Long,
371
407
 
372
408
  };
373
409
  }
@@ -5,8 +5,8 @@
5
5
  // Uses ML-based confidence scores from normalized context.
6
6
  //
7
7
  // Context keys used (normalized by projection layer):
8
- // - injection_score: Long (0-100) - Overall injection confidence
9
- // - jailbreak_score: Long (0-100) - Jailbreak attempt confidence
8
+ // - injection_confidence: Long (0-100) - Overall injection confidence
9
+ // - jailbreak_confidence: Long (0-100) - Jailbreak attempt confidence
10
10
  // - injection_type: String - Type of injection detected
11
11
  // - contains_invisible_chars: Bool - Invisible Unicode characters detected
12
12
  // - invisible_chars_score: Long (0-100) - Invisible character density
@@ -25,7 +25,7 @@ forbid (
25
25
  action,
26
26
  resource
27
27
  ) when {
28
- context has injection_score && context.injection_score > 85
28
+ context has injection_confidence && context.injection_confidence > 85
29
29
  };
30
30
 
31
31
  @id("jailbreak-block-high-confidence")
@@ -38,7 +38,7 @@ forbid (
38
38
  action,
39
39
  resource
40
40
  ) when {
41
- context has jailbreak_score && context.jailbreak_score > 80
41
+ context has jailbreak_confidence && context.jailbreak_confidence > 80
42
42
  };
43
43
 
44
44
  @id("injection-combined-threshold")
@@ -51,8 +51,8 @@ forbid (
51
51
  action,
52
52
  resource
53
53
  ) when {
54
- context has injection_score && context has jailbreak_score &&
55
- context.injection_score > 60 && context.jailbreak_score > 60
54
+ context has injection_confidence && context has jailbreak_confidence &&
55
+ context.injection_confidence > 60 && context.jailbreak_confidence > 60
56
56
  };
57
57
 
58
58
  @id("injection-invisible-chars")
@@ -18,7 +18,7 @@ forbid (
18
18
  action,
19
19
  resource
20
20
  ) when {
21
- context has injection_score && context.injection_score > 70
21
+ context has injection_confidence && context.injection_confidence > 70
22
22
  };
23
23
 
24
24
  @id("chat-jailbreak-lower-threshold")
@@ -31,5 +31,5 @@ forbid (
31
31
  action,
32
32
  resource
33
33
  ) when {
34
- context has jailbreak_score && context.jailbreak_score > 65
34
+ context has jailbreak_confidence && context.jailbreak_confidence > 65
35
35
  };
@@ -45,5 +45,5 @@ forbid (
45
45
  action,
46
46
  resource
47
47
  ) when {
48
- context has injection_score && context.injection_score > 65
48
+ context has injection_confidence && context.injection_confidence > 65
49
49
  };
@@ -179,19 +179,121 @@
179
179
  "key": "injection_confidence",
180
180
  "type": "number",
181
181
  "required": true,
182
- "description": "Prompt injection ML classifier confidence (0-100)"
182
+ "description": "Combined prompt injection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use injection_pulse_score / injection_deep_context_score for individual detector control"
183
183
  },
184
184
  {
185
185
  "key": "jailbreak_confidence",
186
186
  "type": "number",
187
187
  "required": true,
188
- "description": "Jailbreak detection ML classifier confidence (0-100)"
188
+ "description": "Combined jailbreak detection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use jailbreak_pulse_score / jailbreak_deep_context_score for individual detector control"
189
+ },
190
+ {
191
+ "key": "injection_pulse_score",
192
+ "type": "number",
193
+ "required": false,
194
+ "description": "Highflame single-turn classifier score for prompt injection (0-100). Raw score from Pulse detector before combination with deep-context. Use for per-detector policy control"
195
+ },
196
+ {
197
+ "key": "injection_deep_context_score",
198
+ "type": "number",
199
+ "required": false,
200
+ "description": "DeepContext multi-turn analyzer score for prompt injection (0-100). Tracks injection patterns across conversation history. Generally higher confidence than single-turn"
201
+ },
202
+ {
203
+ "key": "jailbreak_pulse_score",
204
+ "type": "number",
205
+ "required": false,
206
+ "description": "Highflame single-turn classifier score for jailbreak attempts (0-100). Raw score from Pulse detector before combination with deep-context"
207
+ },
208
+ {
209
+ "key": "jailbreak_deep_context_score",
210
+ "type": "number",
211
+ "required": false,
212
+ "description": "DeepContext multi-turn analyzer score for jailbreak attempts (0-100). Detects jailbreak escalation patterns across conversation turns"
189
213
  },
190
214
  {
191
215
  "key": "indirect_injection_score",
192
216
  "type": "number",
193
217
  "required": true,
194
218
  "description": "Indirect prompt injection risk score (0-100) — injection via tool outputs or retrieved content"
219
+ },
220
+ {
221
+ "key": "session_pii_detected",
222
+ "type": "boolean",
223
+ "required": false,
224
+ "description": "Whether PII was detected in any previous turn of the session"
225
+ },
226
+ {
227
+ "key": "session_pii_types",
228
+ "type": "array",
229
+ "required": false,
230
+ "description": "PII types detected across the session (accumulated)"
231
+ },
232
+ {
233
+ "key": "session_secrets_detected",
234
+ "type": "boolean",
235
+ "required": false,
236
+ "description": "Whether secrets were detected in any previous turn of the session"
237
+ },
238
+ {
239
+ "key": "session_secret_types",
240
+ "type": "array",
241
+ "required": false,
242
+ "description": "Secret types detected across the session (accumulated)"
243
+ },
244
+ {
245
+ "key": "session_injection_detected",
246
+ "type": "boolean",
247
+ "required": false,
248
+ "description": "Whether prompt injection was detected in any previous turn of the session"
249
+ },
250
+ {
251
+ "key": "session_command_injection",
252
+ "type": "boolean",
253
+ "required": false,
254
+ "description": "Whether command injection was detected in any previous turn of the session"
255
+ },
256
+ {
257
+ "key": "session_threat_turns",
258
+ "type": "number",
259
+ "required": false,
260
+ "description": "Number of turns in the session where threats were detected"
261
+ },
262
+ {
263
+ "key": "session_max_injection_score",
264
+ "type": "number",
265
+ "required": false,
266
+ "description": "Highest prompt injection score seen in any turn of the session (0-100). Use for tiered responses: >75 hard block, >50 restrict permissions"
267
+ },
268
+ {
269
+ "key": "session_max_jailbreak_score",
270
+ "type": "number",
271
+ "required": false,
272
+ "description": "Highest jailbreak detection score seen in any turn of the session (0-100)"
273
+ },
274
+ {
275
+ "key": "session_max_command_injection_score",
276
+ "type": "number",
277
+ "required": false,
278
+ "description": "Highest command injection score seen in any turn of the session (0-100)"
279
+ },
280
+ {
281
+ "key": "session_max_pii_score",
282
+ "type": "number",
283
+ "required": false,
284
+ "description": "Highest PII risk score seen in any turn of the session (0-100)"
285
+ },
286
+ {
287
+ "key": "session_max_secret_score",
288
+ "type": "number",
289
+ "required": false,
290
+ "description": "Highest secret detection score seen in any turn of the session (0-100)"
291
+ },
292
+ {
293
+ "key": "session_cumulative_risk_score",
294
+ "type": "number",
295
+ "required": false,
296
+ "description": "Sum of per-turn risk scores across the session. Catches death-by-a-thousand-cuts where no single turn is high but cumulative risk is significant"
195
297
  }
196
298
  ]
197
299
  },
@@ -389,13 +491,37 @@
389
491
  "key": "injection_confidence",
390
492
  "type": "number",
391
493
  "required": false,
392
- "description": "Prompt injection ML classifier confidence (0-100)"
494
+ "description": "Combined prompt injection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use injection_pulse_score / injection_deep_context_score for individual detector control"
393
495
  },
394
496
  {
395
497
  "key": "jailbreak_confidence",
396
498
  "type": "number",
397
499
  "required": false,
398
- "description": "Jailbreak detection ML classifier confidence (0-100)"
500
+ "description": "Combined jailbreak detection confidence (0-100). MAX of all detector scores (Pulse + DeepContext). Use jailbreak_pulse_score / jailbreak_deep_context_score for individual detector control"
501
+ },
502
+ {
503
+ "key": "injection_pulse_score",
504
+ "type": "number",
505
+ "required": false,
506
+ "description": "Highflame single-turn classifier score for prompt injection in tool arguments (0-100). Raw score from Pulse detector before combination with deep-context"
507
+ },
508
+ {
509
+ "key": "injection_deep_context_score",
510
+ "type": "number",
511
+ "required": false,
512
+ "description": "DeepContext multi-turn analyzer score for prompt injection in tool arguments (0-100). Tracks injection patterns across tool call history"
513
+ },
514
+ {
515
+ "key": "jailbreak_pulse_score",
516
+ "type": "number",
517
+ "required": false,
518
+ "description": "Highflame single-turn classifier score for jailbreak in tool arguments (0-100). Raw score from Pulse detector before combination with deep-context"
519
+ },
520
+ {
521
+ "key": "jailbreak_deep_context_score",
522
+ "type": "number",
523
+ "required": false,
524
+ "description": "DeepContext multi-turn analyzer score for jailbreak in tool arguments (0-100). Detects jailbreak escalation patterns across tool call turns"
399
525
  },
400
526
  {
401
527
  "key": "tool_poisoning_score",
@@ -492,6 +618,84 @@
492
618
  "type": "boolean",
493
619
  "required": false,
494
620
  "description": "Whether the MCP server is from a verified registry"
621
+ },
622
+ {
623
+ "key": "session_pii_detected",
624
+ "type": "boolean",
625
+ "required": false,
626
+ "description": "Whether PII was detected in any previous turn of the session"
627
+ },
628
+ {
629
+ "key": "session_pii_types",
630
+ "type": "array",
631
+ "required": false,
632
+ "description": "PII types detected across the session (accumulated)"
633
+ },
634
+ {
635
+ "key": "session_secrets_detected",
636
+ "type": "boolean",
637
+ "required": false,
638
+ "description": "Whether secrets were detected in any previous turn of the session"
639
+ },
640
+ {
641
+ "key": "session_secret_types",
642
+ "type": "array",
643
+ "required": false,
644
+ "description": "Secret types detected across the session (accumulated)"
645
+ },
646
+ {
647
+ "key": "session_injection_detected",
648
+ "type": "boolean",
649
+ "required": false,
650
+ "description": "Whether prompt injection was detected in any previous turn of the session"
651
+ },
652
+ {
653
+ "key": "session_command_injection",
654
+ "type": "boolean",
655
+ "required": false,
656
+ "description": "Whether command injection was detected in any previous turn of the session"
657
+ },
658
+ {
659
+ "key": "session_threat_turns",
660
+ "type": "number",
661
+ "required": false,
662
+ "description": "Number of turns in the session where threats were detected"
663
+ },
664
+ {
665
+ "key": "session_max_injection_score",
666
+ "type": "number",
667
+ "required": false,
668
+ "description": "Highest prompt injection score seen in any turn of the session (0-100). Use for tiered responses: >75 hard block, >50 restrict permissions"
669
+ },
670
+ {
671
+ "key": "session_max_jailbreak_score",
672
+ "type": "number",
673
+ "required": false,
674
+ "description": "Highest jailbreak detection score seen in any turn of the session (0-100)"
675
+ },
676
+ {
677
+ "key": "session_max_command_injection_score",
678
+ "type": "number",
679
+ "required": false,
680
+ "description": "Highest command injection score seen in any turn of the session (0-100)"
681
+ },
682
+ {
683
+ "key": "session_max_pii_score",
684
+ "type": "number",
685
+ "required": false,
686
+ "description": "Highest PII risk score seen in any turn of the session (0-100)"
687
+ },
688
+ {
689
+ "key": "session_max_secret_score",
690
+ "type": "number",
691
+ "required": false,
692
+ "description": "Highest secret detection score seen in any turn of the session (0-100)"
693
+ },
694
+ {
695
+ "key": "session_cumulative_risk_score",
696
+ "type": "number",
697
+ "required": false,
698
+ "description": "Sum of per-turn risk scores across the session. Catches death-by-a-thousand-cuts where no single turn is high but cumulative risk is significant"
495
699
  }
496
700
  ]
497
701
  },
@@ -606,6 +810,84 @@
606
810
  "type": "number",
607
811
  "required": false,
608
812
  "description": "MCP configuration risk severity score (0-100)"
813
+ },
814
+ {
815
+ "key": "session_pii_detected",
816
+ "type": "boolean",
817
+ "required": false,
818
+ "description": "Whether PII was detected in any previous turn of the session"
819
+ },
820
+ {
821
+ "key": "session_pii_types",
822
+ "type": "array",
823
+ "required": false,
824
+ "description": "PII types detected across the session (accumulated)"
825
+ },
826
+ {
827
+ "key": "session_secrets_detected",
828
+ "type": "boolean",
829
+ "required": false,
830
+ "description": "Whether secrets were detected in any previous turn of the session"
831
+ },
832
+ {
833
+ "key": "session_secret_types",
834
+ "type": "array",
835
+ "required": false,
836
+ "description": "Secret types detected across the session (accumulated)"
837
+ },
838
+ {
839
+ "key": "session_injection_detected",
840
+ "type": "boolean",
841
+ "required": false,
842
+ "description": "Whether prompt injection was detected in any previous turn of the session"
843
+ },
844
+ {
845
+ "key": "session_command_injection",
846
+ "type": "boolean",
847
+ "required": false,
848
+ "description": "Whether command injection was detected in any previous turn of the session"
849
+ },
850
+ {
851
+ "key": "session_threat_turns",
852
+ "type": "number",
853
+ "required": false,
854
+ "description": "Number of turns in the session where threats were detected"
855
+ },
856
+ {
857
+ "key": "session_max_injection_score",
858
+ "type": "number",
859
+ "required": false,
860
+ "description": "Highest prompt injection score seen in any turn of the session (0-100). Use for tiered responses: >75 hard block, >50 restrict permissions"
861
+ },
862
+ {
863
+ "key": "session_max_jailbreak_score",
864
+ "type": "number",
865
+ "required": false,
866
+ "description": "Highest jailbreak detection score seen in any turn of the session (0-100)"
867
+ },
868
+ {
869
+ "key": "session_max_command_injection_score",
870
+ "type": "number",
871
+ "required": false,
872
+ "description": "Highest command injection score seen in any turn of the session (0-100)"
873
+ },
874
+ {
875
+ "key": "session_max_pii_score",
876
+ "type": "number",
877
+ "required": false,
878
+ "description": "Highest PII risk score seen in any turn of the session (0-100)"
879
+ },
880
+ {
881
+ "key": "session_max_secret_score",
882
+ "type": "number",
883
+ "required": false,
884
+ "description": "Highest secret detection score seen in any turn of the session (0-100)"
885
+ },
886
+ {
887
+ "key": "session_cumulative_risk_score",
888
+ "type": "number",
889
+ "required": false,
890
+ "description": "Sum of per-turn risk scores across the session. Catches death-by-a-thousand-cuts where no single turn is high but cumulative risk is significant"
609
891
  }
610
892
  ]
611
893
  },
@@ -720,6 +1002,84 @@
720
1002
  "type": "number",
721
1003
  "required": false,
722
1004
  "description": "Number of PII pattern matches in file"
1005
+ },
1006
+ {
1007
+ "key": "session_pii_detected",
1008
+ "type": "boolean",
1009
+ "required": false,
1010
+ "description": "Whether PII was detected in any previous turn of the session"
1011
+ },
1012
+ {
1013
+ "key": "session_pii_types",
1014
+ "type": "array",
1015
+ "required": false,
1016
+ "description": "PII types detected across the session (accumulated)"
1017
+ },
1018
+ {
1019
+ "key": "session_secrets_detected",
1020
+ "type": "boolean",
1021
+ "required": false,
1022
+ "description": "Whether secrets were detected in any previous turn of the session"
1023
+ },
1024
+ {
1025
+ "key": "session_secret_types",
1026
+ "type": "array",
1027
+ "required": false,
1028
+ "description": "Secret types detected across the session (accumulated)"
1029
+ },
1030
+ {
1031
+ "key": "session_injection_detected",
1032
+ "type": "boolean",
1033
+ "required": false,
1034
+ "description": "Whether prompt injection was detected in any previous turn of the session"
1035
+ },
1036
+ {
1037
+ "key": "session_command_injection",
1038
+ "type": "boolean",
1039
+ "required": false,
1040
+ "description": "Whether command injection was detected in any previous turn of the session"
1041
+ },
1042
+ {
1043
+ "key": "session_threat_turns",
1044
+ "type": "number",
1045
+ "required": false,
1046
+ "description": "Number of turns in the session where threats were detected"
1047
+ },
1048
+ {
1049
+ "key": "session_max_injection_score",
1050
+ "type": "number",
1051
+ "required": false,
1052
+ "description": "Highest prompt injection score seen in any turn of the session (0-100). Use for tiered responses: >75 hard block, >50 restrict permissions"
1053
+ },
1054
+ {
1055
+ "key": "session_max_jailbreak_score",
1056
+ "type": "number",
1057
+ "required": false,
1058
+ "description": "Highest jailbreak detection score seen in any turn of the session (0-100)"
1059
+ },
1060
+ {
1061
+ "key": "session_max_command_injection_score",
1062
+ "type": "number",
1063
+ "required": false,
1064
+ "description": "Highest command injection score seen in any turn of the session (0-100)"
1065
+ },
1066
+ {
1067
+ "key": "session_max_pii_score",
1068
+ "type": "number",
1069
+ "required": false,
1070
+ "description": "Highest PII risk score seen in any turn of the session (0-100)"
1071
+ },
1072
+ {
1073
+ "key": "session_max_secret_score",
1074
+ "type": "number",
1075
+ "required": false,
1076
+ "description": "Highest secret detection score seen in any turn of the session (0-100)"
1077
+ },
1078
+ {
1079
+ "key": "session_cumulative_risk_score",
1080
+ "type": "number",
1081
+ "required": false,
1082
+ "description": "Sum of per-turn risk scores across the session. Catches death-by-a-thousand-cuts where no single turn is high but cumulative risk is significant"
723
1083
  }
724
1084
  ]
725
1085
  },
@@ -840,8 +1200,86 @@
840
1200
  "type": "boolean",
841
1201
  "required": false,
842
1202
  "description": "Whether invisible Unicode characters were detected in content being written"
1203
+ },
1204
+ {
1205
+ "key": "session_pii_detected",
1206
+ "type": "boolean",
1207
+ "required": false,
1208
+ "description": "Whether PII was detected in any previous turn of the session"
1209
+ },
1210
+ {
1211
+ "key": "session_pii_types",
1212
+ "type": "array",
1213
+ "required": false,
1214
+ "description": "PII types detected across the session (accumulated)"
1215
+ },
1216
+ {
1217
+ "key": "session_secrets_detected",
1218
+ "type": "boolean",
1219
+ "required": false,
1220
+ "description": "Whether secrets were detected in any previous turn of the session"
1221
+ },
1222
+ {
1223
+ "key": "session_secret_types",
1224
+ "type": "array",
1225
+ "required": false,
1226
+ "description": "Secret types detected across the session (accumulated)"
1227
+ },
1228
+ {
1229
+ "key": "session_injection_detected",
1230
+ "type": "boolean",
1231
+ "required": false,
1232
+ "description": "Whether prompt injection was detected in any previous turn of the session"
1233
+ },
1234
+ {
1235
+ "key": "session_command_injection",
1236
+ "type": "boolean",
1237
+ "required": false,
1238
+ "description": "Whether command injection was detected in any previous turn of the session"
1239
+ },
1240
+ {
1241
+ "key": "session_threat_turns",
1242
+ "type": "number",
1243
+ "required": false,
1244
+ "description": "Number of turns in the session where threats were detected"
1245
+ },
1246
+ {
1247
+ "key": "session_max_injection_score",
1248
+ "type": "number",
1249
+ "required": false,
1250
+ "description": "Highest prompt injection score seen in any turn of the session (0-100). Use for tiered responses: >75 hard block, >50 restrict permissions"
1251
+ },
1252
+ {
1253
+ "key": "session_max_jailbreak_score",
1254
+ "type": "number",
1255
+ "required": false,
1256
+ "description": "Highest jailbreak detection score seen in any turn of the session (0-100)"
1257
+ },
1258
+ {
1259
+ "key": "session_max_command_injection_score",
1260
+ "type": "number",
1261
+ "required": false,
1262
+ "description": "Highest command injection score seen in any turn of the session (0-100)"
1263
+ },
1264
+ {
1265
+ "key": "session_max_pii_score",
1266
+ "type": "number",
1267
+ "required": false,
1268
+ "description": "Highest PII risk score seen in any turn of the session (0-100)"
1269
+ },
1270
+ {
1271
+ "key": "session_max_secret_score",
1272
+ "type": "number",
1273
+ "required": false,
1274
+ "description": "Highest secret detection score seen in any turn of the session (0-100)"
1275
+ },
1276
+ {
1277
+ "key": "session_cumulative_risk_score",
1278
+ "type": "number",
1279
+ "required": false,
1280
+ "description": "Sum of per-turn risk scores across the session. Catches death-by-a-thousand-cuts where no single turn is high but cumulative risk is significant"
843
1281
  }
844
1282
  ]
845
1283
  }
846
1284
  ]
847
- }
1285
+ }