Files
openclaw/extensions/reef/index.ts
Pavan Kumar Gondhi f63f2fd3db fix(reef): restrict management commands to owners [AI] (#118578)
* 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
2026-08-03 23:18:05 +05:30

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,
});