mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 17:38:10 +00:00
- Add test OpenClaw plugins: oc-simple (openclaw.plugin.json) and oc-pkg (package.json#extensions) - Fix plugin.go Start() to detect package.json#openclaw.extensions as OC manifest - Add hasOCExtensions() helper for package.json OC field detection - Tests: simulator with manifest entry discovery, package.json extension discovery, full Plugin.Start() -> loadOCPlugin() -> register -> call pipeline
32 lines
734 B
JavaScript
32 lines
734 B
JavaScript
module.exports = {
|
|
default: {
|
|
id: 'oc-simple',
|
|
name: 'OC Simple',
|
|
version: '1.0.0',
|
|
description: 'Simple test plugin for OpenClaw simulator',
|
|
register(api) {
|
|
api.registerTool({
|
|
name: 'greet',
|
|
description: 'Greet someone',
|
|
parameters: {
|
|
type: 'object',
|
|
properties: {
|
|
name: { type: 'string', description: 'Name to greet' },
|
|
},
|
|
required: ['name'],
|
|
},
|
|
execute(id, params) {
|
|
return `Hello, ${params.name}!`;
|
|
},
|
|
});
|
|
api.registerTool({
|
|
name: 'ping',
|
|
description: 'Health check ping',
|
|
execute(id, params) {
|
|
return 'pong';
|
|
},
|
|
});
|
|
},
|
|
},
|
|
};
|