@highflame/policy 2.2.6 → 2.2.8
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/agent_ops/context.json +1676 -0
- package/_schemas/agent_ops/schema.cedarschema +666 -0
- package/_schemas/agent_ops/templates/defaults/baseline.cedar +21 -0
- package/_schemas/agent_ops/templates/templates.json +66 -0
- package/_schemas/ai_gateway/schema.cedarschema +30 -0
- package/_schemas/guardrails/schema.cedarschema +30 -0
- package/dist/agent_ops-context.gen.d.ts +150 -0
- package/dist/agent_ops-context.gen.js +288 -0
- package/dist/agent_ops-defaults.gen.d.ts +64 -0
- package/dist/agent_ops-defaults.gen.js +156 -0
- package/dist/agent_ops-entities.gen.d.ts +11 -0
- package/dist/agent_ops-entities.gen.js +37 -0
- package/dist/guardrails-detectors.gen.js +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4 -1
- package/dist/service-schemas.gen.d.ts +12 -2
- package/dist/service-schemas.gen.js +1165 -1
- package/dist/types.d.ts +5 -1
- package/dist/types.js +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"service": "agent_ops",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AgentOps policy templates — unified agent guardrails for code agents, MCP tools, and AI Gateway traffic",
|
|
5
|
+
"categories": [
|
|
6
|
+
{
|
|
7
|
+
"id": "threat-detection",
|
|
8
|
+
"name": "Threat Detection",
|
|
9
|
+
"description": "Detect and block injection, jailbreak, and adversarial attacks across all agent traffic."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "data-protection",
|
|
13
|
+
"name": "Data Protection",
|
|
14
|
+
"description": "Prevent secrets, PII, and sensitive data from leaking in prompts, responses, or tool calls."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "agent-security",
|
|
18
|
+
"name": "Agent Security",
|
|
19
|
+
"description": "Guard against tool poisoning, rug-pull attacks, and multi-agent delegation abuse."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "tool-permissioning",
|
|
23
|
+
"name": "Tool Permissioning",
|
|
24
|
+
"description": "Allow-list or block-list specific tools, MCP servers, and shell operations by risk tier."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "code-security",
|
|
28
|
+
"name": "Code Security",
|
|
29
|
+
"description": "Enforce safe coding patterns: no exfiltration commands, no destructive write operations."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "content-safety",
|
|
33
|
+
"name": "Content Safety",
|
|
34
|
+
"description": "Block harmful, toxic, or policy-violating content in agent inputs and outputs."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "organization",
|
|
38
|
+
"name": "Organization",
|
|
39
|
+
"description": "Organization-wide baselines and default permit/deny policies."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"defaults": [
|
|
43
|
+
{
|
|
44
|
+
"id": "organization.permit-baseline",
|
|
45
|
+
"name": "Baseline Permit",
|
|
46
|
+
"description": "Permits all AgentOps actions by default; threat-specific forbid policies override this when detectors fire.",
|
|
47
|
+
"category": "organization",
|
|
48
|
+
"file": "defaults/baseline.cedar",
|
|
49
|
+
"severity": "low",
|
|
50
|
+
"tags": ["category:organization", "posture:permit-default"],
|
|
51
|
+
"is_active": true
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"templates": [
|
|
55
|
+
{
|
|
56
|
+
"id": "organization.permit-baseline",
|
|
57
|
+
"name": "Baseline Permit",
|
|
58
|
+
"description": "Permits all AgentOps actions by default; threat-specific forbid policies override this when detectors fire.",
|
|
59
|
+
"category": "organization",
|
|
60
|
+
"file": "defaults/baseline.cedar",
|
|
61
|
+
"severity": "low",
|
|
62
|
+
"tags": ["category:organization", "posture:permit-default"],
|
|
63
|
+
"auto_deploy": true
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -173,6 +173,12 @@ action call_tool appliesTo {
|
|
|
173
173
|
budget_exceeded_session?: Bool,
|
|
174
174
|
budget_exceeded_daily?: Bool,
|
|
175
175
|
budget_exceeded_monthly?: Bool,
|
|
176
|
+
|
|
177
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
178
|
+
rpm_remaining_pct?: Long,
|
|
179
|
+
rpm_exceeded?: Bool,
|
|
180
|
+
tpm_remaining_pct?: Long,
|
|
181
|
+
tpm_exceeded?: Bool,
|
|
176
182
|
},
|
|
177
183
|
};
|
|
178
184
|
|
|
@@ -245,6 +251,12 @@ action connect_server appliesTo {
|
|
|
245
251
|
budget_exceeded_session?: Bool,
|
|
246
252
|
budget_exceeded_daily?: Bool,
|
|
247
253
|
budget_exceeded_monthly?: Bool,
|
|
254
|
+
|
|
255
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
256
|
+
rpm_remaining_pct?: Long,
|
|
257
|
+
rpm_exceeded?: Bool,
|
|
258
|
+
tpm_remaining_pct?: Long,
|
|
259
|
+
tpm_exceeded?: Bool,
|
|
248
260
|
},
|
|
249
261
|
};
|
|
250
262
|
|
|
@@ -326,6 +338,12 @@ action process_prompt appliesTo {
|
|
|
326
338
|
budget_exceeded_session?: Bool,
|
|
327
339
|
budget_exceeded_daily?: Bool,
|
|
328
340
|
budget_exceeded_monthly?: Bool,
|
|
341
|
+
|
|
342
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
343
|
+
rpm_remaining_pct?: Long,
|
|
344
|
+
rpm_exceeded?: Bool,
|
|
345
|
+
tpm_remaining_pct?: Long,
|
|
346
|
+
tpm_exceeded?: Bool,
|
|
329
347
|
},
|
|
330
348
|
};
|
|
331
349
|
|
|
@@ -387,6 +405,12 @@ action read_file appliesTo {
|
|
|
387
405
|
budget_exceeded_session?: Bool,
|
|
388
406
|
budget_exceeded_daily?: Bool,
|
|
389
407
|
budget_exceeded_monthly?: Bool,
|
|
408
|
+
|
|
409
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
410
|
+
rpm_remaining_pct?: Long,
|
|
411
|
+
rpm_exceeded?: Bool,
|
|
412
|
+
tpm_remaining_pct?: Long,
|
|
413
|
+
tpm_exceeded?: Bool,
|
|
390
414
|
},
|
|
391
415
|
};
|
|
392
416
|
|
|
@@ -448,6 +472,12 @@ action write_file appliesTo {
|
|
|
448
472
|
budget_exceeded_session?: Bool,
|
|
449
473
|
budget_exceeded_daily?: Bool,
|
|
450
474
|
budget_exceeded_monthly?: Bool,
|
|
475
|
+
|
|
476
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
477
|
+
rpm_remaining_pct?: Long,
|
|
478
|
+
rpm_exceeded?: Bool,
|
|
479
|
+
tpm_remaining_pct?: Long,
|
|
480
|
+
tpm_exceeded?: Bool,
|
|
451
481
|
},
|
|
452
482
|
};
|
|
453
483
|
|
|
@@ -229,6 +229,12 @@ namespace Guardrails {
|
|
|
229
229
|
"budget_exceeded_daily"?: Bool, // Any daily-scoped budget exceeded
|
|
230
230
|
"budget_exceeded_monthly"?: Bool, // Any monthly-scoped budget exceeded
|
|
231
231
|
|
|
232
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
233
|
+
"rpm_remaining_pct"?: Long,
|
|
234
|
+
"rpm_exceeded"?: Bool,
|
|
235
|
+
"tpm_remaining_pct"?: Long,
|
|
236
|
+
"tpm_exceeded"?: Bool,
|
|
237
|
+
|
|
232
238
|
// Agent Identity — authenticated agent principal metadata (optional)
|
|
233
239
|
// Present when the request is made by an AI agent (API key or JWT with agent claims).
|
|
234
240
|
// Empty strings for human user requests. Use these to write agent-specific policies.
|
|
@@ -315,6 +321,12 @@ namespace Guardrails {
|
|
|
315
321
|
"budget_exceeded_daily"?: Bool,
|
|
316
322
|
"budget_exceeded_monthly"?: Bool,
|
|
317
323
|
|
|
324
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
325
|
+
"rpm_remaining_pct"?: Long,
|
|
326
|
+
"rpm_exceeded"?: Bool,
|
|
327
|
+
"tpm_remaining_pct"?: Long,
|
|
328
|
+
"tpm_exceeded"?: Bool,
|
|
329
|
+
|
|
318
330
|
// Semantic - Topic Classification (optional)
|
|
319
331
|
"content_topics"?: Set<String>, // ["controlled_substances", "weapons_manufacturing", ...]
|
|
320
332
|
"topic_confidence"?: Long, // 0-100
|
|
@@ -468,6 +480,12 @@ namespace Guardrails {
|
|
|
468
480
|
"budget_exceeded_daily"?: Bool,
|
|
469
481
|
"budget_exceeded_monthly"?: Bool,
|
|
470
482
|
|
|
483
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
484
|
+
"rpm_remaining_pct"?: Long,
|
|
485
|
+
"rpm_exceeded"?: Bool,
|
|
486
|
+
"tpm_remaining_pct"?: Long,
|
|
487
|
+
"tpm_exceeded"?: Bool,
|
|
488
|
+
|
|
471
489
|
// Agent Identity — authenticated agent principal metadata (optional)
|
|
472
490
|
"agent_id"?: String,
|
|
473
491
|
"agent_type"?: String,
|
|
@@ -539,6 +557,12 @@ namespace Guardrails {
|
|
|
539
557
|
"budget_exceeded_daily"?: Bool,
|
|
540
558
|
"budget_exceeded_monthly"?: Bool,
|
|
541
559
|
|
|
560
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
561
|
+
"rpm_remaining_pct"?: Long,
|
|
562
|
+
"rpm_exceeded"?: Bool,
|
|
563
|
+
"tpm_remaining_pct"?: Long,
|
|
564
|
+
"tpm_exceeded"?: Bool,
|
|
565
|
+
|
|
542
566
|
// Agent Identity — authenticated agent principal metadata (optional)
|
|
543
567
|
"agent_id"?: String,
|
|
544
568
|
"agent_type"?: String,
|
|
@@ -610,6 +634,12 @@ namespace Guardrails {
|
|
|
610
634
|
"budget_exceeded_daily"?: Bool,
|
|
611
635
|
"budget_exceeded_monthly"?: Bool,
|
|
612
636
|
|
|
637
|
+
// Rate Limiting — gateway-metered, Shield-decided (ADR 0014)
|
|
638
|
+
"rpm_remaining_pct"?: Long,
|
|
639
|
+
"rpm_exceeded"?: Bool,
|
|
640
|
+
"tpm_remaining_pct"?: Long,
|
|
641
|
+
"tpm_exceeded"?: Bool,
|
|
642
|
+
|
|
613
643
|
// Agent Identity — authenticated agent principal metadata (optional)
|
|
614
644
|
"agent_id"?: String,
|
|
615
645
|
"agent_type"?: String,
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context attribute keys for AgentOps AgentOps unified agent guardrail policy enforcement — superset of Guardrails, Overwatch, and AI Gateway.
|
|
3
|
+
*
|
|
4
|
+
* These constants correspond to the context attributes defined in the
|
|
5
|
+
* AgentOps Cedar schema and are used at policy evaluation time.
|
|
6
|
+
*/
|
|
7
|
+
export declare const AgentOpsContextKey: {
|
|
8
|
+
readonly AgentFramework: "agent_framework";
|
|
9
|
+
readonly AgentId: "agent_id";
|
|
10
|
+
readonly AgentPublisher: "agent_publisher";
|
|
11
|
+
readonly AgentTrustLevel: "agent_trust_level";
|
|
12
|
+
readonly AgentType: "agent_type";
|
|
13
|
+
readonly BudgetExceeded: "budget_exceeded";
|
|
14
|
+
readonly BudgetRemainingPct: "budget_remaining_pct";
|
|
15
|
+
readonly CodeLanguages: "code_languages";
|
|
16
|
+
readonly CodeRatio: "code_ratio";
|
|
17
|
+
readonly CommandInjectionDetected: "command_injection_detected";
|
|
18
|
+
readonly CommandInjectionScore: "command_injection_score";
|
|
19
|
+
readonly CommandInjectionType: "command_injection_type";
|
|
20
|
+
readonly ContainsCode: "contains_code";
|
|
21
|
+
readonly ContainsNonAscii: "contains_non_ascii";
|
|
22
|
+
readonly ContentSafetyBlocked: "content_safety_blocked";
|
|
23
|
+
readonly ContentSafetyScore: "content_safety_score";
|
|
24
|
+
readonly ContentTopics: "content_topics";
|
|
25
|
+
readonly ContentType: "content_type";
|
|
26
|
+
readonly ConversationTurn: "conversation_turn";
|
|
27
|
+
readonly CrimeScore: "crime_score";
|
|
28
|
+
readonly CrossOriginDetected: "cross_origin_detected";
|
|
29
|
+
readonly CrossOriginScore: "cross_origin_score";
|
|
30
|
+
readonly CrossOriginType: "cross_origin_type";
|
|
31
|
+
readonly Cwd: "cwd";
|
|
32
|
+
readonly DetectedLanguage: "detected_language";
|
|
33
|
+
readonly DetectedScript: "detected_script";
|
|
34
|
+
readonly DetectedThreats: "detected_threats";
|
|
35
|
+
readonly DetectorCount: "detector_count";
|
|
36
|
+
readonly Direction: "direction";
|
|
37
|
+
readonly EncodedContentDetected: "encoded_content_detected";
|
|
38
|
+
readonly EncodedCount: "encoded_count";
|
|
39
|
+
readonly EncodedScore: "encoded_score";
|
|
40
|
+
readonly EncodedTypes: "encoded_types";
|
|
41
|
+
readonly Event: "event";
|
|
42
|
+
readonly FactualityScore: "factuality_score";
|
|
43
|
+
readonly HallucinationScore: "hallucination_score";
|
|
44
|
+
readonly HateSpeechScore: "hate_speech_score";
|
|
45
|
+
readonly HighestSeverity: "highest_severity";
|
|
46
|
+
readonly IdentityType: "identity_type";
|
|
47
|
+
readonly IndirectInjectionScore: "indirect_injection_score";
|
|
48
|
+
readonly IndirectInjectionType: "indirect_injection_type";
|
|
49
|
+
readonly InjectionDeepContextScore: "injection_deep_context_score";
|
|
50
|
+
readonly InjectionPulseScore: "injection_pulse_score";
|
|
51
|
+
readonly InjectionScore: "injection_score";
|
|
52
|
+
readonly InjectionType: "injection_type";
|
|
53
|
+
readonly InvisibleCharsDetected: "invisible_chars_detected";
|
|
54
|
+
readonly InvisibleCharsScore: "invisible_chars_score";
|
|
55
|
+
readonly IsEnglish: "is_english";
|
|
56
|
+
readonly IsLatinScript: "is_latin_script";
|
|
57
|
+
readonly JailbreakDeepContextScore: "jailbreak_deep_context_score";
|
|
58
|
+
readonly JailbreakPulseScore: "jailbreak_pulse_score";
|
|
59
|
+
readonly JailbreakScore: "jailbreak_score";
|
|
60
|
+
readonly KeywordCategories: "keyword_categories";
|
|
61
|
+
readonly KeywordCount: "keyword_count";
|
|
62
|
+
readonly KeywordMatched: "keyword_matched";
|
|
63
|
+
readonly LanguageConfidence: "language_confidence";
|
|
64
|
+
readonly LoopCount: "loop_count";
|
|
65
|
+
readonly LoopDetected: "loop_detected";
|
|
66
|
+
readonly LoopTool: "loop_tool";
|
|
67
|
+
readonly McpConfigRisk: "mcp_config_risk";
|
|
68
|
+
readonly McpRiskScore: "mcp_risk_score";
|
|
69
|
+
readonly McpRiskType: "mcp_risk_type";
|
|
70
|
+
readonly McpServer: "mcp_server";
|
|
71
|
+
readonly McpServerVerified: "mcp_server_verified";
|
|
72
|
+
readonly McpTool: "mcp_tool";
|
|
73
|
+
readonly ModelName: "model_name";
|
|
74
|
+
readonly ModelProvider: "model_provider";
|
|
75
|
+
readonly MultiTurnDetection: "multi_turn_detection";
|
|
76
|
+
readonly ParamTypeViolation: "param_type_violation";
|
|
77
|
+
readonly ParamTypeViolations: "param_type_violations";
|
|
78
|
+
readonly Path: "path";
|
|
79
|
+
readonly PathTraversalDetected: "path_traversal_detected";
|
|
80
|
+
readonly PathTraversalSeverity: "path_traversal_severity";
|
|
81
|
+
readonly PathTraversalType: "path_traversal_type";
|
|
82
|
+
readonly PatternType: "pattern_type";
|
|
83
|
+
readonly PhishingDetected: "phishing_detected";
|
|
84
|
+
readonly PiiCount: "pii_count";
|
|
85
|
+
readonly PiiDetected: "pii_detected";
|
|
86
|
+
readonly PiiScore: "pii_score";
|
|
87
|
+
readonly PiiTypes: "pii_types";
|
|
88
|
+
readonly Principal: "principal";
|
|
89
|
+
readonly PrivilegeScope: "privilege_scope";
|
|
90
|
+
readonly ProfanityScore: "profanity_score";
|
|
91
|
+
readonly RequestId: "request_id";
|
|
92
|
+
readonly Role: "role";
|
|
93
|
+
readonly RpmExceeded: "rpm_exceeded";
|
|
94
|
+
readonly RpmRemainingPct: "rpm_remaining_pct";
|
|
95
|
+
readonly RugPullDetected: "rug_pull_detected";
|
|
96
|
+
readonly RugPullScore: "rug_pull_score";
|
|
97
|
+
readonly RugPullType: "rug_pull_type";
|
|
98
|
+
readonly ScriptConfidence: "script_confidence";
|
|
99
|
+
readonly SecretCount: "secret_count";
|
|
100
|
+
readonly SecretTypes: "secret_types";
|
|
101
|
+
readonly SecretsDetected: "secrets_detected";
|
|
102
|
+
readonly SentimentScore: "sentiment_score";
|
|
103
|
+
readonly SequenceRisk: "sequence_risk";
|
|
104
|
+
readonly SessionCommandInjection: "session_command_injection";
|
|
105
|
+
readonly SessionCumulativeRiskScore: "session_cumulative_risk_score";
|
|
106
|
+
readonly SessionInjectionDetected: "session_injection_detected";
|
|
107
|
+
readonly SessionMaxCommandInjectionScore: "session_max_command_injection_score";
|
|
108
|
+
readonly SessionMaxInjectionScore: "session_max_injection_score";
|
|
109
|
+
readonly SessionMaxJailbreakScore: "session_max_jailbreak_score";
|
|
110
|
+
readonly SessionMaxPiiScore: "session_max_pii_score";
|
|
111
|
+
readonly SessionMaxSecretScore: "session_max_secret_score";
|
|
112
|
+
readonly SessionMaxSensitivity: "session_max_sensitivity";
|
|
113
|
+
readonly SessionOriginalRequest: "session_original_request";
|
|
114
|
+
readonly SessionPiiDetected: "session_pii_detected";
|
|
115
|
+
readonly SessionPiiTypes: "session_pii_types";
|
|
116
|
+
readonly SessionSecretTypes: "session_secret_types";
|
|
117
|
+
readonly SessionSecretsDetected: "session_secrets_detected";
|
|
118
|
+
readonly SessionThreatTurns: "session_threat_turns";
|
|
119
|
+
readonly SexualScore: "sexual_score";
|
|
120
|
+
readonly Source: "source";
|
|
121
|
+
readonly SqlInjectionDetected: "sql_injection_detected";
|
|
122
|
+
readonly SqlInjectionScore: "sql_injection_score";
|
|
123
|
+
readonly SqlInjectionType: "sql_injection_type";
|
|
124
|
+
readonly SuspiciousPattern: "suspicious_pattern";
|
|
125
|
+
readonly ThreatCategories: "threat_categories";
|
|
126
|
+
readonly ThreatCount: "threat_count";
|
|
127
|
+
readonly Timestamp: "timestamp";
|
|
128
|
+
readonly ToolCategory: "tool_category";
|
|
129
|
+
readonly ToolIsBuiltin: "tool_is_builtin";
|
|
130
|
+
readonly ToolIsSensitive: "tool_is_sensitive";
|
|
131
|
+
readonly ToolName: "tool_name";
|
|
132
|
+
readonly ToolOperationClasses: "tool_operation_classes";
|
|
133
|
+
readonly ToolPoisoningDetected: "tool_poisoning_detected";
|
|
134
|
+
readonly ToolPoisoningScore: "tool_poisoning_score";
|
|
135
|
+
readonly ToolPoisoningType: "tool_poisoning_type";
|
|
136
|
+
readonly ToolRiskScore: "tool_risk_score";
|
|
137
|
+
readonly TopicConfidence: "topic_confidence";
|
|
138
|
+
readonly TpmExceeded: "tpm_exceeded";
|
|
139
|
+
readonly TpmRemainingPct: "tpm_remaining_pct";
|
|
140
|
+
readonly UserEmail: "user_email";
|
|
141
|
+
readonly ViolenceScore: "violence_score";
|
|
142
|
+
readonly WeaponsScore: "weapons_score";
|
|
143
|
+
readonly WorkspaceRoot: "workspace_root";
|
|
144
|
+
};
|
|
145
|
+
export type AgentOpsContextKey = (typeof AgentOpsContextKey)[keyof typeof AgentOpsContextKey];
|
|
146
|
+
/**
|
|
147
|
+
* The full set of authorable context attribute keys for AgentOps.
|
|
148
|
+
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
149
|
+
*/
|
|
150
|
+
export declare const AgentOpsContextKeys: 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", "cwd", "detected_language", "detected_script", "detected_threats", "detector_count", "direction", "encoded_content_detected", "encoded_count", "encoded_score", "encoded_types", "event", "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", "model_name", "model_provider", "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", "source", "sql_injection_detected", "sql_injection_score", "sql_injection_type", "suspicious_pattern", "threat_categories", "threat_count", "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", "user_email", "violence_score", "weapons_score", "workspace_root"];
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
// Code generated by highflame-policy-codegen. DO NOT EDIT.
|
|
2
|
+
// Source: schemas/agent_ops/context.json
|
|
3
|
+
/**
|
|
4
|
+
* Context attribute keys for AgentOps AgentOps unified agent guardrail policy enforcement — superset of Guardrails, Overwatch, and AI Gateway.
|
|
5
|
+
*
|
|
6
|
+
* These constants correspond to the context attributes defined in the
|
|
7
|
+
* AgentOps Cedar schema and are used at policy evaluation time.
|
|
8
|
+
*/
|
|
9
|
+
export const AgentOpsContextKey = {
|
|
10
|
+
AgentFramework: 'agent_framework',
|
|
11
|
+
AgentId: 'agent_id',
|
|
12
|
+
AgentPublisher: 'agent_publisher',
|
|
13
|
+
AgentTrustLevel: 'agent_trust_level',
|
|
14
|
+
AgentType: 'agent_type',
|
|
15
|
+
BudgetExceeded: 'budget_exceeded',
|
|
16
|
+
BudgetRemainingPct: 'budget_remaining_pct',
|
|
17
|
+
CodeLanguages: 'code_languages',
|
|
18
|
+
CodeRatio: 'code_ratio',
|
|
19
|
+
CommandInjectionDetected: 'command_injection_detected',
|
|
20
|
+
CommandInjectionScore: 'command_injection_score',
|
|
21
|
+
CommandInjectionType: 'command_injection_type',
|
|
22
|
+
ContainsCode: 'contains_code',
|
|
23
|
+
ContainsNonAscii: 'contains_non_ascii',
|
|
24
|
+
ContentSafetyBlocked: 'content_safety_blocked',
|
|
25
|
+
ContentSafetyScore: 'content_safety_score',
|
|
26
|
+
ContentTopics: 'content_topics',
|
|
27
|
+
ContentType: 'content_type',
|
|
28
|
+
ConversationTurn: 'conversation_turn',
|
|
29
|
+
CrimeScore: 'crime_score',
|
|
30
|
+
CrossOriginDetected: 'cross_origin_detected',
|
|
31
|
+
CrossOriginScore: 'cross_origin_score',
|
|
32
|
+
CrossOriginType: 'cross_origin_type',
|
|
33
|
+
Cwd: 'cwd',
|
|
34
|
+
DetectedLanguage: 'detected_language',
|
|
35
|
+
DetectedScript: 'detected_script',
|
|
36
|
+
DetectedThreats: 'detected_threats',
|
|
37
|
+
DetectorCount: 'detector_count',
|
|
38
|
+
Direction: 'direction',
|
|
39
|
+
EncodedContentDetected: 'encoded_content_detected',
|
|
40
|
+
EncodedCount: 'encoded_count',
|
|
41
|
+
EncodedScore: 'encoded_score',
|
|
42
|
+
EncodedTypes: 'encoded_types',
|
|
43
|
+
Event: 'event',
|
|
44
|
+
FactualityScore: 'factuality_score',
|
|
45
|
+
HallucinationScore: 'hallucination_score',
|
|
46
|
+
HateSpeechScore: 'hate_speech_score',
|
|
47
|
+
HighestSeverity: 'highest_severity',
|
|
48
|
+
IdentityType: 'identity_type',
|
|
49
|
+
IndirectInjectionScore: 'indirect_injection_score',
|
|
50
|
+
IndirectInjectionType: 'indirect_injection_type',
|
|
51
|
+
InjectionDeepContextScore: 'injection_deep_context_score',
|
|
52
|
+
InjectionPulseScore: 'injection_pulse_score',
|
|
53
|
+
InjectionScore: 'injection_score',
|
|
54
|
+
InjectionType: 'injection_type',
|
|
55
|
+
InvisibleCharsDetected: 'invisible_chars_detected',
|
|
56
|
+
InvisibleCharsScore: 'invisible_chars_score',
|
|
57
|
+
IsEnglish: 'is_english',
|
|
58
|
+
IsLatinScript: 'is_latin_script',
|
|
59
|
+
JailbreakDeepContextScore: 'jailbreak_deep_context_score',
|
|
60
|
+
JailbreakPulseScore: 'jailbreak_pulse_score',
|
|
61
|
+
JailbreakScore: 'jailbreak_score',
|
|
62
|
+
KeywordCategories: 'keyword_categories',
|
|
63
|
+
KeywordCount: 'keyword_count',
|
|
64
|
+
KeywordMatched: 'keyword_matched',
|
|
65
|
+
LanguageConfidence: 'language_confidence',
|
|
66
|
+
LoopCount: 'loop_count',
|
|
67
|
+
LoopDetected: 'loop_detected',
|
|
68
|
+
LoopTool: 'loop_tool',
|
|
69
|
+
McpConfigRisk: 'mcp_config_risk',
|
|
70
|
+
McpRiskScore: 'mcp_risk_score',
|
|
71
|
+
McpRiskType: 'mcp_risk_type',
|
|
72
|
+
McpServer: 'mcp_server',
|
|
73
|
+
McpServerVerified: 'mcp_server_verified',
|
|
74
|
+
McpTool: 'mcp_tool',
|
|
75
|
+
ModelName: 'model_name',
|
|
76
|
+
ModelProvider: 'model_provider',
|
|
77
|
+
MultiTurnDetection: 'multi_turn_detection',
|
|
78
|
+
ParamTypeViolation: 'param_type_violation',
|
|
79
|
+
ParamTypeViolations: 'param_type_violations',
|
|
80
|
+
Path: 'path',
|
|
81
|
+
PathTraversalDetected: 'path_traversal_detected',
|
|
82
|
+
PathTraversalSeverity: 'path_traversal_severity',
|
|
83
|
+
PathTraversalType: 'path_traversal_type',
|
|
84
|
+
PatternType: 'pattern_type',
|
|
85
|
+
PhishingDetected: 'phishing_detected',
|
|
86
|
+
PiiCount: 'pii_count',
|
|
87
|
+
PiiDetected: 'pii_detected',
|
|
88
|
+
PiiScore: 'pii_score',
|
|
89
|
+
PiiTypes: 'pii_types',
|
|
90
|
+
Principal: 'principal',
|
|
91
|
+
PrivilegeScope: 'privilege_scope',
|
|
92
|
+
ProfanityScore: 'profanity_score',
|
|
93
|
+
RequestId: 'request_id',
|
|
94
|
+
Role: 'role',
|
|
95
|
+
RpmExceeded: 'rpm_exceeded',
|
|
96
|
+
RpmRemainingPct: 'rpm_remaining_pct',
|
|
97
|
+
RugPullDetected: 'rug_pull_detected',
|
|
98
|
+
RugPullScore: 'rug_pull_score',
|
|
99
|
+
RugPullType: 'rug_pull_type',
|
|
100
|
+
ScriptConfidence: 'script_confidence',
|
|
101
|
+
SecretCount: 'secret_count',
|
|
102
|
+
SecretTypes: 'secret_types',
|
|
103
|
+
SecretsDetected: 'secrets_detected',
|
|
104
|
+
SentimentScore: 'sentiment_score',
|
|
105
|
+
SequenceRisk: 'sequence_risk',
|
|
106
|
+
SessionCommandInjection: 'session_command_injection',
|
|
107
|
+
SessionCumulativeRiskScore: 'session_cumulative_risk_score',
|
|
108
|
+
SessionInjectionDetected: 'session_injection_detected',
|
|
109
|
+
SessionMaxCommandInjectionScore: 'session_max_command_injection_score',
|
|
110
|
+
SessionMaxInjectionScore: 'session_max_injection_score',
|
|
111
|
+
SessionMaxJailbreakScore: 'session_max_jailbreak_score',
|
|
112
|
+
SessionMaxPiiScore: 'session_max_pii_score',
|
|
113
|
+
SessionMaxSecretScore: 'session_max_secret_score',
|
|
114
|
+
SessionMaxSensitivity: 'session_max_sensitivity',
|
|
115
|
+
SessionOriginalRequest: 'session_original_request',
|
|
116
|
+
SessionPiiDetected: 'session_pii_detected',
|
|
117
|
+
SessionPiiTypes: 'session_pii_types',
|
|
118
|
+
SessionSecretTypes: 'session_secret_types',
|
|
119
|
+
SessionSecretsDetected: 'session_secrets_detected',
|
|
120
|
+
SessionThreatTurns: 'session_threat_turns',
|
|
121
|
+
SexualScore: 'sexual_score',
|
|
122
|
+
Source: 'source',
|
|
123
|
+
SqlInjectionDetected: 'sql_injection_detected',
|
|
124
|
+
SqlInjectionScore: 'sql_injection_score',
|
|
125
|
+
SqlInjectionType: 'sql_injection_type',
|
|
126
|
+
SuspiciousPattern: 'suspicious_pattern',
|
|
127
|
+
ThreatCategories: 'threat_categories',
|
|
128
|
+
ThreatCount: 'threat_count',
|
|
129
|
+
Timestamp: 'timestamp',
|
|
130
|
+
ToolCategory: 'tool_category',
|
|
131
|
+
ToolIsBuiltin: 'tool_is_builtin',
|
|
132
|
+
ToolIsSensitive: 'tool_is_sensitive',
|
|
133
|
+
ToolName: 'tool_name',
|
|
134
|
+
ToolOperationClasses: 'tool_operation_classes',
|
|
135
|
+
ToolPoisoningDetected: 'tool_poisoning_detected',
|
|
136
|
+
ToolPoisoningScore: 'tool_poisoning_score',
|
|
137
|
+
ToolPoisoningType: 'tool_poisoning_type',
|
|
138
|
+
ToolRiskScore: 'tool_risk_score',
|
|
139
|
+
TopicConfidence: 'topic_confidence',
|
|
140
|
+
TpmExceeded: 'tpm_exceeded',
|
|
141
|
+
TpmRemainingPct: 'tpm_remaining_pct',
|
|
142
|
+
UserEmail: 'user_email',
|
|
143
|
+
ViolenceScore: 'violence_score',
|
|
144
|
+
WeaponsScore: 'weapons_score',
|
|
145
|
+
WorkspaceRoot: 'workspace_root',
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* The full set of authorable context attribute keys for AgentOps.
|
|
149
|
+
* Iterate this to enumerate the authorable surface (cockpit, conformance).
|
|
150
|
+
*/
|
|
151
|
+
export const AgentOpsContextKeys = [
|
|
152
|
+
AgentOpsContextKey.AgentFramework,
|
|
153
|
+
AgentOpsContextKey.AgentId,
|
|
154
|
+
AgentOpsContextKey.AgentPublisher,
|
|
155
|
+
AgentOpsContextKey.AgentTrustLevel,
|
|
156
|
+
AgentOpsContextKey.AgentType,
|
|
157
|
+
AgentOpsContextKey.BudgetExceeded,
|
|
158
|
+
AgentOpsContextKey.BudgetRemainingPct,
|
|
159
|
+
AgentOpsContextKey.CodeLanguages,
|
|
160
|
+
AgentOpsContextKey.CodeRatio,
|
|
161
|
+
AgentOpsContextKey.CommandInjectionDetected,
|
|
162
|
+
AgentOpsContextKey.CommandInjectionScore,
|
|
163
|
+
AgentOpsContextKey.CommandInjectionType,
|
|
164
|
+
AgentOpsContextKey.ContainsCode,
|
|
165
|
+
AgentOpsContextKey.ContainsNonAscii,
|
|
166
|
+
AgentOpsContextKey.ContentSafetyBlocked,
|
|
167
|
+
AgentOpsContextKey.ContentSafetyScore,
|
|
168
|
+
AgentOpsContextKey.ContentTopics,
|
|
169
|
+
AgentOpsContextKey.ContentType,
|
|
170
|
+
AgentOpsContextKey.ConversationTurn,
|
|
171
|
+
AgentOpsContextKey.CrimeScore,
|
|
172
|
+
AgentOpsContextKey.CrossOriginDetected,
|
|
173
|
+
AgentOpsContextKey.CrossOriginScore,
|
|
174
|
+
AgentOpsContextKey.CrossOriginType,
|
|
175
|
+
AgentOpsContextKey.Cwd,
|
|
176
|
+
AgentOpsContextKey.DetectedLanguage,
|
|
177
|
+
AgentOpsContextKey.DetectedScript,
|
|
178
|
+
AgentOpsContextKey.DetectedThreats,
|
|
179
|
+
AgentOpsContextKey.DetectorCount,
|
|
180
|
+
AgentOpsContextKey.Direction,
|
|
181
|
+
AgentOpsContextKey.EncodedContentDetected,
|
|
182
|
+
AgentOpsContextKey.EncodedCount,
|
|
183
|
+
AgentOpsContextKey.EncodedScore,
|
|
184
|
+
AgentOpsContextKey.EncodedTypes,
|
|
185
|
+
AgentOpsContextKey.Event,
|
|
186
|
+
AgentOpsContextKey.FactualityScore,
|
|
187
|
+
AgentOpsContextKey.HallucinationScore,
|
|
188
|
+
AgentOpsContextKey.HateSpeechScore,
|
|
189
|
+
AgentOpsContextKey.HighestSeverity,
|
|
190
|
+
AgentOpsContextKey.IdentityType,
|
|
191
|
+
AgentOpsContextKey.IndirectInjectionScore,
|
|
192
|
+
AgentOpsContextKey.IndirectInjectionType,
|
|
193
|
+
AgentOpsContextKey.InjectionDeepContextScore,
|
|
194
|
+
AgentOpsContextKey.InjectionPulseScore,
|
|
195
|
+
AgentOpsContextKey.InjectionScore,
|
|
196
|
+
AgentOpsContextKey.InjectionType,
|
|
197
|
+
AgentOpsContextKey.InvisibleCharsDetected,
|
|
198
|
+
AgentOpsContextKey.InvisibleCharsScore,
|
|
199
|
+
AgentOpsContextKey.IsEnglish,
|
|
200
|
+
AgentOpsContextKey.IsLatinScript,
|
|
201
|
+
AgentOpsContextKey.JailbreakDeepContextScore,
|
|
202
|
+
AgentOpsContextKey.JailbreakPulseScore,
|
|
203
|
+
AgentOpsContextKey.JailbreakScore,
|
|
204
|
+
AgentOpsContextKey.KeywordCategories,
|
|
205
|
+
AgentOpsContextKey.KeywordCount,
|
|
206
|
+
AgentOpsContextKey.KeywordMatched,
|
|
207
|
+
AgentOpsContextKey.LanguageConfidence,
|
|
208
|
+
AgentOpsContextKey.LoopCount,
|
|
209
|
+
AgentOpsContextKey.LoopDetected,
|
|
210
|
+
AgentOpsContextKey.LoopTool,
|
|
211
|
+
AgentOpsContextKey.McpConfigRisk,
|
|
212
|
+
AgentOpsContextKey.McpRiskScore,
|
|
213
|
+
AgentOpsContextKey.McpRiskType,
|
|
214
|
+
AgentOpsContextKey.McpServer,
|
|
215
|
+
AgentOpsContextKey.McpServerVerified,
|
|
216
|
+
AgentOpsContextKey.McpTool,
|
|
217
|
+
AgentOpsContextKey.ModelName,
|
|
218
|
+
AgentOpsContextKey.ModelProvider,
|
|
219
|
+
AgentOpsContextKey.MultiTurnDetection,
|
|
220
|
+
AgentOpsContextKey.ParamTypeViolation,
|
|
221
|
+
AgentOpsContextKey.ParamTypeViolations,
|
|
222
|
+
AgentOpsContextKey.Path,
|
|
223
|
+
AgentOpsContextKey.PathTraversalDetected,
|
|
224
|
+
AgentOpsContextKey.PathTraversalSeverity,
|
|
225
|
+
AgentOpsContextKey.PathTraversalType,
|
|
226
|
+
AgentOpsContextKey.PatternType,
|
|
227
|
+
AgentOpsContextKey.PhishingDetected,
|
|
228
|
+
AgentOpsContextKey.PiiCount,
|
|
229
|
+
AgentOpsContextKey.PiiDetected,
|
|
230
|
+
AgentOpsContextKey.PiiScore,
|
|
231
|
+
AgentOpsContextKey.PiiTypes,
|
|
232
|
+
AgentOpsContextKey.Principal,
|
|
233
|
+
AgentOpsContextKey.PrivilegeScope,
|
|
234
|
+
AgentOpsContextKey.ProfanityScore,
|
|
235
|
+
AgentOpsContextKey.RequestId,
|
|
236
|
+
AgentOpsContextKey.Role,
|
|
237
|
+
AgentOpsContextKey.RpmExceeded,
|
|
238
|
+
AgentOpsContextKey.RpmRemainingPct,
|
|
239
|
+
AgentOpsContextKey.RugPullDetected,
|
|
240
|
+
AgentOpsContextKey.RugPullScore,
|
|
241
|
+
AgentOpsContextKey.RugPullType,
|
|
242
|
+
AgentOpsContextKey.ScriptConfidence,
|
|
243
|
+
AgentOpsContextKey.SecretCount,
|
|
244
|
+
AgentOpsContextKey.SecretTypes,
|
|
245
|
+
AgentOpsContextKey.SecretsDetected,
|
|
246
|
+
AgentOpsContextKey.SentimentScore,
|
|
247
|
+
AgentOpsContextKey.SequenceRisk,
|
|
248
|
+
AgentOpsContextKey.SessionCommandInjection,
|
|
249
|
+
AgentOpsContextKey.SessionCumulativeRiskScore,
|
|
250
|
+
AgentOpsContextKey.SessionInjectionDetected,
|
|
251
|
+
AgentOpsContextKey.SessionMaxCommandInjectionScore,
|
|
252
|
+
AgentOpsContextKey.SessionMaxInjectionScore,
|
|
253
|
+
AgentOpsContextKey.SessionMaxJailbreakScore,
|
|
254
|
+
AgentOpsContextKey.SessionMaxPiiScore,
|
|
255
|
+
AgentOpsContextKey.SessionMaxSecretScore,
|
|
256
|
+
AgentOpsContextKey.SessionMaxSensitivity,
|
|
257
|
+
AgentOpsContextKey.SessionOriginalRequest,
|
|
258
|
+
AgentOpsContextKey.SessionPiiDetected,
|
|
259
|
+
AgentOpsContextKey.SessionPiiTypes,
|
|
260
|
+
AgentOpsContextKey.SessionSecretTypes,
|
|
261
|
+
AgentOpsContextKey.SessionSecretsDetected,
|
|
262
|
+
AgentOpsContextKey.SessionThreatTurns,
|
|
263
|
+
AgentOpsContextKey.SexualScore,
|
|
264
|
+
AgentOpsContextKey.Source,
|
|
265
|
+
AgentOpsContextKey.SqlInjectionDetected,
|
|
266
|
+
AgentOpsContextKey.SqlInjectionScore,
|
|
267
|
+
AgentOpsContextKey.SqlInjectionType,
|
|
268
|
+
AgentOpsContextKey.SuspiciousPattern,
|
|
269
|
+
AgentOpsContextKey.ThreatCategories,
|
|
270
|
+
AgentOpsContextKey.ThreatCount,
|
|
271
|
+
AgentOpsContextKey.Timestamp,
|
|
272
|
+
AgentOpsContextKey.ToolCategory,
|
|
273
|
+
AgentOpsContextKey.ToolIsBuiltin,
|
|
274
|
+
AgentOpsContextKey.ToolIsSensitive,
|
|
275
|
+
AgentOpsContextKey.ToolName,
|
|
276
|
+
AgentOpsContextKey.ToolOperationClasses,
|
|
277
|
+
AgentOpsContextKey.ToolPoisoningDetected,
|
|
278
|
+
AgentOpsContextKey.ToolPoisoningScore,
|
|
279
|
+
AgentOpsContextKey.ToolPoisoningType,
|
|
280
|
+
AgentOpsContextKey.ToolRiskScore,
|
|
281
|
+
AgentOpsContextKey.TopicConfidence,
|
|
282
|
+
AgentOpsContextKey.TpmExceeded,
|
|
283
|
+
AgentOpsContextKey.TpmRemainingPct,
|
|
284
|
+
AgentOpsContextKey.UserEmail,
|
|
285
|
+
AgentOpsContextKey.ViolenceScore,
|
|
286
|
+
AgentOpsContextKey.WeaponsScore,
|
|
287
|
+
AgentOpsContextKey.WorkspaceRoot,
|
|
288
|
+
];
|