Skip to content

New: AI agent integration via Model Context Protocol (MCP).Learn more

Packages

The authoring layer ships as five npm packages in the @evolve-framework/* scope. Four are required for a standard install, one is an opt-in addon for headless workflows.

graph TD
    Core[authoring-core<br/>types, queries, codegen]
    Chrome[authoring-chrome<br/>React editor UI]
    Server[authoring-server<br/>Fastify HTTP routes]
    Providers[authoring-ai-providers<br/>LLM + image + video]
    Workflows[authoring-workflows<br/>opt-in addon]

    Chrome -- peer --> Core
    Server -- peer --> Core
    Server -- peer --> Providers
    Workflows -- peer --> Server
    Workflows -- peer --> Providers
    Workflows -- peer --> Core

Universal types, GraphQL queries, session helpers, and page/block schemas shared across the rest of the stack. Side-effect free, so it is safe in both browser and Node.

What you get:

  • Shared types: PageData, BlockData, locale and slug helpers in ./types/*
  • Typed GraphQL operations: ./library/types and ./library/queries for CMS reads
  • Session helpers: FederatedToken cookie helpers and signer in ./auth and ./auth/server
  • AI tool schemas: zod-based tool input schemas plus the schema-prompt builder shared by the chat agent and workflows
  • Codegen plugin: a graphql-codegen plugin at ./codegen that walks fragments in your project’s documents and emits a runtime authoringSchemaRegistry plus a typed gateway-schema.ts of zod validators

Every other authoring package declares authoring-core as a peer dependency. Keep the major version in sync across the set.

React UI surface for the editor: drawer, content-console (chat panel), push dialog, page renderer, editor overlays, AutoEditable, host bindings, and preview helpers.

What you mount:

  • <AuthoringChromeMount>: client component that wraps your app shell with the chat panel and the editor drawer
  • <AuthoringServerMount>: server component for Next.js layouts that gate visibility on the session
  • Bindings: a typed DI surface (useRouter, localizedPathFor, RenderBlock, schema registry, feature flags) you wire in once per project

The chrome bundles its own stylesheet into the JS chunk: no separate CSS file to symlink or serve. Shoppers never download the chrome because the shell is loaded lazily through next/dynamic.

Peer dependencies: React 19, react-dom 19, Next.js 15+, tailwindcss (optional, only if your storefront already uses it for layout).

Fastify plugin that exposes the HTTP route surface the chrome calls: streaming chat, library reads, push to CMS, image and video generation, suggest-prompt, skills, and preview. Optionally also mounts an MCP endpoint for headless AI clients.

import {
mountAuthoringEditor,
registerAuthoringMcp,
buildBuiltinAuthoringTools,
createAuthoringToolFromGenerated,
} from "@evolve-framework/authoring-server";
await mountAuthoringEditor(app, {
signerKeys,
gatewayUrl: config.GATEWAY_URL,
ai: buildAiProviderConfig(),
contentful: { spaceId, environment, locale },
});
// Optional, opt-in: serve the same tools over MCP.
registerAuthoringMcp(app, {
tools: [
...buildBuiltinAuthoringTools({ /* ... */ }),
...generatedMcpTools.map((tool) =>
createAuthoringToolFromGenerated(tool, { /* ... */ }),
),
],
gatewayEndpoint: config.GATEWAY_URL,
});

What you mount on a Fastify host. The package owns its route handlers, pre-handler auth, and OpenAPI metadata. Your host wires:

  • CORS hooks: origin allowlist for the chrome’s cross-origin calls
  • Swagger plugin: tags and spec mount, so the editor’s routes show up in your API docs
  • Body limits and content-type parsers: for the upload-asset endpoint

The /mcp route is opt-in — don’t call registerAuthoringMcp and the server behaves exactly as before. When you do mount it, tools come from a project-owned authoring-operations.graphql compiled by @evolve-framework/mcp-core’s codegen, plus a small set of framework built-ins. See MCP endpoint for the full pipeline.

Peer dependencies: authoring-core, authoring-ai-providers, fastify, fastify-plugin. The MCP surface adds a peer dep on @evolve-framework/mcp-core.

LLM, image, and video provider adapters. Anthropic, OpenAI, and Google for chat. fal and Google Gemini for image and video. Plus an editorial agent and a campaign planner used by the workflows addon.

import { buildAiProviderConfig } from "@evolve-framework/authoring-ai-providers";
const ai = buildAiProviderConfig({
AI_CHAT_PROVIDER: "anthropic",
AI_CHAT_MODEL: "claude-sonnet-4",
AI_IMAGE_PROVIDER: "fal",
AI_IMAGE_MODEL: "fal-ai/flux/dev",
ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY,
FAL_KEY: process.env.FAL_KEY,
});

Conditional exposure: a deployment without an image API key loads fine, the AI just doesn’t see the generateImage tool. Same for video. Chat is required.

@evolve-framework/authoring-workflows (optional)

Section titled “@evolve-framework/authoring-workflows (optional)”

Opt-in addon. A standard authoring install (chrome + server + AI providers) does not need this package. Add it only when you want headless, long-running content jobs — campaign hubs, bulk page generation, scheduled drafts triggered by API or MCP — to land in your CMS for editorial review.

Inngest engine, Redis app-state, a workflow definitions registry, and a natural-language compiler that turns plain-English briefs into typed workflow definitions.

import { mountWorkflows } from "@evolve-framework/authoring-workflows";
mountWorkflows(app, {
triggerToken: config.WORKFLOW_TRIGGER_TOKEN,
redisUri: config.REDIS_URL,
inngestEventKey: config.INNGEST_EVENT_KEY,
inngestSigningKey: config.INNGEST_SIGNING_KEY,
validateEditorSession,
generatePageFromBrief,
savePageDraft,
planCampaign,
buildToolContext,
});

Mount on the same Fastify host as authoring-server — the workflows reuse its session machinery and AI providers through the host-injected callbacks. The chrome detects the addon through the features.workflows binding: turn it off (or simply don’t install the package) to hide the workflows UI on hosts that don’t need it.

Peer dependencies: authoring-core, authoring-server. Optional peer: authoring-ai-providers (only needed for the NL compiler and default flows). See Workflows for the full walk-through.