Repository navigation
1.10.0 — AI Policy Authoring System
Adds an optional AI-assisted policy authoring workflow:
- New extra:
rbacx[ai](openai>=1.0,PyYAML>=6.0) AIPolicyas the main entry point for AI-assisted policy generation and refinement- Supports OpenAI-compatible providers via
api_key,model, and optionalbase_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 stateAIPolicy.explain_decision(...)returns an authoritativeDecisionplus an LLM-generated human explanation, with the security-critical decision evaluated deterministically- New result types:
PolicyResultandDecisionExplanation - 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]"