mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-22 18:08:04 +00:00
refactor: rename openclaw -> clawhubadapter, add ClawHub search/install, fix agent interrupt
- Rename internal/plugins/openclaw/ -> internal/plugins/clawhubadapter/ - Add RegistryDispatcher with 5 sub-registries (Tool, Provider, Channel, Stage, Cap) - Add clawhubadapter_search tool for ClawHub marketplace search - Add clawhub: prefix support for installing from ClawHub (ZIP/tgz auto-detect) - Add CallProvider RPC and provider/call routing - Fix QQ interrupt: check interceptCh before/after each tool execution
This commit is contained in:
31
internal/plugins/clawhubadapter/testdata/oc-simple/index.js
vendored
Normal file
31
internal/plugins/clawhubadapter/testdata/oc-simple/index.js
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
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';
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
6
internal/plugins/clawhubadapter/testdata/oc-simple/openclaw.plugin.json
vendored
Normal file
6
internal/plugins/clawhubadapter/testdata/oc-simple/openclaw.plugin.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "oc-simple",
|
||||
"version": "1.0.0",
|
||||
"entry": "index.js",
|
||||
"description": "Simple OpenClaw test plugin"
|
||||
}
|
||||
Reference in New Issue
Block a user