Skip to content

Prototype of WebSearch extension#56

Open
tony-nekola-silk wants to merge 3 commits intoldayton:mainfrom
tony-nekola-silk:tony/add-web-search-approve
Open

Prototype of WebSearch extension#56
tony-nekola-silk wants to merge 3 commits intoldayton:mainfrom
tony-nekola-silk:tony/add-web-search-approve

Conversation

@tony-nekola-silk
Copy link

Summary

  • Add WebSearch tool rules support (allow-web, ask-web, deny-web, after-web directives)
  • Pattern matching against search query strings using fnmatch globs
  • Refactor PostToolUse hook output to use proper JSON structure with hookSpecificOutput

Changes

  • config.py: Add web_rules and after_web_rules to Config, parsing logic, and matching functions
  • dippy.py: Route WebSearch tools through web rules, add post_tool_response() helper for structured JSON output
  • docs/config.md: Document WebSearch rules syntax and usage
  • tests/test_config.py: Comprehensive tests for parsing, matching, and end-to-end behavior

@tony-nekola-silk tony-nekola-silk force-pushed the tony/add-web-search-approve branch 3 times, most recently from 40da64a to 388d628 Compare January 22, 2026 23:44
@ldayton ldayton changed the title Add WebSearch auto-approval support Prototype of WebSearch extension Jan 23, 2026
Add config directives to control WebSearch tool approval:
- allow-web [pattern]: auto-approve all or matching web searches
- ask-web <pattern> [message]: prompt for matching queries
- deny-web <pattern> [message]: block matching queries
- after-web <pattern> [message]: post-search feedback to AI

Follows the existing MCP tool pattern with dedicated web-specific
directives for cleaner separation.
- Extend web rules to WebFetch tool (matches against URL)
- Add Gemini CLI tool support: google_web_search, web_fetch
- Update documentation with tool name mapping table
- Add end-to-end tests for WebFetch and Gemini CLI tools
@tony-nekola-silk tony-nekola-silk force-pushed the tony/add-web-search-approve branch from 388d628 to 6ed804e Compare January 29, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant