fix: rename init() to register() for OpenClaw plugin API
OpenClaw expects 'register' or 'activate' export, not 'init'
This commit is contained in:
6
index.js
6
index.js
@@ -11,8 +11,8 @@ const {
|
|||||||
SlashCommandHandler
|
SlashCommandHandler
|
||||||
} = require('./safe-restart/dist/index.js');
|
} = require('./safe-restart/dist/index.js');
|
||||||
|
|
||||||
// Plugin initialization function
|
// Plugin registration function (OpenClaw expects 'register' or 'activate')
|
||||||
function init(api, config) {
|
function register(api, config) {
|
||||||
const logger = api.logger || { info: console.log, error: console.error };
|
const logger = api.logger || { info: console.log, error: console.error };
|
||||||
|
|
||||||
logger.info('PaddedCell plugin initializing...');
|
logger.info('PaddedCell plugin initializing...');
|
||||||
@@ -63,7 +63,7 @@ function init(api, config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Export for OpenClaw
|
// Export for OpenClaw
|
||||||
module.exports = { init };
|
module.exports = { register };
|
||||||
|
|
||||||
// Also export individual modules for direct use
|
// Also export individual modules for direct use
|
||||||
module.exports.pcexec = pcexec;
|
module.exports.pcexec = pcexec;
|
||||||
|
|||||||
Reference in New Issue
Block a user