- Fix production bug in send_whatsapp_message: access 'instance_url' instead
of 'server_url' to match SendMessageScheme TypedDict definition
- Update webhook test to use test_app with in-memory dependencies
- Mock send_whatsapp_message to avoid real HTTP calls in tests
- Add assertions to verify correct parameters passed to send_whatsapp_message
Bug: send_whatsapp_message accessed request_data['server_url'] but
SendMessageScheme defines field as 'instance_url', causing KeyError when
webhook tries to send WhatsApp messages.
- Add mock_chat_anthropic and mock_chat_deepseek fixtures to conftest.py
- Update test_llm_factory to use monkeypatch and mock fixtures
- Import ChatAnthropic and ChatDeepSeek in conftest.py for spec creation
- Tests now pass without requiring ANTHROPIC_API_KEY or DEEPSEEK_API_KEY
- Execution time reduced from failing after 0.12s to passing in 0.01s
This change allows factory tests to run in isolation without external
dependencies, making them consistent with the API test approach and
suitable for any development environment or CI/CD pipeline.
- Replace PostgreSQL AsyncPostgresSaver with MemorySaver in test fixtures
- Create test_app fixture with test_lifespan using in-memory dependencies
- Mock LLM model to avoid requiring API keys during tests
- Update test_api.py to use test_app fixture instead of production app
- Fix test_root endpoint URL to match root_path configuration
- All API tests now pass without requiring external services (0.06s vs 30s+ timeout)
This change allows tests to run in isolation without PostgreSQL or API keys,
making them faster and more reliable for CI/CD and local development.
- Add `_extract_mcp_content_text()` helper in naliia_tools.py to safely
extract text from MCP results, preventing IndexError on empty content
- Replace all direct `result.content[0].text` accesses with safe helper
- Improve customer identification with preservation of existing state
- Add proper JSON parsing with fallback and error handling
- Simplify webhook state management (use agent's checkpointer internally)
- Update system prompt to remove check_mcp_connection tool reference
- Fix tests to use async mocks and correct expected values
- Agent now auto-calls find_customer_by_identifier when user provides identifier
- Added register_customer and check_mcp_connection tools
- Refactored chat_hook to resume existing conversations from state
- Reduced default max_iterations (100) and timeout (15s)
- Rename Dockerfile to DockerfileTest for development variant
- Remove poetry.lock from COPY (regenerated during build)
- Add --reload flag to uvicorn for development
- Add src volume mount in docker-compose for hot-reload
- Update docker-compose to use DockerfileTest
- Update prompt to use customer name for personalized greetings
- Pass state to tools via agent execution
- schedule_appointment now gets customer_id from state if not provided
- Add identify_customer_node to Agent class for customer lookup
- Webhook now only passes customer_phone to agent state
- Customer identification happens in agent flow: START -> identify_customer -> llm_call -> tool_node -> END
- Add find_customer_by_identifier tool to NaliiaTools
- Add customer_name and customer_id to MessagesState schema
- Update NALIIA_PROMPT template with new tools
- Integrate customer lookup in chat webhook using phone number