feat(phase3): register Librarian on application startup

- Add Librarian registration to household member registration
- Error handling to prevent startup failure if Librarian unavailable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-11 21:29:53 +01:00
co-authored by Claude Opus 4.5
parent 7ec6e03c65
commit 27b46a9fe7
+12 -5
View File
@@ -5,6 +5,7 @@ Handles initialization of household registry and other startup tasks.
This module should be called during application startup to register This module should be called during application startup to register
all household members. all household members.
""" """
from src.agents.librarian import register_librarian
from src.agents.tatlock_core import TATLOCK_CORE_CAPABILITY, tatlock_core_tools from src.agents.tatlock_core import TATLOCK_CORE_CAPABILITY, tatlock_core_tools
from src.core.household_registry import get_household_registry from src.core.household_registry import get_household_registry
from src.core.logging_config import get_logger from src.core.logging_config import get_logger
@@ -21,11 +22,7 @@ def register_household_members():
Currently registers: Currently registers:
- tatlock_core: Butler's core tools (calculator, datetime, web search) - tatlock_core: Butler's core tools (calculator, datetime, web search)
- librarian: Research and knowledge management (Phase 3)
Future phases will add:
- librarian: Research and knowledge management
- developer: Software development assistance
- etc.
""" """
registry = get_household_registry() registry = get_household_registry()
@@ -45,6 +42,16 @@ def register_household_members():
tool_count=len(tatlock_core_tools), tool_count=len(tatlock_core_tools),
) )
# Register The Librarian (Phase 3)
try:
register_librarian()
except Exception as e:
# Don't fail startup if Librarian registration fails
logger.warning(
"librarian_registration_failed",
error=str(e),
)
logger.info( logger.info(
"household_registration_complete", "household_registration_complete",
total_members=len(registry), total_members=len(registry),