25 lines
607 B
TypeScript
25 lines
607 B
TypeScript
import {
|
|
definePluginEntry,
|
|
type AnyAgentTool,
|
|
type OpenClawPluginApi,
|
|
type OpenClawPluginToolFactory,
|
|
} from "openclaw/plugin-sdk/lobster";
|
|
import { createLobsterTool } from "./src/lobster-tool.js";
|
|
|
|
export default definePluginEntry({
|
|
id: "lobster",
|
|
name: "Lobster",
|
|
description: "Optional local shell helper tools",
|
|
register(api: OpenClawPluginApi) {
|
|
api.registerTool(
|
|
((ctx) => {
|
|
if (ctx.sandboxed) {
|
|
return null;
|
|
}
|
|
return createLobsterTool(api) as AnyAgentTool;
|
|
}) as OpenClawPluginToolFactory,
|
|
{ optional: true },
|
|
);
|
|
},
|
|
});
|