@micro-harnesses/plugin-example-tools
v4.0.0
Published
Reference tool plugin (echo, time) for @micro-harnesses/core. Doubles as a plugin-authoring example.
Downloads
3,194
Maintainers
Readme
@micro-harnesses/plugin-example-tools
Reference tool/channel plugins for @micro-harnesses/core. Doubles
as plugin-authoring examples — read
src/exampleToolsPlugin.ts and
src/exampleChannelsPlugin.ts as templates for
writing your own.
Latest updates
- Provides low-risk
echoandtimereference tools plus a webhook-backed example channel plugin.
Ships
| Tool | Description | Risk |
|---|---|---|
| echo | Returns input text as-is | low |
| time | Returns current ISO time | low |
Channel plugin
ExampleWebhookChannelPlugin registers a ChannelAdapter with transport
http, dry-run support, and optional delivery through endpointUrl or
MH_EXAMPLE_WEBHOOK_URL.
Install
npm install @micro-harnesses/core @micro-harnesses/plugin-example-toolsUsage
import {
exampleToolsPlugin,
exampleWebhookChannelPlugin,
} from "@micro-harnesses/plugin-example-tools";
await pluginHost.register([exampleToolsPlugin, exampleWebhookChannelPlugin]);Or grab the raw tools:
import { echoTool, timeTool } from "@micro-harnesses/plugin-example-tools";
toolRegistry.register(echoTool);
toolRegistry.register(timeTool);Capabilities
exampleToolsPlugin: ["tools"].
exampleWebhookChannelPlugin: ["channels"].
License
MIT
