feat(#589): wire WebToolsConfig to web search/fetch tools#663
feat(#589): wire WebToolsConfig to web search/fetch tools#663AlexMikhalev merged 6 commits intomainfrom
Conversation
- Update doc comments to match actual implementation - Document env var fallback behavior - Change provider names from brave/searxng/google to exa/kimi_search Part of: #589
- Add from_config() method that accepts Option<&WebToolsConfig> - Support provider selection via config.search_provider - Fall back to environment variables when config not provided - Extract from_env_inner() helper for code reuse - Maintain backward compatibility with existing new() and from_env() Part of: #589
- Add from_config() method that accepts Option<&WebToolsConfig> - Support fetch mode selection via config.fetch_mode - Defaults to raw when config not provided or mode not specified - Maintain backward compatibility with existing new() and with_mode() Part of: #589
- Update create_default_registry signature to accept Option<&WebToolsConfig> - Use from_config() instead of new() for web tools in registry - Update main.rs to pass config.tools.web to registry creation - Both agent mode and gateway mode now respect web_tools config Part of: #589
- Add provider_name() test helper to WebSearchTool - Add tests for WebSearchTool::from_config(): - test_web_search_from_config_exa - test_web_search_from_config_kimi - test_web_search_from_config_fallback - test_web_search_from_config_unknown_provider - Add tests for WebFetchTool::from_config(): - test_web_fetch_from_config_raw - test_web_fetch_from_config_readability - test_web_fetch_from_config_fallback - test_web_fetch_from_config_none_mode Part of: #589
- Add test_web_tools_config_wired_to_registry - Add test_registry_without_web_tools_config - Add test_all_expected_tools_registered - Verify config values flow through to tool registry Part of: #589
Validation Report: Issue #589 - Wire WebToolsConfig to Web Search/Fetch ToolsStatus: VALIDATED Executive SummaryPR #663 successfully implements the wiring of Validation Decision: APPROVED for release Requirements TraceabilityOriginal Requirements (from Research)
System Test ResultsEnd-to-End Scenarios
Data Flow VerificationVerification: Integration test Non-Functional RequirementsPerformance
Security
Maintainability
Acceptance TestingAcceptance Criteria (from Research Success Criteria)
User Workflow ValidationWorkflow: User configures web tools in config file and starts TinyClaw
Validation: Integration test Defect Register
Sign-offStakeholder Acceptance
Release Readiness
Gate ChecklistSystem Testing
Acceptance Testing
Quality Gates
Validation DecisionAPPROVED for Release PR #663 successfully implements Issue #589:
Signatures
AppendixTest OutputFull test output available in verification report. Key results:
Files Changed
|
Summary
Closes #589 by wiring the existing
WebToolsConfigthrough toWebSearchToolandWebFetchTool, allowing configuration file settings to control search provider and fetch mode.Changes
Core Implementation
WebSearchTool::from_config()- selects provider based onconfig.search_providerWebFetchTool::from_config()- selects mode based onconfig.fetch_modecreate_default_registry()to acceptOption<&WebToolsConfig>parametermain.rscall sites to pass the configDocumentation
WebToolsConfigdoc comments to match actual provider names ("exa", "kimi_search")from_config()methodsTesting
from_config()methodsBackward Compatibility
WebSearchTool::new()andWebFetchTool::new()continue to work as beforeConfiguration Example
Checklist