MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / StubCtx

Class StubCtx

scripts/hermes_plugin_unit_check.py:72–102  ·  view source on GitHub ↗

Minimal Hermes PluginContext stand-in WITHOUT the message-forwarding capability flag (i.e. what stock Hermes looks like to the plugin).

Source from the content-addressed store, hash-verified

70
71
72class StubCtx:
73 """Minimal Hermes PluginContext stand-in WITHOUT the message-forwarding
74 capability flag (i.e. what stock Hermes looks like to the plugin)."""
75
76 def __init__(self):
77 self.tools = {}
78 self.hooks = {}
79 self.provider = None
80 self.engine = None
81 self.config = None
82
83 def register_hook(self, name, fn):
84 self.hooks[name] = fn
85
86 def register_tool(self, name=None, toolset=None, schema=None, handler=None, **kwargs):
87 self.tools[name] = {"toolset": toolset, "schema": schema, "handler": handler}
88
89 def register_memory_provider(self, provider):
90 self.provider = provider
91
92 def register_context_engine(self, engine):
93 self.engine = engine
94
95 def register_skill(self, name, path):
96 pass
97
98 def register_config_defaults(self, defaults):
99 pass
100
101 def register_command(self, name, fn, description=""):
102 pass
103
104
105def write_fake_bin(work: Path) -> Path:

Callers 1

run_checksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected