mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-15 23:24:03 -06:00
f63f2fd3db
* fix(reef): require owner for management commands * fix(reef): preserve general command access * fix: preserve explicit owner authority * fix(discord): separate voice admission from ownership * docs(reef): explain owner command recovery * docs(reef): clarify owner recovery paths
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import {
|
|
defineBundledChannelEntry,
|
|
type OpenClawPluginApi,
|
|
} from "openclaw/plugin-sdk/channel-entry-contract";
|
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
import { registerReefCliMetadata } from "./cli-metadata.js";
|
|
|
|
const loadReefCommandsRuntime = createLazyRuntimeModule(() => import("./commands.runtime.js"));
|
|
|
|
function registerReefFullRuntime(api: OpenClawPluginApi): void {
|
|
api.registerCommand({
|
|
name: "reef",
|
|
description: "Manage Reef friends and owner review approvals",
|
|
acceptsArgs: true,
|
|
requireAuth: true,
|
|
exposeSenderIsOwner: true,
|
|
handler: async (params) => {
|
|
const { handleReefCommand } = await loadReefCommandsRuntime();
|
|
return await handleReefCommand(params);
|
|
},
|
|
});
|
|
}
|
|
|
|
export default defineBundledChannelEntry({
|
|
id: "reef",
|
|
name: "Reef",
|
|
description: "Guarded end-to-end encrypted claw channel",
|
|
importMetaUrl: import.meta.url,
|
|
plugin: { specifier: "./channel-plugin-api.js", exportName: "reefPlugin" },
|
|
runtime: { specifier: "./runtime-api.js", exportName: "setReefRuntime" },
|
|
registerCliMetadata: registerReefCliMetadata,
|
|
registerFull: registerReefFullRuntime,
|
|
});
|