@highflame/policy 2.2.40 → 2.2.42

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 (33) hide show
  1. package/_schemas/agent_ops/templates/ported/organization/organization_deny_baseline.cedar +2 -2
  2. package/_schemas/agent_ops/templates/ported/tool-permissioning/tools_mcp_server_allowlist.cedar +24 -4
  3. package/_schemas/ai_gateway/context.json +300 -0
  4. package/_schemas/ai_gateway/detectors.json +928 -0
  5. package/_schemas/ai_gateway/schema.cedarschema +107 -3
  6. package/_schemas/ai_gateway/templates/mcp_server_allowlist.cedar +24 -4
  7. package/_schemas/guardrails/detectors.json +2193 -0
  8. package/_schemas/guardrails/templates/mcp_server_allowlist.cedar +24 -4
  9. package/_schemas/guardrails/templates/profiles/output_protection/credentials.cedar +35 -0
  10. package/_schemas/guardrails/templates/profiles/output_protection/data_leakage.cedar +63 -0
  11. package/_schemas/guardrails/templates/profiles/output_protection/harmful_content.cedar +58 -0
  12. package/_schemas/guardrails/templates/profiles/output_protection/injection_carried_back.cedar +39 -0
  13. package/_schemas/guardrails/templates/templates.json +107 -11
  14. package/_schemas/overwatch/context.json +65 -0
  15. package/_schemas/overwatch/detectors.json +1129 -0
  16. package/_schemas/overwatch/schema.cedarschema +90 -0
  17. package/_schemas/sentry/detectors.json +857 -0
  18. package/dist/agent_ops-defaults.gen.js +26 -6
  19. package/dist/ai_gateway-defaults.gen.js +24 -4
  20. package/dist/ai_gateway-detectors.gen.d.ts +1 -1
  21. package/dist/ai_gateway-detectors.gen.js +22 -8
  22. package/dist/ai_gateway-entities.gen.js +5 -1
  23. package/dist/guardrails-defaults.gen.js +366 -15
  24. package/dist/guardrails-detectors.gen.d.ts +1 -1
  25. package/dist/guardrails-detectors.gen.js +22 -8
  26. package/dist/overwatch-context.gen.d.ts +3 -1
  27. package/dist/overwatch-context.gen.js +4 -0
  28. package/dist/overwatch-defaults.gen.js +25 -5
  29. package/dist/overwatch-detectors.gen.d.ts +1 -1
  30. package/dist/overwatch-detectors.gen.js +38 -8
  31. package/dist/service-schemas.gen.d.ts +2 -2
  32. package/dist/service-schemas.gen.js +267 -8
  33. package/package.json +1 -1
@@ -151,6 +151,24 @@ action process_prompt appliesTo {
151
151
  // --- Legacy ---
152
152
  prompt_text?: String, // Same as content (backward compatibility)
153
153
  response_content?: String, // Response content (if available)
154
+ // --- Session Token Budget --- (OWASP LLM10; CAP-ENF-009, cerberus#147)
155
+ // Fed by the cumulative session total the Overwatch daemon reports on the
156
+ // prompt and before-tool events.
157
+ //
158
+ // BOTH are optional, so BOTH need a `has` guard — a bare
159
+ // `context.budget_remaining_pct < 10` fails cedar validation with
160
+ // "unable to guarantee safety of access to optional attribute".
161
+ // Write: `context has budget_remaining_pct && context.budget_remaining_pct < 10`.
162
+ //
163
+ // The guard is a validation requirement, NOT a safety property. Whenever a
164
+ // session loads, budget_checker emits both keys — including
165
+ // budget_exceeded: false and budget_remaining_pct: 100 when no budget rule
166
+ // is configured for the scope. So a grant conditioned on
167
+ // `!context.budget_exceeded` fires on unbudgeted sessions, and a low
168
+ // percentage is evidence of spend only when a budget rule exists. Absence
169
+ // means the detector did not run at all (no session).
170
+ budget_remaining_pct?: Long, // Remaining session token budget (0-100)
171
+ budget_exceeded?: Bool, // Session token budget exceeded
154
172
  },
155
173
  };
156
174
 
@@ -270,6 +288,24 @@ action call_tool appliesTo {
270
288
 
271
289
  // --- Legacy ---
272
290
  response_content?: String,
291
+ // --- Session Token Budget --- (OWASP LLM10; CAP-ENF-009, cerberus#147)
292
+ // Fed by the cumulative session total the Overwatch daemon reports on the
293
+ // prompt and before-tool events.
294
+ //
295
+ // BOTH are optional, so BOTH need a `has` guard — a bare
296
+ // `context.budget_remaining_pct < 10` fails cedar validation with
297
+ // "unable to guarantee safety of access to optional attribute".
298
+ // Write: `context has budget_remaining_pct && context.budget_remaining_pct < 10`.
299
+ //
300
+ // The guard is a validation requirement, NOT a safety property. Whenever a
301
+ // session loads, budget_checker emits both keys — including
302
+ // budget_exceeded: false and budget_remaining_pct: 100 when no budget rule
303
+ // is configured for the scope. So a grant conditioned on
304
+ // `!context.budget_exceeded` fires on unbudgeted sessions, and a low
305
+ // percentage is evidence of spend only when a budget rule exists. Absence
306
+ // means the detector did not run at all (no session).
307
+ budget_remaining_pct?: Long, // Remaining session token budget (0-100)
308
+ budget_exceeded?: Bool, // Session token budget exceeded
273
309
  },
274
310
  };
275
311
 
@@ -392,6 +428,24 @@ action connect_server appliesTo {
392
428
  session_max_pii_score?: Long,
393
429
  session_max_secret_score?: Long,
394
430
  session_cumulative_risk_score?: Long,
431
+ // --- Session Token Budget --- (OWASP LLM10; CAP-ENF-009, cerberus#147)
432
+ // Fed by the cumulative session total the Overwatch daemon reports on the
433
+ // prompt and before-tool events.
434
+ //
435
+ // BOTH are optional, so BOTH need a `has` guard — a bare
436
+ // `context.budget_remaining_pct < 10` fails cedar validation with
437
+ // "unable to guarantee safety of access to optional attribute".
438
+ // Write: `context has budget_remaining_pct && context.budget_remaining_pct < 10`.
439
+ //
440
+ // The guard is a validation requirement, NOT a safety property. Whenever a
441
+ // session loads, budget_checker emits both keys — including
442
+ // budget_exceeded: false and budget_remaining_pct: 100 when no budget rule
443
+ // is configured for the scope. So a grant conditioned on
444
+ // `!context.budget_exceeded` fires on unbudgeted sessions, and a low
445
+ // percentage is evidence of spend only when a budget rule exists. Absence
446
+ // means the detector did not run at all (no session).
447
+ budget_remaining_pct?: Long, // Remaining session token budget (0-100)
448
+ budget_exceeded?: Bool, // Session token budget exceeded
395
449
  },
396
450
  };
397
451
 
@@ -446,6 +500,24 @@ action read_file appliesTo {
446
500
 
447
501
  // --- Agent Security ---
448
502
  indirect_injection_score?: Long, // Indirect injection via file content
503
+ // --- Session Token Budget --- (OWASP LLM10; CAP-ENF-009, cerberus#147)
504
+ // Fed by the cumulative session total the Overwatch daemon reports on the
505
+ // prompt and before-tool events.
506
+ //
507
+ // BOTH are optional, so BOTH need a `has` guard — a bare
508
+ // `context.budget_remaining_pct < 10` fails cedar validation with
509
+ // "unable to guarantee safety of access to optional attribute".
510
+ // Write: `context has budget_remaining_pct && context.budget_remaining_pct < 10`.
511
+ //
512
+ // The guard is a validation requirement, NOT a safety property. Whenever a
513
+ // session loads, budget_checker emits both keys — including
514
+ // budget_exceeded: false and budget_remaining_pct: 100 when no budget rule
515
+ // is configured for the scope. So a grant conditioned on
516
+ // `!context.budget_exceeded` fires on unbudgeted sessions, and a low
517
+ // percentage is evidence of spend only when a budget rule exists. Absence
518
+ // means the detector did not run at all (no session).
519
+ budget_remaining_pct?: Long, // Remaining session token budget (0-100)
520
+ budget_exceeded?: Bool, // Session token budget exceeded
449
521
  },
450
522
  };
451
523
 
@@ -500,6 +572,24 @@ action write_file appliesTo {
500
572
 
501
573
  // --- Agent Security ---
502
574
  indirect_injection_score?: Long, // Indirect injection via file content
575
+ // --- Session Token Budget --- (OWASP LLM10; CAP-ENF-009, cerberus#147)
576
+ // Fed by the cumulative session total the Overwatch daemon reports on the
577
+ // prompt and before-tool events.
578
+ //
579
+ // BOTH are optional, so BOTH need a `has` guard — a bare
580
+ // `context.budget_remaining_pct < 10` fails cedar validation with
581
+ // "unable to guarantee safety of access to optional attribute".
582
+ // Write: `context has budget_remaining_pct && context.budget_remaining_pct < 10`.
583
+ //
584
+ // The guard is a validation requirement, NOT a safety property. Whenever a
585
+ // session loads, budget_checker emits both keys — including
586
+ // budget_exceeded: false and budget_remaining_pct: 100 when no budget rule
587
+ // is configured for the scope. So a grant conditioned on
588
+ // `!context.budget_exceeded` fires on unbudgeted sessions, and a low
589
+ // percentage is evidence of spend only when a budget rule exists. Absence
590
+ // means the detector did not run at all (no session).
591
+ budget_remaining_pct?: Long, // Remaining session token budget (0-100)
592
+ budget_exceeded?: Bool, // Session token budget exceeded
503
593
  },
504
594
  };
505
595