refactor: restructure PrismFacet per OpenClaw plugin spec
- plugin/ directory structure: hooks/, tools/, core/
- export default { id, name, register } entry format
- globalThis state management with lifecycle protection
- WeakSet dedup on before_prompt_build hook
- Tool uses inputSchema + execute (not parameters + handler)
- additionalProperties: false in config schema
- Core logic in plugin/core/ (no plugin-sdk dependency)
- Install/uninstall script (scripts/install.mjs)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
21
plugin/openclaw.plugin.json
Normal file
21
plugin/openclaw.plugin.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"id": "prism-facet",
|
||||
"name": "PrismFacet",
|
||||
"version": "0.1.0",
|
||||
"description": "Dynamic system prompt injection via routers and rules",
|
||||
"main": "index.js",
|
||||
"configSchema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"routersDir": {
|
||||
"type": "string",
|
||||
"description": "Directory containing router .ts/.js files (default: {pluginDir}/routers)"
|
||||
},
|
||||
"rulesFile": {
|
||||
"type": "string",
|
||||
"description": "Path to rules.json (default: {pluginDir}/rules.json)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user