[0.11.0] — 2026-07-15
Streaming, gateway, and PII-engine release. Adds response streaming with
inline PII redaction on GovernedModel, an OpenAI-compatible governance
gateway, a selectable Microsoft Presidio PII engine, an HMAC-signed
forensic chain-state file, and a configurable guard fail mode. Includes one
breaking change — the /api/v1/validate action MODIFY is renamed to
REDACT (permitted under the pre-1.0 posture: the public API may still
evolve before the 1.0 stability commitment).
Added
- Configurable guard fail mode (
ADMINA_GUARD_FAIL_MODE=open|closed,
defaultopen). When a pluggable governance guard raises,openkeeps the
current behavior (the guard is skipped and recorded as anERRORcheck);
closedturns the exception into aBLOCK. Enforced on the request-side
pipeline of every governed surface — SDKGovernedModel.ask()and
.stream(), the MCP proxy (mcp_proxy), and the OpenAI-compatible gateway
(/v1/chat/completions) — and, MCP-proxy-only, on response inspection —
where a fail-closed block also writes an explicit forensicERRORrecord,
since the request-side record is written before response inspection runs. - Forensic chain-state file (
_chain_state.json) can be signed with
HMAC-SHA256. SetADMINA_FORENSIC_STATE_KEY(or passstate_signing_key=)
to enable: on restore a valid signature is trusted (fast path); a missing or
invalid signature is treated as untrusted — a CRITICAL event is logged and
the chain state is reconstructed from the immutable records instead of the
(potentially rewritten) state file. With no key set the state file is
unsigned: baseline truncation protection via record reconstruction is
retained, and signing is recommended in production. Applies to
ForensicBlackBox(filesystem + S3 backends) and theFilesystemForensicStore
plugin; the signature is stored in a_chain_state.json.sigsidecar. - SDK streaming.
GovernedModel.stream(prompt)yields PII-redacted
response deltas as an async iterator, with the full governance outcome in
GovernedModel.last_stream_result. The pre-stream gate matchesask():
a blocked prompt yields no deltas and reportsaction="BLOCK"(no
exception). StreamRedactor(admina.sdk.StreamRedactor) — a windowed
recomposition buffer that redacts PII spanning streamed-delta boundaries.
window_charsmust exceed the longest expected entity.BaseModelAdapter.send_stream()— an async-iterator streaming method
on the adapter contract. Real streaming for the OpenAI, Ollama, vLLM, and
Anthropic adapters; the Mistral, Gemini, and Bedrock adapters use the base
single-chunk fallback pending a follow-on.- Presidio PII engine. Microsoft Presidio is selectable as the PII engine
viaADMINA_PII_ENGINE=presidioorpii_engine: presidioinadmina.yaml,
behind the new[presidio]extra. Presidio performs detection only; Admina
keeps its own masking, so the output format is identical to the default
spacy-regexengine (per-category masks, e.g.[EMAIL],[PERSON]).
Languages EN + IT. The default engine is unchanged (spacy-regex). The
redteam efficacy suite measures Presidio as a third PII column with
version/language mode-pinning. - OpenAI-compatible governance gateway — a new
/v1HTTP surface on
the proxy (POST /v1/chat/completions, streaming and non-streaming, plus
GET /v1/models). Requests are forwarded to a configurable upstream
(ADMINA_GATEWAY_UPSTREAM) over httpx while the canonical governance
pipeline runs inline: prompts are firewall-checked and PII-redacted before
they reach the upstream, streamed responses are redacted through a
windowed recomposition buffer, and a blocked request returns a synthetic
completion (or SSE stream) withfinish_reason: "content_filter"instead
of a raw HTTP error. Every request is written to the forensic log. This is
the proxy's first SSE surface. Protected by the existing credential check
(Authorization: Bearer/X-API-Key).
Breaking
/api/v1/validaterenames theMODIFYaction toREDACT. When a
request is allowed but PII was redacted, the responseactionis now
"REDACT"(was"MODIFY");redacted_contentis populated onREDACT
exactly as before. This aligns the REST vocabulary with the internal
GovernanceAction.REDACTvalue. TheCIRCUIT_BREAK → BLOCKmapping is
unchanged. No compatibility shim is carried: the in-repo n8n node,
CheshireCat plugin, and OpenClaw skill are updated in the same change,
and external callers must switch toREDACT. Admina is pre-1.0, so the
public API may still evolve before the 1.0 stability commitment.
Fixed
- The proxy
/mcpforensic record now carrieswould_action— the shadow
decision recorded inobserve/dry-runmode — matching the
ClickHouse analytics record. Previously the shadow decision reached only
ClickHouse, leaving the hash-chained audit trail without it.