headroomlabs-ai/headroom · error · Error

headroom-openclaw must export registerHeadroomPlugin(api)

Error message

headroom-openclaw must export registerHeadroomPlugin(api)

What it means

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

Source

Thrown at scripts/verify_npm_release_assets.mjs:89

      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. Export registerHeadroomPlugin(api) as a named export from the headroom-openclaw entry point
  2. Verify the build output did not tree-shake or rename the export

When it happens

Trigger: Raised by the npm release verifier when the headroom-openclaw package does not export the expected registerHeadroomPlugin named function.

Common situations: See trigger scenarios.


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