Open-source SEO, GEO, and marketing skills for AI agents.
fix(notfair-cmo): make standalone publishable + move portal to 3327 (0.25.1)
Yuting Zhong6f3d61bce3c8
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 5f6c2050..49b106f1 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -5,14 +5,14 @@},"metadata": {"description": "The official Google Ads + Meta Ads + SEO + GEO plugin from NotFair. SEO, GEO, Google Ads, and Meta Ads skills for Claude Code.",- "version": "0.25.0"+ "version": "0.25.1"},"plugins": [{"name": "notfair","source": "./","description": "The official Google Ads + Meta Ads + SEO + GEO plugin from NotFair. SEO analysis, Google Ads management, Meta (Facebook + Instagram) Ads management, GSC-driven content planning + local calendar viewer, opt-in OpenClaw cron publisher to a NotFair webhook, keyword research, content optimization, schema markup, meta tags optimization, broken link checker, single-page deep audit, and Generative Engine Optimization for AI search.",- "version": "0.25.0",+ "version": "0.25.1","author": {"name": "NotFair","url": "https://notfair.co"diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex b8055284..3b801352 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "notfair",- "version": "0.25.0",+ "version": "0.25.1","description": "The official Google Ads + Meta Ads + SEO + GEO plugin from NotFair. SEO analysis, Google Ads management, Meta (Facebook + Instagram) Ads management, keyword research, content optimization, schema markup tools, broken link checker, single-page deep audit, and Generative Engine Optimization (GEO) for AI search engines — powered by Google Search Console, Google Ads, and Meta Marketing APIs.","author": {"name": "NotFair",diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7348ce28..168a9b1d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,6 +11,20 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).---+## [0.25.1] — 2026-05-24++### Fixed++- **`notfair-cmo` standalone build now boots.** The published tarball crashed on launch with `Cannot find module 'bindings'` — `better-sqlite3`'s native loader was present in the pnpm store but not at a path Node could resolve. `scripts/copy-standalone-assets.mjs` now hoists `bindings` and `file-uri-to-path` into the standalone's top-level `node_modules/`.+- **`notfair-cmo` `package.json`** — corrected the `bin` path (`./bin/cli.mjs` → `bin/cli.mjs`, which npm 11 was stripping at publish), set first real release version `0.1.0`, and added an `os`/`cpu` guard (`darwin`/`arm64`) so unsupported platforms fail install cleanly instead of crashing at runtime.++### Changed++- **Portal default port moved `3000` → `3327`** (dev server stays on `3326`), avoiding the common `3000` collision and keeping dev/published ports adjacent. `/notfair:cmo` and the `notfair-cmo` CLI now use `3327`.+- **`next.config.ts`** — added `allowedDevOrigins: ["127.0.0.1"]` so the dev server hydrates when opened on the loopback IP.++---+## [0.25.0] — 2026-05-24### Addeddiff --git a/VERSION b/VERSIONindex d21d277b..af2dabf3 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.25.0+0.25.1diff --git a/notfair-cmo-skill/SKILL.md b/notfair-cmo-skill/SKILL.mdindex d6c7a738..a5a75e1a 100644--- a/notfair-cmo-skill/SKILL.md+++ b/notfair-cmo-skill/SKILL.md@@ -17,7 +17,7 @@ allowed-tools:Open the local NotFair CMO portal in the user's browser.-The portal is a Node app (`notfair-cmo`) that runs on `http://127.0.0.1:3000` and lets the user chat with specialist marketing agents (CMO, Google Ads, SEO), schedule recurring work, and watch tool calls stream inline. Source: [`notfair-cmo/`](../notfair-cmo/). Distributed via `npx notfair-cmo@latest`.+The portal is a Node app (`notfair-cmo`) that runs on `http://127.0.0.1:3327` and lets the user chat with specialist marketing agents (CMO, Google Ads, SEO), schedule recurring work, and watch tool calls stream inline. Source: [`notfair-cmo/`](../notfair-cmo/). Distributed via `npx notfair-cmo@latest`.This skill **does not implement the portal** — it only launches it. If you need to change portal behavior, edit `notfair-cmo/` and ship via its own npm release.@@ -25,14 +25,14 @@ This skill **does not implement the portal** — it only launches it. If you nee## Default port-`3000` unless the user specifies otherwise (`--port`). If 3000 is busy, the portal's CLI auto-probes the next 5 ports.+`3327` unless the user specifies otherwise (`--port`). If 3327 is busy, the portal's CLI auto-probes the next 5 ports. (The dev server uses `3326`; the published portal uses `3327`.)---## Step 1: Probe — is it already running?```bash-PORT=3000+PORT=3327if curl -fsS --max-time 1 -o /dev/null "http://127.0.0.1:$PORT/" 2>/dev/null; thenecho "RUNNING"elsediff --git a/notfair-cmo/bin/cli.mjs b/notfair-cmo/bin/cli.mjsindex cc171e82..db3fe549 100755--- a/notfair-cmo/bin/cli.mjs+++ b/notfair-cmo/bin/cli.mjs@@ -32,7 +32,7 @@ programprogram.command("start", { isDefault: true }).description("Start the local server and open the UI in your browser.")- .option("-p, --port <port>", "Port to bind", "3000")+ .option("-p, --port <port>", "Port to bind", "3327").option("--no-open", "Do not auto-open the browser").option("--data-dir <dir>", "Override data directory", DATA_DIR).action(async (opts) => {@@ -88,7 +88,7 @@ program.command("doctor").description("Verify this machine is ready to run notfair-cmo.").option("--data-dir <dir>", "Override data directory", DATA_DIR)- .option("-p, --port <port>", "Preferred port for the server", "3000")+ .option("-p, --port <port>", "Preferred port for the server", "3327").action(async (opts) => {const results = [];diff --git a/notfair-cmo/next.config.ts b/notfair-cmo/next.config.tsindex fc6391dd..cf983a1e 100644--- a/notfair-cmo/next.config.ts+++ b/notfair-cmo/next.config.ts@@ -3,9 +3,15 @@ import type { NextConfig } from "next";const config: NextConfig = {output: "standalone",serverExternalPackages: ["better-sqlite3", "keytar"],+ // The CLI opens the portal on 127.0.0.1, but the Next dev server's origin is+ // localhost. Without this, dev resources are blocked cross-origin and the+ // client never hydrates (blank shell). Allow the loopback IP explicitly.+ allowedDevOrigins: ["127.0.0.1"],// pnpm + standalone output drops transitive deps that Next.js's own// compiled chunks require at runtime (e.g. @swc/helpers, @next/env).- // Force-include them so the published tarball boots.+ // Force-include them so the published tarball boots. (better-sqlite3's+ // native loader `bindings` is present but unresolvable in the standalone+ // tree; scripts/copy-standalone-assets.mjs hoists it to a resolvable path.)outputFileTracingIncludes: {"*": ["./node_modules/@swc/helpers/**/*",diff --git a/notfair-cmo/package.json b/notfair-cmo/package.jsonindex 4677890e..32d1dc9d 100644--- a/notfair-cmo/package.json+++ b/notfair-cmo/package.json@@ -1,10 +1,10 @@{"name": "notfair-cmo",- "version": "0.1.0-alpha.0",+ "version": "0.1.0","description": "Open-source AI marketing CMO portal. Run locally; orchestrates OpenClaw marketing agents (Google Ads, SEO, and more).","license": "MIT","bin": {- "notfair-cmo": "./bin/cli.mjs"+ "notfair-cmo": "bin/cli.mjs"},"files": ["bin/",@@ -87,5 +87,11 @@"unrs-resolver","node-pty"]- }+ },+ "os": [+ "darwin"+ ],+ "cpu": [+ "arm64"+ ]}diff --git a/notfair-cmo/scripts/copy-standalone-assets.mjs b/notfair-cmo/scripts/copy-standalone-assets.mjsindex d464c758..16c8c276 100644--- a/notfair-cmo/scripts/copy-standalone-assets.mjs+++ b/notfair-cmo/scripts/copy-standalone-assets.mjs@@ -59,6 +59,40 @@ rmSync(STANDALONE, { recursive: true, force: true });renameSync(DEREF, STANDALONE);console.log(`Dereferenced symlinks under ${STANDALONE.replace(ROOT + "/", "")}`);+// Hoist native-module loaders to a resolvable location. better-sqlite3 is a+// serverExternalPackage, so Next leaves its `require('bindings')` as a runtime+// resolve. pnpm nests `bindings` (and its dep `file-uri-to-path`) under+// node_modules/.pnpm/<pkg>@<ver>/..., where Node's resolver — walking up from+// better-sqlite3's own dir — never looks. Copying them to the top-level+// node_modules/ makes them resolvable from every better-sqlite3 copy (both the+// top-level one and Turbopack's hashed .next/node_modules alias). Without this,+// the published tarball boots straight into `Cannot find module 'bindings'`.+const STANDALONE_NM = join(STANDALONE, "node_modules");+for (const pkg of ["bindings", "file-uri-to-path"]) {+ const dest = join(STANDALONE_NM, pkg);+ if (existsSync(dest)) continue;+ const src = findInPnpm(pkg, STANDALONE_NM) ?? findInPnpm(pkg, join(ROOT, "node_modules"));+ if (!src) {+ console.warn(`Warning: could not locate '${pkg}' to hoist; standalone may fail to load better-sqlite3.`);+ continue;+ }+ cpSync(src, dest, { recursive: true });+ console.log(`Hoisted ${pkg} → ${dest.replace(ROOT + "/", "")}`);+}++// Locate a package's real directory inside a pnpm store+// (<nm>/.pnpm/<pkg>@<ver>/node_modules/<pkg>). Returns the first match or null.+function findInPnpm(pkg, nodeModules) {+ const pnpmDir = join(nodeModules, ".pnpm");+ if (!existsSync(pnpmDir)) return null;+ for (const entry of readdirSync(pnpmDir)) {+ if (!entry.startsWith(`${pkg}@`)) continue;+ const candidate = join(pnpmDir, entry, "node_modules", pkg);+ if (existsSync(candidate)) return candidate;+ }+ return null;+}+// Sanity check: there should be no symlinks left in standalone after dereferencing.const remaining = countSymlinks(STANDALONE);if (remaining > 0) {