Buckets:

download
raw
2.07 kB
"""
GatheRing Plugin System.
Allows extending GatheRing with custom tools, competencies, and capabilities.
This module provides:
- Plugin base class for creating plugins
- Plugin metadata for discovery and dependency management
- Plugin registry for managing loaded plugins
Example:
from gathering.plugins import Plugin, PluginMetadata
from gathering.core.tool_registry import ToolDefinition, ToolCategory
from gathering.core.competency_registry import CompetencyDefinition, CompetencyCategory
class MyPlugin(Plugin):
@property
def metadata(self) -> PluginMetadata:
return PluginMetadata(
id="my_plugin",
name="My Plugin",
version="1.0.0",
description="Custom plugin",
author="Your Name",
)
def register_tools(self):
return [
ToolDefinition(
name="my_tool",
description="Does something",
category=ToolCategory.CUSTOM,
function=self.my_function,
required_competencies=[],
parameters={},
returns={},
)
]
def register_competencies(self):
return [
CompetencyDefinition(
id="my_skill",
name="My Skill",
description="A custom skill",
category=CompetencyCategory.CUSTOM,
)
]
def my_function(self):
return "Hello from plugin!"
"""
from gathering.plugins.base import Plugin, PluginMetadata, PluginStatus
from gathering.plugins.manager import (
PluginManager,
plugin_manager,
load_plugin,
unload_plugin,
get_plugin,
)
__all__ = [
# Base classes
"Plugin",
"PluginMetadata",
"PluginStatus",
# Manager
"PluginManager",
"plugin_manager",
# Convenience functions
"load_plugin",
"unload_plugin",
"get_plugin",
]

Xet Storage Details

Size:
2.07 kB
·
Xet hash:
03cc823b3c362fd9e49ab6f14909bc69f4f97b8582c207c05da2c35b83a3c29a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.