Companion Technical Reference

Technical reference for Fernlight Companion: included source, reproducible asset builds, public API access, and external services.

Source included in the package

The WordPress.org edition includes human-readable PHP, JavaScript and CSS. PHP lives in inc/; block registrations and editor sources live in inc/blocks/; frontend and admin assets live in assets/. JavaScript is supplied as readable source without a transpilation step. CSS source accompanies the generated .min.css files. No private repository access is required to inspect the distributed code.

Rebuilding generated CSS

From an extracted plugin folder, use Node.js and install the build tool in a separate development directory. These commands reproduce the three generated stylesheets with lightningcss-cli 1.33.0. The other stylesheets and scripts are loaded directly and need no build step. Development tools are not needed to run the plugin.

npx --yes --package=lightningcss-cli@1.33.0 lightningcss --minify --bundle assets/css/blocks.css -o assets/css/blocks.min.css
npx --yes --package=lightningcss-cli@1.33.0 lightningcss --minify --bundle assets/css/features.css -o assets/css/features.min.css
npx --yes --package=lightningcss-cli@1.33.0 lightningcss --minify --bundle assets/css/force-light.css -o assets/css/force-light.min.css

Public and authenticated API data

Public REST routes and abilities expose design reference information: block/pattern catalogs, frontend design tokens, typography/layout settings, style variations and recommendations, and a lightweight performance summary. These references contain no draft/private page titles, page bodies, edit links, account credentials or license keys. They intentionally allow anonymous reads.

Content reports and page-specific tools require their documented WordPress capabilities. Compose Page requires editing capability, returns a recipe rather than saving content, and includes existing page matches only when the caller can edit each matched page. A general ability to edit posts does not grant access to another user’s private pages. The optional public llms.txt output is disabled by default.

External services and editions

The WordPress.org edition includes neither the Freemius SDK nor its bootstrap. It makes no licensing or external AI requests. Search and AI reports use local WordPress data. Exporting a report does not send it to an AI provider; the owner decides whether to share the downloaded file separately.

The separately distributed premium edition uses Freemius for checkout, account management, license activation and premium updates. Checkout receives the contact, billing and payment information submitted by the buyer. A connected premium installation sends account email/ID, license and installation identifiers, site URL, product version, WordPress/PHP versions and installation status during activation, synchronization, license and update checks. Optional usage collection depends on the SDK consent choices. Page content and local AI report exports are not sent to Freemius. Free features remain available without connecting. See Freemius Terms and Freemius Privacy Policy.

A Newsletter block contacts a provider only after the owner configures a form action or provider-plugin shortcode. A submitted form sends the visitor’s email and configured fields to that provider; a configured shortcode may load that provider’s assets and collect browser/network data. No provider is selected by default. The site owner must identify the actual provider, disclose its processing and obtain required consent.

For other configured services, consult that provider’s own Terms and Privacy Policy. Contact Fernlight support for questions about this reference.

AI connections and first read — Companion 1.3.13

Open Tools → Fernlight AI Connections → Connect AI Client. WordPress provides connection guidance, Site Brief, Editing Guidelines, and Draft Review; tasks run in the connected client. Start with authenticated GET /wp-json/fernlight/v1/ai/agent-brief or fernlight/get-agent-brief, confirm site identity and owner intent, then inspect the selected page before requesting a separate Pro draft.

Authenticated REST works without MCP Adapter. Optional MCP requires a separate adapter and owner-selected context/draft exposure. A successful server-side check does not verify a configured external client. Actual configured Codex/Claude acceptance remains pending. Draft tools require plan eligibility and WordPress permissions, plus selected exposure when called through MCP. Site-wide local analytics requires manage_options; the public performance summary is a separate read-only reference.

The Client Handoff Guide supplies written instructions; Agency Client Admin Restrictions changes admin access separately. Source-version tokens and retry identifiers are not required; repeated draft creation can create separate drafts. See the AI Tools Guide for the full workflow.