mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-16 20:40:45 +00:00
31 lines
977 B
TypeScript
31 lines
977 B
TypeScript
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
import { registerSandboxBackend } from "openclaw/plugin-sdk/core";
|
|
import {
|
|
createOpenShellSandboxBackendFactory,
|
|
createOpenShellSandboxBackendManager,
|
|
} from "./src/backend.js";
|
|
import { createOpenShellPluginConfigSchema, resolveOpenShellPluginConfig } from "./src/config.js";
|
|
|
|
const plugin = {
|
|
id: "openshell",
|
|
name: "OpenShell Sandbox",
|
|
description: "OpenShell-backed sandbox runtime for agent exec and file tools.",
|
|
configSchema: createOpenShellPluginConfigSchema(),
|
|
register(api: OpenClawPluginApi) {
|
|
if (api.registrationMode !== "full") {
|
|
return;
|
|
}
|
|
const pluginConfig = resolveOpenShellPluginConfig(api.pluginConfig);
|
|
registerSandboxBackend("openshell", {
|
|
factory: createOpenShellSandboxBackendFactory({
|
|
pluginConfig,
|
|
}),
|
|
manager: createOpenShellSandboxBackendManager({
|
|
pluginConfig,
|
|
}),
|
|
});
|
|
},
|
|
};
|
|
|
|
export default plugin;
|