Skip to content

attenu-guard 0.5.0

Choose a tag to compare

@rafaelasor rafaelasor released this 27 Aug 19:46
· 115 commits to main since this release

Added

  • Haystack adapter (attenu_guard.adapters.haystack, extra haystack, tested against haystack-ai 3.1.0): guards deepset Haystack Agents and pipelines through Tool.invoke/invoke_async (a subclass of each tool's own class, so ComponentTool/AgentTool identity and the inputs_from_state/outputs_to_string machinery are untouched), mints the child Guard at the AgentTool call, and offers Haystack's own before_tool ConfirmationHook as an alternative denial path. Denials raise a ToolInvocationError subclass, so the Agent's existing raise_on_tool_invocation_failure decides between "tell the model" and "stop the run". Parent tracking is a ContextVar, so parallel delegations in one model turn are siblings, not a chain. Example + 26 offline tests; 13th framework in docs/INTEGRATIONS.md.
  • Two new framework adapters, both AutoGen successors. attenu_guard.adapters.agent_framework for Microsoft Agent Framework 1.15 (the AutoGen + Semantic Kernel successor) — DelegationGuard(FunctionMiddleware) gates every tool body through the one seam the framework's function-invocation loop can reach, and the same hook mints the child Guard at Agent.as_tool() and handoff_to_<target> calls; denials come back as a function_result, or as MiddlewareFailure (on_deny="failure") for a fail-closed abort. attenu_guard.adapters.ag2 for AG2 1.0 (the AutoGen fork, a rewrite around the ag2 package) — DelegationGuard(BaseMiddleware).on_tool_execution gates the tool body and the task_<agent> delegation call, plus guarded_tools() / guard_tool_hook() for per-tool middleware, the only hook that reaches a child AG2 constructs itself from tasks=TaskConfig(...). Install with pip install 'attenu-guard[agent-framework]' / 'attenu-guard[ag2]'. Offline demos under examples/integrations/{agent_framework,ag2}/ and 36 tests under tests/integrations/; matrix rows in docs/INTEGRATIONS.md.
  • Supply chain: every release now carries SLSA build provenance (sigstore attestation via actions/attest-build-provenance); OpenSSF Scorecard runs weekly and on push; a .pre-commit-hooks.yaml exposes attenu-guard verify as a pre-commit hook for committed evidence bundles.

Fixed

  • Adapter docstrings still referred to the pre-rename paste-in module names (dg_google_adk, dg_crewai, dg_smolagents, dg_llama_index) and said "paste/copy this file"; they now name the packaged modules (attenu_guard.adapters.<name>) and the matching extras.