Language

Get in touch

EmDash plugin · since 2026

LYNX

A spreadsheet-style content manager for EmDash, with bulk edits, a history with rollback and MCP tools for AI agents.

Released
Platform
EmDash CMS
AI agent tools
17
Price
Free, MIT
  • TypeScript
  • EmDash plugin API
  • Cloudflare Workers sandbox (workerd)
  • Astro
  • React
  • Cloudflare Kumo
  • Portable Text
  • Model Context Protocol
  • Block Kit
  • Vitest
  • Playwright
View in the EmDash registry plugins.emdashcms.com

About

LYNX brings the BEAR idea to EmDash, the Astro-based CMS that runs on Cloudflare Workers or Node.js: a collection shown as one editable table, bulk changes with a before and after preview, a history of every write and a rollback of any job. An AI agent can do the same through 17 MCP tools, with the same rules.

The hard part is the platform. A sandboxed EmDash plugin on Cloudflare gets 10 host calls per invocation, its backend must be one module of at most 128 KiB, and the plugin API has no entry count, no offset and no way to discard a draft. Each limit shaped the design: jobs in small atomic steps, a core that does only the writes, and a separate native plugin for the grid.

LYNX is five packages. The core and LYNX Media are sandboxed plugins in the EmDash plugin registry; LYNX Grid, the engine and the demo presets are on npm. All of them are MIT and free.

Built in September and October 2026, first published on 26 October 2026 and listed in the EmDash plugin registry in November.

LYNX · bulk editor

what was solved

LIVEsince 2026

Bulk-edit engine

shipped · 2026

What it givesA change previewed in the grid or by an AI agent is exactly the change that gets written, and the same history can undo it.

Problem
The grid, the bulk panel, the core's jobs and the AI agent must agree on what a change does, which entries it touches and how to undo it.
Solution

One pure TypeScript package with no EmDash imports: field model, 29 behaviors, a filter grammar, a planner that sorts entries into states, and rollback plans with conflict checks.

Stack
  • TypeScript
  • Portable Text
  • Vitest
Tasks · 5
Every surface needs the same list of edits and the same words for themA fixed set of 29 behaviors and one dictionary of their labels

BEHAVIORS covers text (set, append, prepend, replace, change_case, trim, slugify), numbers (increase and decrease by value or percent, multiply, round with a step, direction and ending), lists, dates (shift_date), terms (add, remove, set), publication (publish, unpublish, schedule) and whole entries (duplicate, trash).

BEHAVIOR_LABEL and describeOperations() turn a job into one readable line such as "Price −10%, rounded · 5 entries (published, Year < 2020)". The bulk panel, the History, the core's admin page and list_history for agents use it.

EmDash can filter only some conditions in the databaseThe filter compiler splits conditions into host filters and in-memory checks

compileFilter() takes 13 operators (eq to empty) and term conditions (any, all, none, exists). Conditions EmDash's content.list accepts go to the database, capped at 20 host filters and 50 values per in; the rest are checked by matchesFilter() while entries are read.

An unknown key or a value of the wrong shape is refused with the reason, so a filter never silently matches more than intended.

A bulk write must not publish an editor's unfinished draftThe planner marks live entries that carry an unpublished draft as held

planBulk() gives each entry a state: change, unchanged, invalid or held. In publish mode an entry with a pending draft is held and left alone, because the host can only publish the whole draft; the preview warns with pending_drafts and says how to proceed.

Warnings are split into ones that change the result and informational ones (INFO_WARNING_CODES), so the grid shows only the first kind in yellow.

A rollback must not overwrite edits made after the jobEach history record keeps before and after values and the entry version

historyFor() records the previous values before a write. planRollback() compares the current entry version with the one the job left; if the entry was edited since, or gained a draft, it is reported as a conflict and skipped unless force is set.

Find and replace in rich text must keep bold, links and other marksReplace inside Portable Text spans instead of flattening to plain text

replaceInPortableText() walks the blocks and replaces inside spans, so a match inside a bold span stays bold. Rich text is never edited as plain text in a cell; the grid opens EmDash's own editor in a side panel.

Sandboxed core and jobs

shipped · 2026

What it givesA bulk edit of thousands of entries finishes on Cloudflare without hitting the platform's limits, and can be undone entry by entry.

Problem
Writes must run inside EmDash's plugin sandbox, which on Cloudflare allows 10 host calls per invocation and one backend module of at most 128 KiB.
Solution

Jobs advance in steps sized to a call budget, steps are claimed atomically so several callers can drive one job, and the core holds only what writes need.

Stack
  • EmDash sandboxed plugin API
  • workerd
  • plugin storage
  • cron
Tasks · 5
Cloudflare allows 10 host calls per plugin invocationA step budget of 8 calls and a step shape computed from the cost per entry

SAFE_STEP_BUDGET = 8 leaves a margin under the limit. worstStepCost() counts the calls one entry needs (read, update, publish or cache re-publish, term reads and writes) and shapeStep() turns that into entries per step: 2 published or 3 draft entries per step in the sandbox.

FAST_STEP_BUDGET = 200 is for Node hosts. The setting "Job step size" offers Auto, Safe (Cloudflare) and Fast; Auto keeps the safe budget in every sandbox, because inside the isolate LYNX cannot tell Node from Cloudflare.

Several callers may advance the same job at onceAtomic, disjoint claims on a job window in plugin storage

runStep() claims a ticket with a conditional update (updateIf on state: running, ticket +1); each ticket is a different slice of the current window, and a new window is opened with another conditional update. The grid drives big jobs with 4 parallel workers, an agent with repeated job_status calls, and a cron task every minute moves jobs nobody drives.

Measured on 5,000 cars: price +1 % on all of them, 154 s with one driver, 100 s with four; rollback 104 s.

An entry with many taxonomies needs more calls than one step hasTerm writes beyond the step are stored as pending history and applied before the job completes

splitTermUnits() keeps the base write in the step and moves the remaining term writes to history documents of kind pending; the job's finishing phase applies them, and a job with pending terms is not marked complete. A test with 6 taxonomies checks that create, duplicate, set_terms and rollback stay within 8 calls per step.

The sandboxed backend is one module of at most 128 KiBA size check in every build and moving non-write code out of the core

tools/size.ts fails above 126 KiB. Image import moved to the separate LYNX Media plugin (4.1 KiB freed, and the core lost its network access), and the grid's reads moved to the grid's native routes (2.8 KiB freed). Core 0.1.2 is at 126.0 KiB.

On Node hosting the sandbox makes big jobs slowThe same core build can be loaded in-process, and the guide shows the measured trade-off

Price +1 % on 5,030 cars, production build on Node: 76 s sandboxed with Auto, 44 s with Fast, 35 s in-process (about 145 published entries per second). Most of the remaining time is EmDash's own work: a published entry is saved as a draft revision, published, and re-published to refresh cached pages.

MCP tools for AI agents

shipped · 2026

What it givesThe site owner can ask Claude, ChatGPT or another MCP client to edit the catalogue, see the preview first, and roll the job back.

Problem
An AI agent connected to the site must be able to find, change and undo content without editing more than the user meant.
Solution

17 frozen MCP tools on top of the same engine and jobs, with a fixed working order: frozen selection, preview, apply with a confirmed count, rollback.

Stack
  • Model Context Protocol
  • EmDash MCP server
  • zod
Tasks · 6
Tool texts and schemas drift and break agents silentlyThe tool set is frozen and compared with a snapshot in every test run

Seventeen tools were approved and frozen on 2026-09-29: capabilities, describe_site, list_fields, list_terms, find_entries, get_entries, preview_bulk, apply_bulk, job_status, create_entries, update_entry, list_history, rollback_bulk, get_memory, set_memory, cases, run_case. tools/freeze.ts compares the built manifest (names, descriptions, schemas) with mcp-tools.frozen.json.

An agent could edit every entry by mistakeA frozen selection and a write that requires the exact selection count

find_entries freezes the matching ids as a selection (up to 50,000, valid 24 hours) and returns the exact count and sample rows. preview_bulk writes nothing. apply_bulk requires confirm_count equal to that count; a wrong number is refused with CONFIRM_MISMATCH.

Tool descriptions tell the agent to show the count, the rows and every warning in the user's language and wait for a yes.

Users bring new entries as CSV, spreadsheets or price listscreate_entries takes one strict row shape with a dry run, and the agent converts the source

Up to 50 rows per call, keyed exactly as list_fields returns. The dry run (default) returns each row as ok or invalid with codes such as missing_required, not_in_options, unknown_term, duplicate_unique, and a hint when a close option exists. Only valid rows are created, as a job that rollback moves to the trash.

Importing images needs network access the core should not haveA separate sandboxed plugin, LYNX Media, with one tool and image-only network rights

import_media takes up to 20 image URLs, does 3 per call in the sandbox and returns the rest in remaining, refuses files over 8 MB, and returns values for image fields; entries are still written only by the core.

Every EmDash plugin update switches agent access offThe core records the last agent session and shows a notice after an update

The core's Block Kit page compares the version an agent last used with the installed one and tells the admin where to switch agent access back on. The platform behaviour is written up as an upstream issue draft.

The tools must work on a real registry install, not only in testsAn end-to-end MCP run against a fresh EmDash site with LYNX installed from the registry

On 2026-11-09: 17 LYNX tools and LYNX Media's import_media listed; find, preview (nothing written), apply 6 of 6, history marked as via MCP, rollback with prices restored exactly, refusals for an unknown selection and a wrong confirm_count; 21 calls. The run passed again after updating 0.1.1 to 0.1.2.

LYNX Grid in the EmDash admin

shipped · 2026

What it givesEditors change many entries the way they would in a spreadsheet, inside the EmDash admin, and every save can be undone from History.

Problem
Editors need a spreadsheet view of a collection inside the EmDash admin, and the sandboxed core is too limited and too slow for reading pages of rows.
Solution

A separate native plugin with a React grid on Kumo, its own read routes, and every write sent through the core so history and rollback stay in one place.

Stack
  • React
  • Cloudflare Kumo
  • Phosphor icons
  • EmDash native plugin API
Tasks · 5
Reading rows through the sandboxed core costs many callsReads moved to the grid's native routes; writes still go only through the core

50 rows with terms: 94 ms and 9 HTTP calls through the core, 19 ms and 1 call through the grid's own rows route. The grid declares read capabilities only (content:read, content:revisions:read, schema:read, taxonomies:read, media:read).

Each field type needs its own editor in a cellType-specific editors and validation rules sent by the core

Galleries and image fields open a photo panel (reorder, remove, add from the computer, the media library or a URL through LYNX Media); dates open a calendar dialog; bounded numbers open a slider; rich text opens EmDash's Portable Text editor; one-term taxonomies use radio buttons.

The core sends each field's rules (min, max, pattern), so a cell refuses "Doors must be at most 6" before saving, and a row turned down for one cell does not block the other edited cells.

A bulk edit should be checked on every selected entry, not a sampleThe grid previews up to 500 entries with the same engine; the core applies

PREVIEW_CAP = 500: the preview reads the matching entries fresh and plans them with the engine; above the cap it says how many it covered. Apply and rollback stay in the core. A toolbar button edits all entries matching the filter, as in BEAR.

The admin may load React or Kumo versions the grid was not built forA version guard that compares loaded versions with the grid's peer ranges

On a mismatch the grid shows a banner with the exact fix command, and the rest of the admin keeps working. Installed from npm, the grid needs Kumo and the Phosphor icons in Vite's optimizeDeps.include so it shares the admin's copy.

The grid must be usable from the keyboard and in both themesKeyboard resize, shortcuts dialog, aria column indexes and contrast fixes, checked with axe

Columns resize from the keyboard, Alt+Enter opens the entry, ? or F1 shows the shortcuts, headers carry aria-colindex. An axe run (WCAG 2.1 AA) reported 0 issues in light and dark on the page, filter, history, bulk and shortcuts views. Tab-separated paste from Excel or Google Sheets fills a column; on phones rows become cards.

Large collections without a count API

shipped · 2026

What it givesCatalogues of tens of thousands of entries open in well under a second, with totals and page jumps, while cells never show stale values.

Problem
EmDash gives plugins no entry count and no offset: content.list returns at most 100 entries after a cursor, so totals, page jumps and sorts need another source.
Solution

Per collection the grid keeps only ids and indexed values in typed columns, reads each page whole by id, and drops the cache on every content hook.

Stack
  • Float64Array / Int32Array
  • EmDash content hooks
  • plugin KV
  • EmDash schema API
Tasks · 4
Keeping an object per entry per filter used 41 MB on 50,030 entriesOne column store per collection; a filter keeps only positions

Numbers and dates live in Float64Arrays, repeating text as dictionary codes in Int32Arrays, nearly unique text (VIN, title) as plain strings; a filter's read is an Int32Array of positions. Measured on 50,030 cars: about 7 MB, first page about 60 ms, page 10,000 in 25–50 ms.

Cached values must not outlive a change made outside the gridContent hooks clear the cache; a cheap stamp check catches what hooks miss

The grid listens to seven content hooks (save, publish, unpublish, delete, restore, schedule, unschedule) and drops that collection's cache. Before reuse it checks the newest updatedAt and, for taxonomy filters, who carries the terms, because assigning terms in the admin fires no hook. An agent's new price showed in a sorted grid in about 0.23 s at 50,000 entries.

Counting 50,000 entries 100 at a time takes secondsThe last count per filter is kept in plugin KV and shown at once as an estimate

One KV record per collection keeps the whole-collection count and the 40 most recent filters; create, trash and restore hooks move the collection count by one, and every finished count writes back. The header shows "≈50,030 entries · counting…" until the exact total arrives (about 4.5 s). On Workers the KV record is shared by isolates, while the column cache is per isolate.

Sorting by a field without an index held the dev server for secondsSort and filter only by indexed fields, and let admins index a field from the grid

A non-indexed sort or filter is refused with NEEDS_INDEX and the header points to a gear. The gear and Settings → Indexing call EmDash's schema API as the signed-in admin (PUT /schema/collections/:c/fields/:f), and EmDash builds the index itself; the sandboxed core cannot change the schema. An indexed sort returns its first page from one query (firstPageByIndex).

Drafts, revisions and cached pages

shipped · 2026

What it givesBulk edits show up on the live site when they should, and never publish half-finished work an editor left in a draft.

Problem
On EmDash collections with revisions every save goes to a draft, a plugin cannot discard a draft, and collections without revisions need a cache refresh after a write.
Solution

Each write path was measured on a real site and given a rule: publish mode, held entries, cache re-publish, cleanup of empty drafts through the admin API.

Stack
  • EmDash revisions
  • EmDash admin REST API
  • SQLite
Tasks · 4
A plugin write on a revisions collection does not reach the site until publishedPublish mode writes the draft revision and publishes it in the same step

In the grid a save writes straight into the entry: a published entry goes live at once, a never-published draft stays a draft. MCP tools keep an explicit mode argument. Verified facts behind this: every save on such a collection goes to a draft, including plugin content.update, and slug changes are staged as _slug until publish.

Cached pages keep old values on collections without revisionsA cache-refresh re-publish of edited published entries, with a setting to turn it off

After writing a published entry the step runs getVersioned and publish (2 extra calls), which keeps the publication date. The preview warns that other plugins' publish hooks will run again; the setting "Refresh cached pages after edits" can switch it off.

Rolling back a draft-mode job leaves drafts equal to the live versionThe grid finds such drafts and removes them through the admin REST API

The plugin API has no way to discard a draft. The grid, running as the signed-in admin, compares each draft revision with the live values and offers "Remove empty drafts (N)", calling POST /_emdash/api/content/{collection}/{id}/discard-draft. Without it a later publish-mode job would hold those entries.

Shared fields of translated entries behave differently by collection typeOne rule: write and warn on revisions collections, refuse on the others

EmDash copies non-translatable fields to other language versions only when an entry with revisions is published. LYNX writes the one entry and warns translation_sync; on collections without revisions it refuses with TRANSLATION_SYNC_UNSUPPORTED and says why.

Publishing: registry, npm and the plugin id

shipped · 2026

What it givesSite owners install LYNX from the EmDash admin, add the grid once with npm, and the parts find each other however they were installed.

Problem
Sandboxed and native EmDash plugins ship through different channels, and a registry install gives the plugin a generated id the other packages do not know.
Solution

The core and LYNX Media go to the EmDash registry, the grid and libraries to npm, and the grid finds the core by registry slug and publisher DID.

Stack
  • EmDash plugin registry (atproto)
  • npm
  • emdash-plugin CLI
Tasks · 3
Native plugins cannot be published to the EmDash registryFive packages split by how EmDash loads them

Core (@realmag777/lynx 0.1.2) and LYNX Media (0.1.0) are signed releases in the registry under the publisher @realmag777.com, with an icon, a banner and 8 screenshots. LYNX Grid (0.2.2), the engine and the presets are on npm. The core is also on npm for in-process use on Node hosts.

A registry install gets a generated id, so hard-coded routes miss the corefindPluginId() looks the plugin up by registry slug and publisher DID

Installed from the registry, the core's id is r_… with the registry slug and publisher DID stored next to it. The grid tries the manifest id, then the admin plugin list by slug and the LYNX publisher DID, then the admin page label for non-editors; the preset installer takes the found id.

Installation had to be checked the way a user does itInstall tests on fresh EmDash sites from npm and from the registry

EmDash 1.3.1 Starter site from npm (2026-10-27) and EmDash 1.4.0 with the workerd sandbox from the registry (2026-11-09): both plugins install with 7 permissions, both demo presets install, a cell save shows "Saved 1 entry", no page errors and no 4xx or 5xx on plugin routes.

Demo presets and test data

shipped · 2026

What it givesA fresh EmDash site gets a cars or real-estate catalogue in one click, so LYNX can be tried before touching real content.

Problem
A new user needs content to try a bulk editor on, and the scale claims need real-looking catalogues far larger than a demo.
Solution

Two presets with fields, taxonomies, photos and entries, installable from the grid, plus a local demo seeded from US EPA open data for scale tests.

Stack
  • EmDash seeds
  • EmDash REST API
  • US EPA fuel-economy data
Tasks · 3
Seeds and a running site need two install pathsPresets as validated EmDash seed files and as a REST installer

toSeed() builds seed files checked with EmDash's validateSeed(); installPreset() installs through the REST API and uploads local photos, and re-running it is idempotent. Cars: 17 fields, 4 taxonomies, 80 terms, 12 photos, 30 entries. Real estate: 20 fields, 2 taxonomies, 18 terms, 12 photos, 30 entries.

Scale tests need a realistic catalogue of tens of thousands of entriesA resumable seeder from the US EPA fuel-economy open data

10,000 cars with real make, model, year, engine, gearbox, fuel and class (2012–2026, 504 make terms), other fields generated; 50,030 for the memory and speed measurements. This demo stays local and is not published.

Demo photos had to be free of third-party rightsPhotos generated with an image model instead of taken from listing sites

24 preset photos were generated with a script and logged; scraping commercial listing sites was declined over terms of service and copyright.

Numbers

from the product
  • AI agent tools (MCP) 17 + 1 17 in the core, 1 image import tool in LYNX Media.
  • Bulk edit behaviors 29 Text, numbers, dates, lists, terms, publication and whole entries.
  • Host calls per job step 8 Under Cloudflare's 10 per plugin invocation; up to 200 on Node hosts with step size Fast.