21 lines
620 B
TypeScript
21 lines
620 B
TypeScript
import { definePluginEntry } from "openclaw/plugin-sdk/core";
|
|
import type { AnyAgentTool, OpenClawPluginApi, OpenClawPluginToolFactory } from "./runtime-api.js";
|
|
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 },
|
|
);
|
|
},
|
|
});
|