@highflame/policy 2.1.41 → 2.1.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.
- package/_schemas/ai_gateway/context.json +60 -0
- package/_schemas/ai_gateway/schema.cedarschema +15 -0
- package/_schemas/guardrails/context.json +60 -0
- package/_schemas/guardrails/schema.cedarschema +15 -0
- package/_schemas/overwatch/context.json +60 -0
- package/_schemas/overwatch/schema.cedarschema +15 -0
- package/_schemas/sentry/context.json +48 -0
- package/_schemas/sentry/schema.cedarschema +12 -0
- package/dist/aarm-annotation.d.ts +120 -0
- package/dist/aarm-annotation.js +494 -0
- package/dist/aarm-annotations.gen.js +1 -1
- package/dist/ai_gateway-context.gen.d.ts +2 -0
- package/dist/ai_gateway-context.gen.js +2 -0
- package/dist/guardrails-context.gen.d.ts +2 -0
- package/dist/guardrails-context.gen.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/overwatch-context.gen.d.ts +2 -0
- package/dist/overwatch-context.gen.js +2 -0
- package/dist/sentry-context.gen.d.ts +2 -0
- package/dist/sentry-context.gen.js +2 -0
- package/dist/service-schemas.gen.d.ts +4 -4
- package/dist/service-schemas.gen.js +95 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +3 -0
- package/package.json +1 -1
|
@@ -90,6 +90,9 @@ action call_tool appliesTo {
|
|
|
90
90
|
principal: [User, MCP_Client],
|
|
91
91
|
resource: [Tool],
|
|
92
92
|
context: {
|
|
93
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
94
|
+
role?: String,
|
|
95
|
+
privilege_scope?: Set<String>,
|
|
93
96
|
// --- Content ---
|
|
94
97
|
content: String, // Raw content being scanned
|
|
95
98
|
|
|
@@ -196,6 +199,9 @@ action connect_server appliesTo {
|
|
|
196
199
|
principal: [User, MCP_Client],
|
|
197
200
|
resource: [Server],
|
|
198
201
|
context: {
|
|
202
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
203
|
+
role?: String,
|
|
204
|
+
privilege_scope?: Set<String>,
|
|
199
205
|
content?: String, // Server config content (if available)
|
|
200
206
|
mcp_server?: String,
|
|
201
207
|
|
|
@@ -265,6 +271,9 @@ action process_prompt appliesTo {
|
|
|
265
271
|
principal: [User, MCP_Client],
|
|
266
272
|
resource: [LlmPrompt],
|
|
267
273
|
context: {
|
|
274
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
275
|
+
role?: String,
|
|
276
|
+
privilege_scope?: Set<String>,
|
|
268
277
|
content: String,
|
|
269
278
|
mcp_server?: String,
|
|
270
279
|
|
|
@@ -343,6 +352,9 @@ action read_file appliesTo {
|
|
|
343
352
|
principal: [User, MCP_Client],
|
|
344
353
|
resource: [FilePath],
|
|
345
354
|
context: {
|
|
355
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
356
|
+
role?: String,
|
|
357
|
+
privilege_scope?: Set<String>,
|
|
346
358
|
content: String,
|
|
347
359
|
mcp_server?: String,
|
|
348
360
|
|
|
@@ -401,6 +413,9 @@ action write_file appliesTo {
|
|
|
401
413
|
principal: [User, MCP_Client],
|
|
402
414
|
resource: [FilePath],
|
|
403
415
|
context: {
|
|
416
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
417
|
+
role?: String,
|
|
418
|
+
privilege_scope?: Set<String>,
|
|
404
419
|
content: String,
|
|
405
420
|
mcp_server?: String,
|
|
406
421
|
|
|
@@ -558,6 +573,9 @@ namespace Guardrails {
|
|
|
558
573
|
|
|
559
574
|
/// Context for process_prompt action (user prompts & AI responses)
|
|
560
575
|
type ProcessPromptContext = {
|
|
576
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
577
|
+
"role"?: String,
|
|
578
|
+
"privilege_scope"?: Set<String>,
|
|
561
579
|
// Core metadata (required)
|
|
562
580
|
"request_id": String,
|
|
563
581
|
"timestamp": Long,
|
|
@@ -697,6 +715,9 @@ namespace Guardrails {
|
|
|
697
715
|
|
|
698
716
|
/// Context for call_tool action (agentic tool execution)
|
|
699
717
|
type CallToolContext = {
|
|
718
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
719
|
+
"role"?: String,
|
|
720
|
+
"privilege_scope"?: Set<String>,
|
|
700
721
|
// Core metadata (required)
|
|
701
722
|
"request_id": String,
|
|
702
723
|
"timestamp": Long,
|
|
@@ -833,6 +854,9 @@ namespace Guardrails {
|
|
|
833
854
|
|
|
834
855
|
/// Context for read_file action
|
|
835
856
|
type FileReadContext = {
|
|
857
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
858
|
+
"role"?: String,
|
|
859
|
+
"privilege_scope"?: Set<String>,
|
|
836
860
|
// Core metadata (required)
|
|
837
861
|
"request_id": String,
|
|
838
862
|
"timestamp": Long,
|
|
@@ -893,6 +917,9 @@ namespace Guardrails {
|
|
|
893
917
|
|
|
894
918
|
/// Context for write_file action
|
|
895
919
|
type FileWriteContext = {
|
|
920
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
921
|
+
"role"?: String,
|
|
922
|
+
"privilege_scope"?: Set<String>,
|
|
896
923
|
// Core metadata (required)
|
|
897
924
|
"request_id": String,
|
|
898
925
|
"timestamp": Long,
|
|
@@ -957,6 +984,9 @@ namespace Guardrails {
|
|
|
957
984
|
|
|
958
985
|
/// Context for connect_server action (MCP server connections)
|
|
959
986
|
type ConnectServerContext = {
|
|
987
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
988
|
+
"role"?: String,
|
|
989
|
+
"privilege_scope"?: Set<String>,
|
|
960
990
|
// Core metadata (required)
|
|
961
991
|
"request_id": String,
|
|
962
992
|
"timestamp": Long,
|
|
@@ -1106,6 +1136,9 @@ action process_prompt appliesTo {
|
|
|
1106
1136
|
principal: [User, Agent],
|
|
1107
1137
|
resource: [LlmPrompt],
|
|
1108
1138
|
context: {
|
|
1139
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1140
|
+
role?: String,
|
|
1141
|
+
privilege_scope?: Set<String>,
|
|
1109
1142
|
// --- Event & Source ---
|
|
1110
1143
|
content: String, // Raw content being scanned
|
|
1111
1144
|
source: String, // IDE source: "cursor", "claudecode", "github_copilot"
|
|
@@ -1184,6 +1217,9 @@ action call_tool appliesTo {
|
|
|
1184
1217
|
principal: [User, Agent],
|
|
1185
1218
|
resource: [Tool, FilePath],
|
|
1186
1219
|
context: {
|
|
1220
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1221
|
+
role?: String,
|
|
1222
|
+
privilege_scope?: Set<String>,
|
|
1187
1223
|
// --- Event & Source ---
|
|
1188
1224
|
content: String, // Raw content being scanned (e.g., shell command, tool args)
|
|
1189
1225
|
source: String, // IDE source
|
|
@@ -1293,6 +1329,9 @@ action connect_server appliesTo {
|
|
|
1293
1329
|
principal: [User, Agent],
|
|
1294
1330
|
resource: [Server],
|
|
1295
1331
|
context: {
|
|
1332
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1333
|
+
role?: String,
|
|
1334
|
+
privilege_scope?: Set<String>,
|
|
1296
1335
|
content?: String, // Server config content (if available)
|
|
1297
1336
|
source: String,
|
|
1298
1337
|
event: String,
|
|
@@ -1340,6 +1379,9 @@ action read_file appliesTo {
|
|
|
1340
1379
|
principal: [User, Agent],
|
|
1341
1380
|
resource: [FilePath],
|
|
1342
1381
|
context: {
|
|
1382
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1383
|
+
role?: String,
|
|
1384
|
+
privilege_scope?: Set<String>,
|
|
1343
1385
|
content: String,
|
|
1344
1386
|
source: String,
|
|
1345
1387
|
event: String,
|
|
@@ -1391,6 +1433,9 @@ action write_file appliesTo {
|
|
|
1391
1433
|
principal: [User, Agent],
|
|
1392
1434
|
resource: [FilePath],
|
|
1393
1435
|
context: {
|
|
1436
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1437
|
+
role?: String,
|
|
1438
|
+
privilege_scope?: Set<String>,
|
|
1394
1439
|
content: String,
|
|
1395
1440
|
source: String,
|
|
1396
1441
|
event: String,
|
|
@@ -1697,6 +1742,9 @@ action process_prompt appliesTo {
|
|
|
1697
1742
|
principal: [User],
|
|
1698
1743
|
resource: [ChatSession],
|
|
1699
1744
|
context: {
|
|
1745
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1746
|
+
role?: String,
|
|
1747
|
+
privilege_scope?: Set<String>,
|
|
1700
1748
|
// --- Core Metadata ---
|
|
1701
1749
|
content: String, // Raw message content being sent
|
|
1702
1750
|
source: String, // Browser extension identifier: "sentry"
|
|
@@ -1784,6 +1832,9 @@ action receive_response appliesTo {
|
|
|
1784
1832
|
principal: [User],
|
|
1785
1833
|
resource: [ChatSession],
|
|
1786
1834
|
context: {
|
|
1835
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1836
|
+
role?: String,
|
|
1837
|
+
privilege_scope?: Set<String>,
|
|
1787
1838
|
// --- Core Metadata ---
|
|
1788
1839
|
content: String, // AI response content
|
|
1789
1840
|
source: String,
|
|
@@ -1850,6 +1901,9 @@ action paste_content appliesTo {
|
|
|
1850
1901
|
principal: [User],
|
|
1851
1902
|
resource: [ChatSession, Document],
|
|
1852
1903
|
context: {
|
|
1904
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1905
|
+
role?: String,
|
|
1906
|
+
privilege_scope?: Set<String>,
|
|
1853
1907
|
// --- Core Metadata ---
|
|
1854
1908
|
content: String, // Pasted content
|
|
1855
1909
|
source: String,
|
|
@@ -1927,6 +1981,9 @@ action upload_file appliesTo {
|
|
|
1927
1981
|
principal: [User],
|
|
1928
1982
|
resource: [Document, ChatSession],
|
|
1929
1983
|
context: {
|
|
1984
|
+
// Identity (AARM R6 / CAP-IDN-011) — projected from the principal's token; optional.
|
|
1985
|
+
role?: String,
|
|
1986
|
+
privilege_scope?: Set<String>,
|
|
1930
1987
|
// --- Core Metadata ---
|
|
1931
1988
|
content: String, // Extracted file text content (for scanning)
|
|
1932
1989
|
source: String,
|
|
@@ -2018,6 +2075,8 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
2018
2075
|
"name": "call_tool",
|
|
2019
2076
|
"description": "Call an MCP tool — threat focus: command injection, tool poisoning, rug pull, secrets, PII",
|
|
2020
2077
|
"context_attributes": [
|
|
2078
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2079
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2021
2080
|
{ "key": "content", "type": "string", "required": true, "description": "Raw content being scanned" },
|
|
2022
2081
|
{ "key": "tool_name", "type": "string", "required": false, "description": "Tool name" },
|
|
2023
2082
|
{ "key": "mcp_server", "type": "string", "required": false, "description": "MCP server name" },
|
|
@@ -2079,6 +2138,8 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
2079
2138
|
"name": "connect_server",
|
|
2080
2139
|
"description": "Connect to an MCP server — threat focus: supply chain, tool poisoning, config risk",
|
|
2081
2140
|
"context_attributes": [
|
|
2141
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2142
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2082
2143
|
{ "key": "content", "type": "string", "required": false, "description": "Server config content" },
|
|
2083
2144
|
{ "key": "mcp_server", "type": "string", "required": false, "description": "MCP server name" },
|
|
2084
2145
|
{ "key": "threat_count", "type": "number", "required": false, "description": "Total threats detected" },
|
|
@@ -2119,6 +2180,8 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
2119
2180
|
"name": "process_prompt",
|
|
2120
2181
|
"description": "Process a prompt (MCP or LLM chat completion) — threat focus: injection, jailbreak, secrets, PII, content safety",
|
|
2121
2182
|
"context_attributes": [
|
|
2183
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2184
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2122
2185
|
{ "key": "content", "type": "string", "required": true, "description": "Raw content being scanned" },
|
|
2123
2186
|
{ "key": "mcp_server", "type": "string", "required": false, "description": "MCP server name" },
|
|
2124
2187
|
{ "key": "threat_count", "type": "number", "required": false, "description": "Total threats detected" },
|
|
@@ -2164,6 +2227,8 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
2164
2227
|
"name": "read_file",
|
|
2165
2228
|
"description": "Read an MCP resource — threat focus: secrets exposure, PII exposure",
|
|
2166
2229
|
"context_attributes": [
|
|
2230
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2231
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2167
2232
|
{ "key": "content", "type": "string", "required": true, "description": "Raw content being scanned" },
|
|
2168
2233
|
{ "key": "mcp_server", "type": "string", "required": false, "description": "MCP server name" },
|
|
2169
2234
|
{ "key": "threat_count", "type": "number", "required": false, "description": "Total threats detected" },
|
|
@@ -2197,6 +2262,8 @@ export const AI_GATEWAY_CONTEXT = {
|
|
|
2197
2262
|
"name": "write_file",
|
|
2198
2263
|
"description": "Write an MCP resource — threat focus: secrets in output, PII in output",
|
|
2199
2264
|
"context_attributes": [
|
|
2265
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2266
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2200
2267
|
{ "key": "content", "type": "string", "required": true, "description": "Raw content being scanned" },
|
|
2201
2268
|
{ "key": "mcp_server", "type": "string", "required": false, "description": "MCP server name" },
|
|
2202
2269
|
{ "key": "threat_count", "type": "number", "required": false, "description": "Total threats detected" },
|
|
@@ -2240,6 +2307,8 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
2240
2307
|
"name": "process_prompt",
|
|
2241
2308
|
"description": "Analyze user prompts and AI responses for security threats, PII, and content violations",
|
|
2242
2309
|
"context_attributes": [
|
|
2310
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2311
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2243
2312
|
{ "key": "request_id", "type": "string", "required": true, "description": "Unique identifier for this request, useful for audit trails and debugging" },
|
|
2244
2313
|
{ "key": "timestamp", "type": "number", "required": true, "description": "Unix timestamp in milliseconds when the request was processed" },
|
|
2245
2314
|
{ "key": "direction", "type": "string", "required": true, "description": "Content flow direction: \'input\' for user prompts, \'output\' for AI responses. Use this to apply different policies to inputs vs outputs (e.g., block PII only in outputs)" },
|
|
@@ -2331,6 +2400,8 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
2331
2400
|
"name": "call_tool",
|
|
2332
2401
|
"description": "Execute agentic tool calls, including shell commands, file operations, and MCP tools",
|
|
2333
2402
|
"context_attributes": [
|
|
2403
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2404
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2334
2405
|
{ "key": "request_id", "type": "string", "required": true, "description": "Unique identifier for this request" },
|
|
2335
2406
|
{ "key": "timestamp", "type": "number", "required": true, "description": "Unix timestamp in milliseconds" },
|
|
2336
2407
|
{ "key": "tool_name", "type": "string", "required": false, "description": "Name of the tool being called (e.g., \'shell\', \'write_file\', \'http_post\'). Use this to block specific dangerous tools" },
|
|
@@ -2418,6 +2489,8 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
2418
2489
|
"name": "read_file",
|
|
2419
2490
|
"description": "Read file operations for analyzing file content before allowing access",
|
|
2420
2491
|
"context_attributes": [
|
|
2492
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2493
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2421
2494
|
{ "key": "request_id", "type": "string", "required": true, "description": "Unique identifier for this request" },
|
|
2422
2495
|
{ "key": "timestamp", "type": "number", "required": true, "description": "Unix timestamp in milliseconds" },
|
|
2423
2496
|
{ "key": "path", "type": "string", "required": false, "description": "File path being read. Use for path-based access control policies (e.g., block .env files, system directories, credential directories)" },
|
|
@@ -2453,6 +2526,8 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
2453
2526
|
"name": "write_file",
|
|
2454
2527
|
"description": "Write file operations for preventing writes of sensitive content",
|
|
2455
2528
|
"context_attributes": [
|
|
2529
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2530
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2456
2531
|
{ "key": "request_id", "type": "string", "required": true, "description": "Unique identifier for this request" },
|
|
2457
2532
|
{ "key": "timestamp", "type": "number", "required": true, "description": "Unix timestamp in milliseconds" },
|
|
2458
2533
|
{ "key": "path", "type": "string", "required": false, "description": "File path being written. Use for path-based blocking policies (e.g., block writes to .env files, credential directories)" },
|
|
@@ -2490,6 +2565,8 @@ export const GUARDRAILS_CONTEXT = {
|
|
|
2490
2565
|
"name": "connect_server",
|
|
2491
2566
|
"description": "Connect to an MCP server, used to control which MCP servers are allowed",
|
|
2492
2567
|
"context_attributes": [
|
|
2568
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2569
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2493
2570
|
{ "key": "request_id", "type": "string", "required": true, "description": "Unique identifier for this request" },
|
|
2494
2571
|
{ "key": "timestamp", "type": "number", "required": true, "description": "Unix timestamp in milliseconds" },
|
|
2495
2572
|
{ "key": "mcp_server", "type": "string", "required": false, "description": "Name of the MCP server being connected to (e.g., \'github\', \'filesystem\', \'slack\'). Use this to allow or block specific MCP servers" },
|
|
@@ -2537,6 +2614,8 @@ export const OVERWATCH_CONTEXT = {
|
|
|
2537
2614
|
"name": "process_prompt",
|
|
2538
2615
|
"description": "User submits a prompt or receives AI response",
|
|
2539
2616
|
"context_attributes": [
|
|
2617
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2618
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2540
2619
|
{ "key": "content", "type": "string", "required": true, "description": "Raw content being scanned (prompt, command, etc.)" },
|
|
2541
2620
|
{ "key": "source", "type": "string", "required": true, "description": "IDE source: cursor, claudecode, github_copilot" },
|
|
2542
2621
|
{ "key": "event", "type": "string", "required": true, "description": "Hook event name (e.g., beforeSubmitPrompt, UserPromptSubmit)" },
|
|
@@ -2591,6 +2670,8 @@ export const OVERWATCH_CONTEXT = {
|
|
|
2591
2670
|
"name": "call_tool",
|
|
2592
2671
|
"description": "User calls a tool (native IDE tool or MCP tool)",
|
|
2593
2672
|
"context_attributes": [
|
|
2673
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2674
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2594
2675
|
{ "key": "content", "type": "string", "required": true, "description": "Raw content being scanned (e.g., shell command, tool arguments)" },
|
|
2595
2676
|
{ "key": "source", "type": "string", "required": true, "description": "IDE source: cursor, claudecode, github_copilot" },
|
|
2596
2677
|
{ "key": "event", "type": "string", "required": true, "description": "Hook event name (e.g., beforeShellExecution, PreToolUse)" },
|
|
@@ -2664,6 +2745,8 @@ export const OVERWATCH_CONTEXT = {
|
|
|
2664
2745
|
"name": "connect_server",
|
|
2665
2746
|
"description": "Connect to an MCP server",
|
|
2666
2747
|
"context_attributes": [
|
|
2748
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2749
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2667
2750
|
{ "key": "content", "type": "string", "required": false, "description": "Server configuration content (if available)" },
|
|
2668
2751
|
{ "key": "source", "type": "string", "required": true, "description": "IDE source: cursor, claudecode, github_copilot" },
|
|
2669
2752
|
{ "key": "event", "type": "string", "required": true, "description": "Hook event name" },
|
|
@@ -2701,6 +2784,8 @@ export const OVERWATCH_CONTEXT = {
|
|
|
2701
2784
|
"name": "read_file",
|
|
2702
2785
|
"description": "Read a file from disk",
|
|
2703
2786
|
"context_attributes": [
|
|
2787
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2788
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2704
2789
|
{ "key": "content", "type": "string", "required": true, "description": "File content or operation details" },
|
|
2705
2790
|
{ "key": "source", "type": "string", "required": true, "description": "IDE source: cursor, claudecode, github_copilot" },
|
|
2706
2791
|
{ "key": "event", "type": "string", "required": true, "description": "Hook event name (e.g., beforeReadFile)" },
|
|
@@ -2738,6 +2823,8 @@ export const OVERWATCH_CONTEXT = {
|
|
|
2738
2823
|
"name": "write_file",
|
|
2739
2824
|
"description": "Write a file to disk",
|
|
2740
2825
|
"context_attributes": [
|
|
2826
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2827
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2741
2828
|
{ "key": "content", "type": "string", "required": true, "description": "File content being written" },
|
|
2742
2829
|
{ "key": "source", "type": "string", "required": true, "description": "IDE source: cursor, claudecode, github_copilot" },
|
|
2743
2830
|
{ "key": "event", "type": "string", "required": true, "description": "Hook event name" },
|
|
@@ -2884,6 +2971,8 @@ export const SENTRY_CONTEXT = {
|
|
|
2884
2971
|
"name": "process_prompt",
|
|
2885
2972
|
"description": "User sends a message (prompt) to an AI chat service via the browser",
|
|
2886
2973
|
"context_attributes": [
|
|
2974
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
2975
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2887
2976
|
{ "key": "content", "type": "string", "required": true, "description": "Raw message content being sent to the AI service" },
|
|
2888
2977
|
{ "key": "source", "type": "string", "required": true, "description": "Browser extension identifier (always \'sentry\')" },
|
|
2889
2978
|
{ "key": "event", "type": "string", "required": true, "description": "Event type (always \'process_prompt\')" },
|
|
@@ -2943,6 +3032,8 @@ export const SENTRY_CONTEXT = {
|
|
|
2943
3032
|
"name": "receive_response",
|
|
2944
3033
|
"description": "AI service responds to the user — scan response content for harmful output",
|
|
2945
3034
|
"context_attributes": [
|
|
3035
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
3036
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2946
3037
|
{ "key": "content", "type": "string", "required": true, "description": "AI response content" },
|
|
2947
3038
|
{ "key": "source", "type": "string", "required": true, "description": "Browser extension identifier" },
|
|
2948
3039
|
{ "key": "event", "type": "string", "required": true, "description": "Event type (always \'receive_response\')" },
|
|
@@ -2987,6 +3078,8 @@ export const SENTRY_CONTEXT = {
|
|
|
2987
3078
|
"name": "paste_content",
|
|
2988
3079
|
"description": "User pastes content into an AI chat (clipboard, cross-tab, cross-app)",
|
|
2989
3080
|
"context_attributes": [
|
|
3081
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
3082
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
2990
3083
|
{ "key": "content", "type": "string", "required": true, "description": "Pasted content" },
|
|
2991
3084
|
{ "key": "source", "type": "string", "required": true, "description": "Browser extension identifier" },
|
|
2992
3085
|
{ "key": "event", "type": "string", "required": true, "description": "Event type (always \'paste_content\')" },
|
|
@@ -3040,6 +3133,8 @@ export const SENTRY_CONTEXT = {
|
|
|
3040
3133
|
"name": "upload_file",
|
|
3041
3134
|
"description": "User uploads a file or document into an AI chat service",
|
|
3042
3135
|
"context_attributes": [
|
|
3136
|
+
{ "key": "role", "type": "string", "required": false, "description": "Caller\'s RBAC role projected from the principal\'s token (AARM R6 / CAP-IDN-011), e.g. finance_lead. Absent when the token carries no role claim." },
|
|
3137
|
+
{ "key": "privilege_scope", "type": "array", "required": false, "description": "Privilege-scope strings granted to the caller, projected from the token (AARM R6 / CAP-IDN-011), e.g. transfer:approve. Absent when the token carries no claim." },
|
|
3043
3138
|
{ "key": "content", "type": "string", "required": true, "description": "Extracted file text content (for scanning)" },
|
|
3044
3139
|
{ "key": "source", "type": "string", "required": true, "description": "Browser extension identifier" },
|
|
3045
3140
|
{ "key": "event", "type": "string", "required": true, "description": "Event type (always \'upload_file\')" },
|
package/dist/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './context.gen.js';
|
|
|
4
4
|
export * from './schema.gen.js';
|
|
5
5
|
export * from './decision-effects.gen.js';
|
|
6
6
|
export * from './aarm-annotations.gen.js';
|
|
7
|
+
export * from './aarm-annotation.js';
|
|
7
8
|
export * from './builder.js';
|
|
8
9
|
export * from './errors.js';
|
|
9
10
|
export * from './annotations.js';
|
package/dist/types.js
CHANGED
|
@@ -15,6 +15,9 @@ export * from './decision-effects.gen.js';
|
|
|
15
15
|
// AARM-aware annotation registry (browser-safe — Studio uses this
|
|
16
16
|
// for Monaco autocomplete + lint of @step_up_required / @defer_* keys).
|
|
17
17
|
export * from './aarm-annotations.gen.js';
|
|
18
|
+
// AARM annotation parser/validator (browser-safe — typed parse + fail-closed
|
|
19
|
+
// validation; Studio lints with the exact rules Shield runs at sync time).
|
|
20
|
+
export * from './aarm-annotation.js';
|
|
18
21
|
// PolicyBuilder - works in browser (no WASM dependency)
|
|
19
22
|
export * from './builder.js';
|
|
20
23
|
// Error types - works in browser (no WASM dependency)
|