Display on info pydantic-ai and docling-document schema version

This commit is contained in:
Yiorgis Gozadinos 2026-01-14 18:14:53 +02:00
parent e14499658f
commit fc1ea82cb1
No known key found for this signature in database
3 changed files with 13 additions and 0 deletions

View file

@ -3,6 +3,7 @@
### Added
- **Enhanced Database Info**: `haiku-rag info` now displays `pydantic-ai` version and `docling-document schema` version
- **Keyed State Emission for Chat Agent**: New `state_key` parameter in `ChatDeps` for namespaced AG-UI state snapshots
- When set, tools emit `{state_key: snapshot}` instead of bare state, enabling state merging when multiple agents share state
- Default `None` preserves backwards compatibility (bare state emission)

View file

@ -98,6 +98,10 @@ class HaikuRAGApp:
docling_version = pkg_version("docling")
except Exception:
docling_version = "unknown"
pydantic_ai_version = pkg_version("pydantic-ai-slim")
from docling_core.types.doc.document import DoclingDocument
docling_document_version = DoclingDocument.model_construct().version
# Get comprehensive table statistics (this also runs migrations)
from haiku.rag.store.engine import Store
@ -219,6 +223,12 @@ class HaikuRAGApp:
self.console.print(
f" [repr.attrib_name]docling[/repr.attrib_name]: {docling_version}"
)
self.console.print(
f" [repr.attrib_name]pydantic-ai[/repr.attrib_name]: {pydantic_ai_version}"
)
self.console.print(
f" [repr.attrib_name]docling-document schema[/repr.attrib_name]: {docling_document_version}"
)
async def history(self, table: str | None = None, limit: int | None = None):
"""Display version history for database tables.

View file

@ -81,6 +81,8 @@ async def test_app_info_outputs(temp_db_path, capsys):
# Package versions section
assert "lancedb:" in out
assert "haiku.rag:" in out
assert "docling-document schema:" in out
assert "pydantic-ai:" in out
@pytest.mark.asyncio