Skip to content

1.10.0 — AI Policy Authoring System

Choose a tag to compare

@Cheater121 Cheater121 released this 02 Apr 20:47
· 24 commits to main since this release
6383ff1

Adds an optional AI-assisted policy authoring workflow:

  • New extra: rbacx[ai] (openai>=1.0, PyYAML>=6.0)
  • AIPolicy as the main entry point for AI-assisted policy generation and refinement
  • Supports OpenAI-compatible providers via api_key, model, and optional base_url
    (OpenAI, OpenRouter, Ollama, Azure, Qwen and similar)
  • AIPolicy.from_schema(...) generates a valid rbacx policy from OpenAPI 3.x / 2.0 schemas
  • Safe-by-default pipeline: generate → validate → retry on failure → lint → optional compile → optional explanation
  • AIPolicy.refine_policy(...) supports iterative natural-language policy refinement with persistent conversation state
  • AIPolicy.explain_decision(...) returns an authoritative Decision plus an LLM-generated human explanation, with the security-critical decision evaluated deterministically
  • New result types: PolicyResult and DecisionExplanation
  • New typed exceptions: SchemaParseError, ValidationRetryError, PolicyGenerationError
  • Includes bundled system prompt assets and full documentation for AI policy authoring

No breaking changes

Upgrade

pip install -U "rbacx[ai]"