fix(inspector): avoid placeholder hook scans

This commit is contained in:
Vincent Koc 2026-04-28 16:23:11 -07:00
parent 860f46b1c1
commit 6dc166f898
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ const manifest = JSON.parse(read("openclaw.plugin.json"));
const errors = [];
for (const hook of surface.hooks) {
if (!hooksSource.includes(`api.on("${hook}"`)) {
if (!hooksSource.includes(`api.on(${JSON.stringify(hook)}`)) {
errors.push(`missing hook coverage: ${hook}`);
}
}

View File

@ -39,7 +39,7 @@ console.log(
function renderHooks({ hooks, packageVersion }) {
return `${header(packageVersion)}
export function registerAllHooks(api) {
${hooks.map((hook) => ` api.on("${hook}", kitchenSinkHook("${hook}"));`).join("\n")}
${hooks.map((hook) => ` api.on(${JSON.stringify(hook)}, kitchenSinkHook(${JSON.stringify(hook)}));`).join("\n")}
}
function kitchenSinkHook(name) {