mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
- Run oxfmt --write to fix 765 files with formatting drift - Fix no-redundant-type-constituents in secrets/runtime.ts (SecretDefaults resolves to any, making | undefined redundant) - Fix no-redundant-type-constituents in plugin hook test files (error types resolve to any, simplify return types)
15 lines
422 B
TypeScript
15 lines
422 B
TypeScript
import type { AnyAgentTool, BotPluginApi, BotPluginToolFactory } from "../../src/plugins/types.js";
|
|
import { createLobsterTool } from "./src/lobster-tool.js";
|
|
|
|
export default function register(api: BotPluginApi) {
|
|
api.registerTool(
|
|
((ctx) => {
|
|
if (ctx.sandboxed) {
|
|
return null;
|
|
}
|
|
return createLobsterTool(api) as AnyAgentTool;
|
|
}) as BotPluginToolFactory,
|
|
{ optional: true },
|
|
);
|
|
}
|