haiku.rag/tests/capabilities
Yiorgis Gozadinos 61a756da7f
Support Pydantic AI agent specs via from_spec
`Agent.from_spec` raised `TypeError` on `RAGCapability` and `AnalysisCapability`,
whose constructors take a state class, packaged instruction text and a tool-name
set, and silently omitted both from the generated spec schema. The two
zero-configuration capabilities constructed but with `id=None`, so pydantic-ai's
duplicate-id rejection no longer held and a spec could register two citation
policies, defeating the single-decision-maker invariant.

Override `from_spec` on all four, delegating to `create_capability()` so ids and
instructions come from one place. The spec surface is `db_path`, `config`,
`defer_loading`, `request_limit` and `vision`; a live `HaikuRAG` client stays out
of it, and a `config` mapping is validated through `AppConfig`.
2026-08-21 13:04:09 +03:00
..
conftest.py
test_agent_spec.py Support Pydantic AI agent specs via from_spec 2026-08-21 13:04:09 +03:00
test_borrowed_client.py Lend the caller's client to the capability 2026-08-18 14:58:18 +03:00
test_capabilities.py Coerce a string db_path to Path at the Store and capability boundaries 2026-08-21 12:49:45 +03:00
test_citation_policy.py Let the record say whether a question is still being answered 2026-08-13 15:03:24 +03:00
test_evidence_capsule.py Refuse to compact evidence the host kept no record of 2026-08-13 15:46:23 +03:00
test_evidence_ledger.py Enforce a declaration wherever there is something to declare 2026-08-13 13:39:42 +03:00
test_evidence_wire.py Give the evidence capabilities one typed state 2026-08-19 17:08:44 +03:00