fix: use OpenClaw plugin SDK format with api.registerTool()

- Change index.js to export init() function that receives api
- Use api.registerTool() to dynamically register tools
- Remove tools array from manifest (not needed for dynamic registration)
- Add passMgrPath to configSchema
This commit is contained in:
zhi
2026-03-05 18:57:58 +00:00
parent 858538aaad
commit 27a94d1da7
2 changed files with 70 additions and 24 deletions

View File

@@ -7,19 +7,8 @@
"configSchema": {
"type": "object",
"properties": {
"enabled": { "type": "boolean", "default": true }
"enabled": { "type": "boolean", "default": true },
"passMgrPath": { "type": "string", "default": "/root/.openclaw/bin/pass_mgr" }
}
},
"tools": [
{
"name": "pcexec",
"entry": "./pcexec/dist/index.js",
"description": "Safe exec with password sanitization"
},
{
"name": "safe_restart",
"entry": "./safe-restart/dist/index.js",
"description": "Safe coordinated restart"
}
]
}
}