@highflame/policy 2.2.37 → 2.2.39

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 (38) hide show
  1. package/_schemas/agent_ops/templates/templates.json +16 -8
  2. package/_schemas/ai_gateway/templates/templates.json +12 -6
  3. package/_schemas/guardrails/templates/templates.json +16 -8
  4. package/_schemas/sentry/templates/templates.json +12 -6
  5. package/dist/agent_ops-defaults.gen.d.ts +3 -0
  6. package/dist/agent_ops-defaults.gen.js +24 -16
  7. package/dist/ai_gateway-defaults.gen.d.ts +3 -0
  8. package/dist/ai_gateway-defaults.gen.js +18 -12
  9. package/dist/category-layers.gen.d.ts +22 -0
  10. package/dist/category-layers.gen.js +69 -0
  11. package/dist/engine.d.ts +10 -0
  12. package/dist/engine.js +25 -1
  13. package/dist/guardrails-defaults.gen.d.ts +3 -0
  14. package/dist/guardrails-defaults.gen.js +24 -16
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +1 -0
  17. package/dist/overwatch-defaults.gen.d.ts +3 -0
  18. package/dist/overwatch-defaults.gen.js +24 -16
  19. package/dist/sentry-defaults.gen.d.ts +3 -0
  20. package/dist/sentry-defaults.gen.js +18 -12
  21. package/dist/types.d.ts +1 -0
  22. package/dist/types.js +1 -0
  23. package/package.json +1 -1
  24. package/_schemas/mcp_gateway/context.json +0 -655
  25. package/_schemas/mcp_gateway/schema.cedarschema +0 -342
  26. package/_schemas/mcp_gateway/templates/defaults/agent_security.cedar +0 -140
  27. package/_schemas/mcp_gateway/templates/defaults/baseline.cedar +0 -23
  28. package/_schemas/mcp_gateway/templates/defaults/semantic.cedar +0 -105
  29. package/_schemas/mcp_gateway/templates/defaults/tools.cedar +0 -92
  30. package/_schemas/mcp_gateway/templates/mcp_server_allowlist.cedar +0 -33
  31. package/_schemas/mcp_gateway/templates/mcp_tool_permissions.cedar +0 -77
  32. package/_schemas/mcp_gateway/templates/templates.json +0 -89
  33. package/dist/mcp_gateway-context.gen.d.ts +0 -51
  34. package/dist/mcp_gateway-context.gen.js +0 -52
  35. package/dist/mcp_gateway-defaults.gen.d.ts +0 -61
  36. package/dist/mcp_gateway-defaults.gen.js +0 -668
  37. package/dist/mcp_gateway-entities.gen.d.ts +0 -11
  38. package/dist/mcp_gateway-entities.gen.js +0 -37
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ export * from './context.gen.js';
9
9
  export * from './schema.gen.js';
10
10
  // Canonical decision-effect vocabulary (AARM R4 Wave A). Always emitted —
11
11
  // source is ALLOWED_DECISION_EFFECTS in codegen/src/lib.rs, not annotations.json.
12
+ export * from './category-layers.gen.js';
12
13
  export * from './decision-effects.gen.js';
13
14
  // AARM-aware annotation registry (typed Cedar annotation vocabulary
14
15
  // Shield interprets at decision time; Studio/Admin use for lint).
@@ -10,6 +10,9 @@ export interface OverwatchCategoryInfo {
10
10
  id: OverwatchCategory;
11
11
  name: string;
12
12
  description: string;
13
+ /** Control layer: 'access' governs whether an action is permitted at
14
+ * all; 'guardrail' governs whether a given request should pass. */
15
+ layer: 'access' | 'guardrail';
13
16
  }
14
17
  /**
15
18
  * A default policy that is auto-created for new projects.
@@ -1823,14 +1823,14 @@ when {
1823
1823
  // CATEGORIES
1824
1824
  // =============================================================================
1825
1825
  export const OVERWATCH_CATEGORIES = [
1826
- { id: 'data-protection', name: 'Secrets & Data Protection', description: 'Block credential leakage and protect sensitive file paths.' },
1827
- { id: 'privacy', name: 'PII Detection', description: 'Block personally identifiable information across prompts, tool calls, and file operations.' },
1828
- { id: 'semantic', name: 'Semantic Threat Detection', description: 'Block injection attacks (SQL, path traversal, encoded), prompt injection, and jailbreak attempts.' },
1829
- { id: 'trust-safety', name: 'Content Safety', description: 'Block violent, hateful, sexual, criminal, or excessively profane content.' },
1830
- { id: 'tools', name: 'Tool Permissioning', description: 'Control shell execution, file operations, MCP servers, and sensitive system paths.' },
1831
- { id: 'agent-identity', name: 'Agent-Specific Guardrails', description: 'Per-agent security policies applied based on agent identity.' },
1832
- { id: 'agent-security', name: 'Agent Security', description: 'Block supply-chain attacks, malicious package installs, and code-agent-specific threats.' },
1833
- { id: 'organization', name: 'Organization', description: 'Organization-wide baselines, audit, and project-scoped permissions.' },
1826
+ { id: 'data-protection', name: 'Secrets & Data Protection', description: 'Block credential leakage and protect sensitive file paths.', layer: 'guardrail' },
1827
+ { id: 'privacy', name: 'PII Detection', description: 'Block personally identifiable information across prompts, tool calls, and file operations.', layer: 'guardrail' },
1828
+ { id: 'semantic', name: 'Semantic Threat Detection', description: 'Block injection attacks (SQL, path traversal, encoded), prompt injection, and jailbreak attempts.', layer: 'guardrail' },
1829
+ { id: 'trust-safety', name: 'Content Safety', description: 'Block violent, hateful, sexual, criminal, or excessively profane content.', layer: 'guardrail' },
1830
+ { id: 'tools', name: 'Tool Permissioning', description: 'Control shell execution, file operations, MCP servers, and sensitive system paths.', layer: 'access' },
1831
+ { id: 'agent-identity', name: 'Agent-Specific Guardrails', description: 'Per-agent security policies applied based on agent identity.', layer: 'guardrail' },
1832
+ { id: 'agent-security', name: 'Agent Security', description: 'Block supply-chain attacks, malicious package installs, and code-agent-specific threats.', layer: 'guardrail' },
1833
+ { id: 'organization', name: 'Organization', description: 'Organization-wide baselines, audit, and project-scoped permissions.', layer: 'access' },
1834
1834
  ];
1835
1835
  // =============================================================================
1836
1836
  // DEFAULT POLICIES
@@ -2036,42 +2036,50 @@ export const OVERWATCH_TEMPLATES_JSON = `{
2036
2036
  {
2037
2037
  "id": "data-protection",
2038
2038
  "name": "Secrets & Data Protection",
2039
- "description": "Block credential leakage and protect sensitive file paths."
2039
+ "description": "Block credential leakage and protect sensitive file paths.",
2040
+ "layer": "guardrail"
2040
2041
  },
2041
2042
  {
2042
2043
  "id": "privacy",
2043
2044
  "name": "PII Detection",
2044
- "description": "Block personally identifiable information across prompts, tool calls, and file operations."
2045
+ "description": "Block personally identifiable information across prompts, tool calls, and file operations.",
2046
+ "layer": "guardrail"
2045
2047
  },
2046
2048
  {
2047
2049
  "id": "semantic",
2048
2050
  "name": "Semantic Threat Detection",
2049
- "description": "Block injection attacks (SQL, path traversal, encoded), prompt injection, and jailbreak attempts."
2051
+ "description": "Block injection attacks (SQL, path traversal, encoded), prompt injection, and jailbreak attempts.",
2052
+ "layer": "guardrail"
2050
2053
  },
2051
2054
  {
2052
2055
  "id": "trust-safety",
2053
2056
  "name": "Content Safety",
2054
- "description": "Block violent, hateful, sexual, criminal, or excessively profane content."
2057
+ "description": "Block violent, hateful, sexual, criminal, or excessively profane content.",
2058
+ "layer": "guardrail"
2055
2059
  },
2056
2060
  {
2057
2061
  "id": "tools",
2058
2062
  "name": "Tool Permissioning",
2059
- "description": "Control shell execution, file operations, MCP servers, and sensitive system paths."
2063
+ "description": "Control shell execution, file operations, MCP servers, and sensitive system paths.",
2064
+ "layer": "access"
2060
2065
  },
2061
2066
  {
2062
2067
  "id": "agent-identity",
2063
2068
  "name": "Agent-Specific Guardrails",
2064
- "description": "Per-agent security policies applied based on agent identity."
2069
+ "description": "Per-agent security policies applied based on agent identity.",
2070
+ "layer": "guardrail"
2065
2071
  },
2066
2072
  {
2067
2073
  "id": "agent-security",
2068
2074
  "name": "Agent Security",
2069
- "description": "Block supply-chain attacks, malicious package installs, and code-agent-specific threats."
2075
+ "description": "Block supply-chain attacks, malicious package installs, and code-agent-specific threats.",
2076
+ "layer": "guardrail"
2070
2077
  },
2071
2078
  {
2072
2079
  "id": "organization",
2073
2080
  "name": "Organization",
2074
- "description": "Organization-wide baselines, audit, and project-scoped permissions."
2081
+ "description": "Organization-wide baselines, audit, and project-scoped permissions.",
2082
+ "layer": "access"
2075
2083
  }
2076
2084
  ],
2077
2085
  "defaults": [
@@ -10,6 +10,9 @@ export interface SentryCategoryInfo {
10
10
  id: SentryCategory;
11
11
  name: string;
12
12
  description: string;
13
+ /** Control layer: 'access' governs whether an action is permitted at
14
+ * all; 'guardrail' governs whether a given request should pass. */
15
+ layer: 'access' | 'guardrail';
13
16
  }
14
17
  /**
15
18
  * A default policy that is auto-created for new projects.
@@ -1227,12 +1227,12 @@ when {
1227
1227
  // CATEGORIES
1228
1228
  // =============================================================================
1229
1229
  export const SENTRY_CATEGORIES = [
1230
- { id: 'data-protection', name: 'Secrets & Data Protection', description: 'Block secrets, API keys, tokens, and credentials in messages and uploads.' },
1231
- { id: 'privacy', name: 'PII Detection', description: 'Block personally identifiable information across messages and uploads.' },
1232
- { id: 'semantic', name: 'Semantic Threat Detection', description: 'Block prompt injection, jailbreak attempts, and high-severity threats.' },
1233
- { id: 'trust-safety', name: 'Content Safety', description: 'Block violent, harmful, hateful, sexual, or profane content.' },
1234
- { id: 'clipboard', name: 'Clipboard Policy', description: 'Control paste operations into AI chat services.' },
1235
- { id: 'organization', name: 'Organization Rules', description: 'Organization-wide baselines and session-aware threat escalation.' },
1230
+ { id: 'data-protection', name: 'Secrets & Data Protection', description: 'Block secrets, API keys, tokens, and credentials in messages and uploads.', layer: 'guardrail' },
1231
+ { id: 'privacy', name: 'PII Detection', description: 'Block personally identifiable information across messages and uploads.', layer: 'guardrail' },
1232
+ { id: 'semantic', name: 'Semantic Threat Detection', description: 'Block prompt injection, jailbreak attempts, and high-severity threats.', layer: 'guardrail' },
1233
+ { id: 'trust-safety', name: 'Content Safety', description: 'Block violent, harmful, hateful, sexual, or profane content.', layer: 'guardrail' },
1234
+ { id: 'clipboard', name: 'Clipboard Policy', description: 'Control paste operations into AI chat services.', layer: 'guardrail' },
1235
+ { id: 'organization', name: 'Organization Rules', description: 'Organization-wide baselines and session-aware threat escalation.', layer: 'access' },
1236
1236
  ];
1237
1237
  // =============================================================================
1238
1238
  // DEFAULT POLICIES
@@ -1348,32 +1348,38 @@ export const SENTRY_TEMPLATES_JSON = `{
1348
1348
  {
1349
1349
  "id": "data-protection",
1350
1350
  "name": "Secrets & Data Protection",
1351
- "description": "Block secrets, API keys, tokens, and credentials in messages and uploads."
1351
+ "description": "Block secrets, API keys, tokens, and credentials in messages and uploads.",
1352
+ "layer": "guardrail"
1352
1353
  },
1353
1354
  {
1354
1355
  "id": "privacy",
1355
1356
  "name": "PII Detection",
1356
- "description": "Block personally identifiable information across messages and uploads."
1357
+ "description": "Block personally identifiable information across messages and uploads.",
1358
+ "layer": "guardrail"
1357
1359
  },
1358
1360
  {
1359
1361
  "id": "semantic",
1360
1362
  "name": "Semantic Threat Detection",
1361
- "description": "Block prompt injection, jailbreak attempts, and high-severity threats."
1363
+ "description": "Block prompt injection, jailbreak attempts, and high-severity threats.",
1364
+ "layer": "guardrail"
1362
1365
  },
1363
1366
  {
1364
1367
  "id": "trust-safety",
1365
1368
  "name": "Content Safety",
1366
- "description": "Block violent, harmful, hateful, sexual, or profane content."
1369
+ "description": "Block violent, harmful, hateful, sexual, or profane content.",
1370
+ "layer": "guardrail"
1367
1371
  },
1368
1372
  {
1369
1373
  "id": "clipboard",
1370
1374
  "name": "Clipboard Policy",
1371
- "description": "Control paste operations into AI chat services."
1375
+ "description": "Control paste operations into AI chat services.",
1376
+ "layer": "guardrail"
1372
1377
  },
1373
1378
  {
1374
1379
  "id": "organization",
1375
1380
  "name": "Organization Rules",
1376
- "description": "Organization-wide baselines and session-aware threat escalation."
1381
+ "description": "Organization-wide baselines and session-aware threat escalation.",
1382
+ "layer": "access"
1377
1383
  }
1378
1384
  ],
1379
1385
  "defaults": [
package/dist/types.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './entities.gen.js';
2
2
  export * from './actions.gen.js';
3
3
  export * from './context.gen.js';
4
4
  export * from './schema.gen.js';
5
+ export * from './category-layers.gen.js';
5
6
  export * from './decision-effects.gen.js';
6
7
  export * from './aarm-annotations.gen.js';
7
8
  export * from './aarm-annotation.js';
package/dist/types.js CHANGED
@@ -11,6 +11,7 @@ export * from './context.gen.js';
11
11
  export * from './schema.gen.js';
12
12
  // Canonical decision-effect vocabulary (browser-safe). Studio's Monaco
13
13
  // policy editor imports these typed symbols rather than string literals.
14
+ export * from './category-layers.gen.js';
14
15
  export * from './decision-effects.gen.js';
15
16
  // AARM-aware annotation registry (browser-safe — Studio uses this
16
17
  // for Monaco autocomplete + lint of @step_up_required / @defer_* keys).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highflame/policy",
3
- "version": "2.2.37",
3
+ "version": "2.2.39",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },