mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
19 lines
432 B
TypeScript
19 lines
432 B
TypeScript
import type {
|
|
AnyAgentTool,
|
|
BotPluginApi,
|
|
BotPluginToolFactory,
|
|
} from "@hanzo/bot/plugin-sdk/runbook";
|
|
import { createRunbookTool } from "./src/runbook-tool.js";
|
|
|
|
export default function register(api: BotPluginApi) {
|
|
api.registerTool(
|
|
((ctx) => {
|
|
if (ctx.sandboxed) {
|
|
return null;
|
|
}
|
|
return createRunbookTool(api) as AnyAgentTool;
|
|
}) as BotPluginToolFactory,
|
|
{ optional: true },
|
|
);
|
|
}
|