@highflame/policy 2.1.45 → 2.2.1

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.
@@ -40,6 +40,7 @@ export declare const GuardrailsContextKey: {
40
40
  readonly HallucinationScore: "hallucination_score";
41
41
  readonly HateSpeechScore: "hate_speech_score";
42
42
  readonly HighestSeverity: "highest_severity";
43
+ readonly IdentityType: "identity_type";
43
44
  readonly IndirectInjectionScore: "indirect_injection_score";
44
45
  readonly IndirectInjectionType: "indirect_injection_type";
45
46
  readonly InjectionDeepContextScore: "injection_deep_context_score";
@@ -67,6 +68,8 @@ export declare const GuardrailsContextKey: {
67
68
  readonly McpServerVerified: "mcp_server_verified";
68
69
  readonly McpTool: "mcp_tool";
69
70
  readonly MultiTurnDetection: "multi_turn_detection";
71
+ readonly ParamTypeViolation: "param_type_violation";
72
+ readonly ParamTypeViolations: "param_type_violations";
70
73
  readonly Path: "path";
71
74
  readonly PathTraversalDetected: "path_traversal_detected";
72
75
  readonly PathTraversalSeverity: "path_traversal_severity";
@@ -77,6 +80,7 @@ export declare const GuardrailsContextKey: {
77
80
  readonly PiiDetected: "pii_detected";
78
81
  readonly PiiScore: "pii_score";
79
82
  readonly PiiTypes: "pii_types";
83
+ readonly Principal: "principal";
80
84
  readonly PrivilegeScope: "privilege_scope";
81
85
  readonly ProfanityScore: "profanity_score";
82
86
  readonly RequestId: "request_id";
@@ -98,6 +102,8 @@ export declare const GuardrailsContextKey: {
98
102
  readonly SessionMaxJailbreakScore: "session_max_jailbreak_score";
99
103
  readonly SessionMaxPiiScore: "session_max_pii_score";
100
104
  readonly SessionMaxSecretScore: "session_max_secret_score";
105
+ readonly SessionMaxSensitivity: "session_max_sensitivity";
106
+ readonly SessionOriginalRequest: "session_original_request";
101
107
  readonly SessionPiiDetected: "session_pii_detected";
102
108
  readonly SessionPiiTypes: "session_pii_types";
103
109
  readonly SessionSecretTypes: "session_secret_types";
@@ -123,3 +129,8 @@ export declare const GuardrailsContextKey: {
123
129
  readonly WeaponsScore: "weapons_score";
124
130
  };
125
131
  export type GuardrailsContextKey = (typeof GuardrailsContextKey)[keyof typeof GuardrailsContextKey];
132
+ /**
133
+ * The full set of authorable context attribute keys for Guardrails.
134
+ * Iterate this to enumerate the authorable surface (cockpit, conformance).
135
+ */
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"];
@@ -42,6 +42,7 @@ export const GuardrailsContextKey = {
42
42
  HallucinationScore: 'hallucination_score',
43
43
  HateSpeechScore: 'hate_speech_score',
44
44
  HighestSeverity: 'highest_severity',
45
+ IdentityType: 'identity_type',
45
46
  IndirectInjectionScore: 'indirect_injection_score',
46
47
  IndirectInjectionType: 'indirect_injection_type',
47
48
  InjectionDeepContextScore: 'injection_deep_context_score',
@@ -69,6 +70,8 @@ export const GuardrailsContextKey = {
69
70
  McpServerVerified: 'mcp_server_verified',
70
71
  McpTool: 'mcp_tool',
71
72
  MultiTurnDetection: 'multi_turn_detection',
73
+ ParamTypeViolation: 'param_type_violation',
74
+ ParamTypeViolations: 'param_type_violations',
72
75
  Path: 'path',
73
76
  PathTraversalDetected: 'path_traversal_detected',
74
77
  PathTraversalSeverity: 'path_traversal_severity',
@@ -79,6 +82,7 @@ export const GuardrailsContextKey = {
79
82
  PiiDetected: 'pii_detected',
80
83
  PiiScore: 'pii_score',
81
84
  PiiTypes: 'pii_types',
85
+ Principal: 'principal',
82
86
  PrivilegeScope: 'privilege_scope',
83
87
  ProfanityScore: 'profanity_score',
84
88
  RequestId: 'request_id',
@@ -100,6 +104,8 @@ export const GuardrailsContextKey = {
100
104
  SessionMaxJailbreakScore: 'session_max_jailbreak_score',
101
105
  SessionMaxPiiScore: 'session_max_pii_score',
102
106
  SessionMaxSecretScore: 'session_max_secret_score',
107
+ SessionMaxSensitivity: 'session_max_sensitivity',
108
+ SessionOriginalRequest: 'session_original_request',
103
109
  SessionPiiDetected: 'session_pii_detected',
104
110
  SessionPiiTypes: 'session_pii_types',
105
111
  SessionSecretTypes: 'session_secret_types',
@@ -124,3 +130,131 @@ export const GuardrailsContextKey = {
124
130
  ViolenceScore: 'violence_score',
125
131
  WeaponsScore: 'weapons_score',
126
132
  };
133
+ /**
134
+ * The full set of authorable context attribute keys for Guardrails.
135
+ * Iterate this to enumerate the authorable surface (cockpit, conformance).
136
+ */
137
+ export const GuardrailsContextKeys = [
138
+ GuardrailsContextKey.AgentFramework,
139
+ GuardrailsContextKey.AgentId,
140
+ GuardrailsContextKey.AgentPublisher,
141
+ GuardrailsContextKey.AgentTrustLevel,
142
+ GuardrailsContextKey.AgentType,
143
+ GuardrailsContextKey.BudgetExceeded,
144
+ GuardrailsContextKey.BudgetRemainingPct,
145
+ GuardrailsContextKey.CodeLanguages,
146
+ GuardrailsContextKey.CodeRatio,
147
+ GuardrailsContextKey.CommandInjectionDetected,
148
+ GuardrailsContextKey.CommandInjectionScore,
149
+ GuardrailsContextKey.CommandInjectionType,
150
+ GuardrailsContextKey.ContainsCode,
151
+ GuardrailsContextKey.ContainsNonAscii,
152
+ GuardrailsContextKey.ContentSafetyBlocked,
153
+ GuardrailsContextKey.ContentSafetyScore,
154
+ GuardrailsContextKey.ContentTopics,
155
+ GuardrailsContextKey.ContentType,
156
+ GuardrailsContextKey.ConversationTurn,
157
+ GuardrailsContextKey.CrimeScore,
158
+ GuardrailsContextKey.CrossOriginDetected,
159
+ GuardrailsContextKey.CrossOriginScore,
160
+ GuardrailsContextKey.CrossOriginType,
161
+ GuardrailsContextKey.DetectedLanguage,
162
+ GuardrailsContextKey.DetectedScript,
163
+ GuardrailsContextKey.DetectorCount,
164
+ GuardrailsContextKey.Direction,
165
+ GuardrailsContextKey.EncodedContentDetected,
166
+ GuardrailsContextKey.EncodedCount,
167
+ GuardrailsContextKey.EncodedScore,
168
+ GuardrailsContextKey.EncodedTypes,
169
+ GuardrailsContextKey.FactualityScore,
170
+ GuardrailsContextKey.HallucinationScore,
171
+ GuardrailsContextKey.HateSpeechScore,
172
+ GuardrailsContextKey.HighestSeverity,
173
+ GuardrailsContextKey.IdentityType,
174
+ GuardrailsContextKey.IndirectInjectionScore,
175
+ GuardrailsContextKey.IndirectInjectionType,
176
+ GuardrailsContextKey.InjectionDeepContextScore,
177
+ GuardrailsContextKey.InjectionPulseScore,
178
+ GuardrailsContextKey.InjectionScore,
179
+ GuardrailsContextKey.InjectionType,
180
+ GuardrailsContextKey.InvisibleCharsDetected,
181
+ GuardrailsContextKey.InvisibleCharsScore,
182
+ GuardrailsContextKey.IsEnglish,
183
+ GuardrailsContextKey.IsLatinScript,
184
+ GuardrailsContextKey.JailbreakDeepContextScore,
185
+ GuardrailsContextKey.JailbreakPulseScore,
186
+ GuardrailsContextKey.JailbreakScore,
187
+ GuardrailsContextKey.KeywordCategories,
188
+ GuardrailsContextKey.KeywordCount,
189
+ GuardrailsContextKey.KeywordMatched,
190
+ GuardrailsContextKey.LanguageConfidence,
191
+ GuardrailsContextKey.LoopCount,
192
+ GuardrailsContextKey.LoopDetected,
193
+ GuardrailsContextKey.LoopTool,
194
+ GuardrailsContextKey.McpConfigRisk,
195
+ GuardrailsContextKey.McpRiskScore,
196
+ GuardrailsContextKey.McpRiskType,
197
+ GuardrailsContextKey.McpServer,
198
+ GuardrailsContextKey.McpServerVerified,
199
+ GuardrailsContextKey.McpTool,
200
+ GuardrailsContextKey.MultiTurnDetection,
201
+ GuardrailsContextKey.ParamTypeViolation,
202
+ GuardrailsContextKey.ParamTypeViolations,
203
+ GuardrailsContextKey.Path,
204
+ GuardrailsContextKey.PathTraversalDetected,
205
+ GuardrailsContextKey.PathTraversalSeverity,
206
+ GuardrailsContextKey.PathTraversalType,
207
+ GuardrailsContextKey.PatternType,
208
+ GuardrailsContextKey.PhishingDetected,
209
+ GuardrailsContextKey.PiiCount,
210
+ GuardrailsContextKey.PiiDetected,
211
+ GuardrailsContextKey.PiiScore,
212
+ GuardrailsContextKey.PiiTypes,
213
+ GuardrailsContextKey.Principal,
214
+ GuardrailsContextKey.PrivilegeScope,
215
+ GuardrailsContextKey.ProfanityScore,
216
+ GuardrailsContextKey.RequestId,
217
+ GuardrailsContextKey.Role,
218
+ GuardrailsContextKey.RugPullDetected,
219
+ GuardrailsContextKey.RugPullScore,
220
+ GuardrailsContextKey.RugPullType,
221
+ GuardrailsContextKey.ScriptConfidence,
222
+ GuardrailsContextKey.SecretCount,
223
+ GuardrailsContextKey.SecretTypes,
224
+ GuardrailsContextKey.SecretsDetected,
225
+ GuardrailsContextKey.SentimentScore,
226
+ GuardrailsContextKey.SequenceRisk,
227
+ GuardrailsContextKey.SessionCommandInjection,
228
+ GuardrailsContextKey.SessionCumulativeRiskScore,
229
+ GuardrailsContextKey.SessionInjectionDetected,
230
+ GuardrailsContextKey.SessionMaxCommandInjectionScore,
231
+ GuardrailsContextKey.SessionMaxInjectionScore,
232
+ GuardrailsContextKey.SessionMaxJailbreakScore,
233
+ GuardrailsContextKey.SessionMaxPiiScore,
234
+ GuardrailsContextKey.SessionMaxSecretScore,
235
+ GuardrailsContextKey.SessionMaxSensitivity,
236
+ GuardrailsContextKey.SessionOriginalRequest,
237
+ GuardrailsContextKey.SessionPiiDetected,
238
+ GuardrailsContextKey.SessionPiiTypes,
239
+ GuardrailsContextKey.SessionSecretTypes,
240
+ GuardrailsContextKey.SessionSecretsDetected,
241
+ GuardrailsContextKey.SessionThreatTurns,
242
+ GuardrailsContextKey.SexualScore,
243
+ GuardrailsContextKey.SqlInjectionDetected,
244
+ GuardrailsContextKey.SqlInjectionScore,
245
+ GuardrailsContextKey.SqlInjectionType,
246
+ GuardrailsContextKey.SuspiciousPattern,
247
+ GuardrailsContextKey.Timestamp,
248
+ GuardrailsContextKey.ToolCategory,
249
+ GuardrailsContextKey.ToolIsBuiltin,
250
+ GuardrailsContextKey.ToolIsSensitive,
251
+ GuardrailsContextKey.ToolName,
252
+ GuardrailsContextKey.ToolOperationClasses,
253
+ GuardrailsContextKey.ToolPoisoningDetected,
254
+ GuardrailsContextKey.ToolPoisoningScore,
255
+ GuardrailsContextKey.ToolPoisoningType,
256
+ GuardrailsContextKey.ToolRiskScore,
257
+ GuardrailsContextKey.TopicConfidence,
258
+ GuardrailsContextKey.ViolenceScore,
259
+ GuardrailsContextKey.WeaponsScore,
260
+ ];
@@ -0,0 +1,6 @@
1
+ import type { DetectorCard } from './detector-card-types.gen';
2
+ export declare const GUARDRAILS_DETECTOR_SPEC_VERSION = "1.2.0";
3
+ export declare const GUARDRAILS_DETECTORS: readonly DetectorCard[];
4
+ export declare const GUARDRAILS_FIELD_TO_DETECTORS: Readonly<Record<string, readonly string[]>>;
5
+ export declare function guardrailsDetectorById(id: string): DetectorCard | undefined;
6
+ export declare function guardrailsDetectorsForField(field: string): DetectorCard[];