{"record":{"id":"19fc243fed7b6071","repo":"headroomlabs-ai/headroom","slug":"headroom-openclaw-must-export-registerheadroomplug","errorCode":null,"errorMessage":"headroom-openclaw must export registerHeadroomPlugin(api)","messagePattern":"headroom-openclaw must export registerHeadroomPlugin\\(api\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/verify_npm_release_assets.mjs","lineNumber":89,"sourceCode":"      cwd,\n      encoding: \"utf8\",\n    });\n  }\n\n  return spawnSync(\"npm\", args, {\n    cwd,\n    encoding: \"utf8\",\n  });\n}\n\nfunction assertOpenClawExtensionContract(cwd) {\n  const smoke = `\n    const mod = await import(\"headroom-openclaw\");\n    if (typeof mod.default?.register !== \"function\") {\n      throw new Error(\"headroom-openclaw default export must expose register(api)\");\n    }\n    if (typeof mod.registerHeadroomPlugin !== \"function\") {\n      throw new Error(\"headroom-openclaw must export registerHeadroomPlugin(api)\");\n    }\n    if (mod.default.register !== mod.registerHeadroomPlugin) {\n      throw new Error(\"headroom-openclaw default.register must match registerHeadroomPlugin\");\n    }\n  `;\n  const result = spawnSync(process.execPath, [\"--input-type=module\", \"-e\", smoke], {\n    cwd,\n    encoding: \"utf8\",\n  });\n  if (result.status !== 0) {\n    throw new Error(\n      `headroom-openclaw import smoke failed: ${\n        result.error?.message || result.stderr || result.stdout || \"unknown error\"\n      }`,\n    );\n  }\n}\n","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/scripts/verify_npm_release_assets.mjs#L71-L107","documentation":"Error \"headroom-openclaw must export registerHeadroomPlugin(api)\" thrown in headroomlabs-ai/headroom.","triggerScenarios":"Raised by the npm release verifier when the headroom-openclaw package does not export the expected registerHeadroomPlugin named function.","commonSituations":"See trigger scenarios.","solutions":["Export registerHeadroomPlugin(api) as a named export from the headroom-openclaw entry point","Verify the build output did not tree-shake or rename the export"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}