mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 15:30:39 +00:00
19 lines
450 B
TypeScript
19 lines
450 B
TypeScript
import type {
|
|
AnyAgentTool,
|
|
OpenClawPluginApi,
|
|
OpenClawPluginToolFactory,
|
|
} from "openclaw/plugin-sdk/lobster";
|
|
import { createLobsterTool } from "./src/lobster-tool.js";
|
|
|
|
export default function register(api: OpenClawPluginApi) {
|
|
api.registerTool(
|
|
((ctx) => {
|
|
if (ctx.sandboxed) {
|
|
return null;
|
|
}
|
|
return createLobsterTool(api) as AnyAgentTool;
|
|
}) as OpenClawPluginToolFactory,
|
|
{ optional: true },
|
|
);
|
|
}
|