@highflame/policy 2.0.9 → 2.1.0
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/guardrails/context.json +435 -0
- package/_schemas/guardrails/schema.cedarschema +225 -0
- package/_schemas/guardrails/templates/defaults/agentic_safety.cedar +94 -0
- package/_schemas/guardrails/templates/defaults/baseline.cedar +24 -0
- package/_schemas/guardrails/templates/defaults/injection.cedar +70 -0
- package/_schemas/guardrails/templates/defaults/pii.cedar +48 -0
- package/_schemas/guardrails/templates/defaults/secrets.cedar +40 -0
- package/_schemas/guardrails/templates/defaults/semantic.cedar +59 -0
- package/_schemas/guardrails/templates/defaults/tool_risk.cedar +58 -0
- package/_schemas/guardrails/templates/defaults/toxicity.cedar +76 -0
- package/_schemas/guardrails/templates/mcp_tool_permissions.cedar +84 -0
- package/_schemas/guardrails/templates/profiles/chat_assistant/privacy.cedar +22 -0
- package/_schemas/guardrails/templates/profiles/chat_assistant/security.cedar +35 -0
- package/_schemas/guardrails/templates/profiles/chat_assistant/trust_safety.cedar +43 -0
- package/_schemas/guardrails/templates/profiles/chat_assistant.cedar +85 -0
- package/_schemas/guardrails/templates/profiles/code_agent/agentic_security.cedar +109 -0
- package/_schemas/guardrails/templates/profiles/code_agent/security.cedar +22 -0
- package/_schemas/guardrails/templates/profiles/code_agent.cedar +125 -0
- package/_schemas/guardrails/templates/profiles/data_pipeline/agentic_security.cedar +38 -0
- package/_schemas/guardrails/templates/profiles/data_pipeline/privacy.cedar +40 -0
- package/_schemas/guardrails/templates/profiles/data_pipeline/security.cedar +49 -0
- package/_schemas/guardrails/templates/profiles/data_pipeline.cedar +111 -0
- package/_schemas/guardrails/templates/templates.json +213 -0
- package/_schemas/overwatch/context.json +54 -54
- package/_schemas/overwatch/schema.cedarschema +77 -68
- package/dist/builder.d.ts +106 -13
- package/dist/builder.js +103 -34
- package/dist/engine.d.ts +20 -2
- package/dist/engine.js +50 -20
- package/dist/entities.gen.d.ts +4 -0
- package/dist/entities.gen.js +4 -0
- package/dist/explain.d.ts +150 -0
- package/dist/explain.js +363 -0
- package/dist/guardrails-context.gen.d.ts +49 -0
- package/dist/guardrails-context.gen.js +50 -0
- package/dist/guardrails-defaults.gen.d.ts +61 -0
- package/dist/guardrails-defaults.gen.js +1278 -0
- package/dist/guardrails-entities.gen.d.ts +11 -0
- package/dist/guardrails-entities.gen.js +37 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/dist/overwatch-defaults.gen.js +122 -2
- package/dist/parser.js +136 -4
- package/dist/schema.gen.d.ts +1 -1
- package/dist/schema.gen.js +6 -0
- package/dist/service-schemas.gen.d.ts +15 -11
- package/dist/service-schemas.gen.js +509 -84
- package/dist/types.d.ts +6 -1
- package/dist/types.js +6 -1
- package/package.json +5 -1
package/dist/types.d.ts
CHANGED
|
@@ -5,12 +5,17 @@ export * from './schema.gen.js';
|
|
|
5
5
|
export * from './builder.js';
|
|
6
6
|
export * from './errors.js';
|
|
7
7
|
export * from './annotations.js';
|
|
8
|
-
export
|
|
8
|
+
export * from './explain.js';
|
|
9
|
+
export { GUARDRAILS_SCHEMA, GUARDRAILS_CONTEXT, OVERWATCH_SCHEMA, OVERWATCH_CONTEXT, PALISADE_SCHEMA, PALISADE_CONTEXT, } from './service-schemas.gen.js';
|
|
9
10
|
export type { ContextAttribute, ActionContext, ServiceContext, } from './service-schemas.gen.js';
|
|
11
|
+
export { GuardrailsContextKey } from './guardrails-context.gen.js';
|
|
10
12
|
export { OverwatchContextKey } from './overwatch-context.gen.js';
|
|
11
13
|
export { PalisadeContextKey } from './palisade-context.gen.js';
|
|
14
|
+
export { GUARDRAILS_ENTITIES, GUARDRAILS_ACTION_ENTITIES, } from './guardrails-entities.gen.js';
|
|
12
15
|
export { OVERWATCH_ENTITIES, OVERWATCH_ACTION_ENTITIES, } from './overwatch-entities.gen.js';
|
|
13
16
|
export { PALISADE_ENTITIES, PALISADE_ACTION_ENTITIES, } from './palisade-entities.gen.js';
|
|
14
17
|
export type { ServiceEntityMetadata, ActionEntityMetadata } from './entity-metadata-types.gen.js';
|
|
18
|
+
export { GUARDRAILS_DEFAULTS, GUARDRAILS_TEMPLATES, GUARDRAILS_CATEGORIES, GUARDRAILS_TEMPLATES_JSON, getGuardrailsDefaultsByCategory, getGuardrailsTemplatesByCategory, getGuardrailsTemplateById, } from './guardrails-defaults.gen.js';
|
|
19
|
+
export type { GuardrailsCategory, GuardrailsCategoryInfo, GuardrailsDefaultPolicy, GuardrailsTemplate, } from './guardrails-defaults.gen.js';
|
|
15
20
|
export { OVERWATCH_DEFAULTS, OVERWATCH_TEMPLATES, OVERWATCH_CATEGORIES, OVERWATCH_TEMPLATES_JSON, getOverwatchDefaultsByCategory, getOverwatchTemplatesByCategory, getOverwatchTemplateById, } from './overwatch-defaults.gen.js';
|
|
16
21
|
export type { OverwatchCategory, OverwatchCategoryInfo, OverwatchDefaultPolicy, OverwatchTemplate, } from './overwatch-defaults.gen.js';
|
package/dist/types.js
CHANGED
|
@@ -15,13 +15,18 @@ export * from './builder.js';
|
|
|
15
15
|
export * from './errors.js';
|
|
16
16
|
// Annotations - works in browser (no WASM dependency)
|
|
17
17
|
export * from './annotations.js';
|
|
18
|
+
// Decision explanation - works in browser (no WASM dependency)
|
|
19
|
+
export * from './explain.js';
|
|
18
20
|
// Service-specific schemas and context (inlined, browser-safe)
|
|
19
|
-
export { OVERWATCH_SCHEMA, OVERWATCH_CONTEXT, PALISADE_SCHEMA, PALISADE_CONTEXT, } from './service-schemas.gen.js';
|
|
21
|
+
export { GUARDRAILS_SCHEMA, GUARDRAILS_CONTEXT, OVERWATCH_SCHEMA, OVERWATCH_CONTEXT, PALISADE_SCHEMA, PALISADE_CONTEXT, } from './service-schemas.gen.js';
|
|
20
22
|
// Service-specific context key enums
|
|
23
|
+
export { GuardrailsContextKey } from './guardrails-context.gen.js';
|
|
21
24
|
export { OverwatchContextKey } from './overwatch-context.gen.js';
|
|
22
25
|
export { PalisadeContextKey } from './palisade-context.gen.js';
|
|
23
26
|
// Service-specific entity metadata (for UI - principals, resources, actions)
|
|
27
|
+
export { GUARDRAILS_ENTITIES, GUARDRAILS_ACTION_ENTITIES, } from './guardrails-entities.gen.js';
|
|
24
28
|
export { OVERWATCH_ENTITIES, OVERWATCH_ACTION_ENTITIES, } from './overwatch-entities.gen.js';
|
|
25
29
|
export { PALISADE_ENTITIES, PALISADE_ACTION_ENTITIES, } from './palisade-entities.gen.js';
|
|
26
30
|
// Service-specific default policies, templates, and categories
|
|
31
|
+
export { GUARDRAILS_DEFAULTS, GUARDRAILS_TEMPLATES, GUARDRAILS_CATEGORIES, GUARDRAILS_TEMPLATES_JSON, getGuardrailsDefaultsByCategory, getGuardrailsTemplatesByCategory, getGuardrailsTemplateById, } from './guardrails-defaults.gen.js';
|
|
27
32
|
export { OVERWATCH_DEFAULTS, OVERWATCH_TEMPLATES, OVERWATCH_CATEGORIES, OVERWATCH_TEMPLATES_JSON, getOverwatchDefaultsByCategory, getOverwatchTemplatesByCategory, getOverwatchTemplateById, } from './overwatch-defaults.gen.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@highflame/policy",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Highflame Cedar policy types and engine wrapper",
|
|
5
5
|
"readme": "README.md",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"./parser": {
|
|
43
43
|
"import": "./dist/parser.js",
|
|
44
44
|
"types": "./dist/parser.d.ts"
|
|
45
|
+
},
|
|
46
|
+
"./explain": {
|
|
47
|
+
"import": "./dist/explain.js",
|
|
48
|
+
"types": "./dist/explain.d.ts"
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
51
|
"scripts": {
|