Coverage for merco/plugins/builtin/web/plugin.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.15.0, created at 2026-07-07 14:04 +0800

1"""Web plugin — registers web tools.""" 

2from __future__ import annotations 

3 

4import logging 

5from typing import TYPE_CHECKING 

6 

7from merco.plugins.base import Plugin 

8 

9if TYPE_CHECKING: 

10 from merco.plugins.base import PluginContext 

11 

12logger = logging.getLogger("merco.plugins.web") 

13 

14 

15class WebPlugin(Plugin): 

16 """Registers WebFetch and WebSearch tools.""" 

17 

18 name = "web" 

19 version = "1.0.0" 

20 description = "Registers web tools (fetch and search)" 

21 

22 async def activate(self, ctx: "PluginContext") -> None: 

23 from merco.tools.web_tools import WebFetch, WebSearch 

24 

25 ctx.register_tool(WebFetch()) 

26 ctx.register_tool(WebSearch()) 

27 

28 logger.info("Web plugin activated")