From c2fb28301c61dd378af8dd00e7d6776f80894bef Mon Sep 17 00:00:00 2001 From: zhi Date: Thu, 5 Mar 2026 19:02:53 +0000 Subject: [PATCH] fix: rename init() to register() for OpenClaw plugin API OpenClaw expects 'register' or 'activate' export, not 'init' --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index f264981..f96f1a4 100644 --- a/index.js +++ b/index.js @@ -11,8 +11,8 @@ const { SlashCommandHandler } = require('./safe-restart/dist/index.js'); -// Plugin initialization function -function init(api, config) { +// Plugin registration function (OpenClaw expects 'register' or 'activate') +function register(api, config) { const logger = api.logger || { info: console.log, error: console.error }; logger.info('PaddedCell plugin initializing...'); @@ -63,7 +63,7 @@ function init(api, config) { } // Export for OpenClaw -module.exports = { init }; +module.exports = { register }; // Also export individual modules for direct use module.exports.pcexec = pcexec;