MAESTRO: Fix OpenClaw SDK API mismatch — use real PluginApi interface
E2E testing against the official OpenClaw Docker image revealed the plugin was built against a custom interface that didn't match the real SDK: - api.log() → api.logger.info/warn/error() (PluginLogger interface) - api.getConfig() → api.pluginConfig (direct property) - command handler (args[], ctx) → (ctx) with ctx.args string - service stop optional, service context typed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,17 @@ let registeredCommand = null;
|
||||
const logs = [];
|
||||
|
||||
const mockApi = {
|
||||
getConfig: () => ({}),
|
||||
log: (message) => {
|
||||
logs.push(message);
|
||||
id: "claude-mem",
|
||||
name: "Claude-Mem (Persistent Memory)",
|
||||
version: "1.0.0",
|
||||
source: "/test/extensions/claude-mem/dist/index.js",
|
||||
config: {},
|
||||
pluginConfig: {},
|
||||
logger: {
|
||||
info: (message) => { logs.push(message); },
|
||||
warn: (message) => { logs.push(message); },
|
||||
error: (message) => { logs.push(message); },
|
||||
debug: (message) => { logs.push(message); },
|
||||
},
|
||||
registerService: (service) => {
|
||||
registeredService = service;
|
||||
|
||||
Reference in New Issue
Block a user