headroomlabs-ai/headroom · error · Error

headroom-openclaw default export must expose register(api)

Error message

headroom-openclaw default export must expose register(api)

What it means

Error "headroom-openclaw default export must expose register(api)" thrown in headroomlabs-ai/headroom.

Source

Thrown at scripts/verify_npm_release_assets.mjs:86

function runNpm(args, cwd) {
  if (process.platform === "win32") {
    return spawnSync("cmd.exe", ["/d", "/s", "/c", "npm.cmd", ...args], {
      cwd,
      encoding: "utf8",
    });
  }

  return spawnSync("npm", args, {
    cwd,
    encoding: "utf8",
  });
}

function assertOpenClawExtensionContract(cwd) {
  const smoke = `
    const mod = await import("headroom-openclaw");
    if (typeof mod.default?.register !== "function") {
      throw new Error("headroom-openclaw default export must expose register(api)");
    }
    if (typeof mod.registerHeadroomPlugin !== "function") {
      throw new Error("headroom-openclaw must export registerHeadroomPlugin(api)");
    }
    if (mod.default.register !== mod.registerHeadroomPlugin) {
      throw new Error("headroom-openclaw default.register must match registerHeadroomPlugin");
    }
  `;
  const result = spawnSync(process.execPath, ["--input-type=module", "-e", smoke], {
    cwd,
    encoding: "utf8",
  });
  if (result.status !== 0) {
    throw new Error(
      `headroom-openclaw import smoke failed: ${
        result.error?.message || result.stderr || result.stdout || "unknown error"
      }`,
    );

View on GitHub (pinned to 322425c43b)

Solutions

  1. Ensure the headroom-openclaw package's default export is an object exposing a register(api) function
  2. Check the package entry point (exports/main) points at the built file that defines register

When it happens

Trigger: Raised by the npm release verifier when the headroom-openclaw tarball's default export lacks the expected register(api) plugin entry point.

Common situations: See trigger scenarios.


AI-assisted analysis of headroomlabs-ai/headroom@322425c43b (2026-08-15). Data as JSON: /api/errors/fdf67126670de99d. Report an issue: GitHub.