Skip to content

EP Decision Sync

EP Decision Sync gives an interactive HTML document a memory. A gated strategy page with checklists, decision toggles or a calculator can save its state to the site rather than to one person’s browser, so the next reader sees where things were left, and who left them there.

Published by ElmsPark Studio.

  • Saves state per document. Each document has a key (lowercase letters, digits and dashes, up to 60 characters). The page posts its state object; the plugin stores it against that key.
  • Attributed and versioned. Every save records who saved it and when (UTC), and keeps the last 50 versions. The newest is the current one.
  • A front-end JSON endpoint at /ep-decision-sync for the page’s own script: op=get reads the current state and version count, op=save appends a version.
  • A token per document. Each document key has its own token, made from a secret created on your site. A token copied out of one page opens that document on your site and nothing else.
  • API actions for tooling. get-state, get-history and save-state at producer access; clear-state, mint-doc-token and rotate-secret at admin. All sit under the decision-state family, so an MCP client can read, reset or re-key a document.
  • A state object is capped at 20,000 bytes.
  • Saves are rate-limited to one every two seconds across the site.
  • The endpoint checks the document’s token before it does anything. The token sits in the page’s script, so anyone who can open the page can read it: keep those pages behind a gate such as EP Private Pages. A leaked token reaches that one document only; rotate-secret cancels every token at once.
  • Names are stripped of markup and cut to 60 characters. An empty name is saved as “Anonymous”.
  • PageMotor 0.10.0 or later
  • A page or standalone HTML document whose script posts to the endpoint. The plugin ships no front-end script of its own.
  1. ep-decision-sync.zip is a private-tier plugin: ElmsPark supplies it directly, and after install it updates through your site’s Updates screen.
  2. Upload via Plugins → Manage Plugins. Activate.
  3. There are no settings. Give each document a key, run mint-doc-token with that key, and put the token it returns in the page’s script along with the endpoint /ep-decision-sync.

Get the token for a document (admin API action):

EP_Decision_Sync mint-doc-token {"doc":"creator-programme-v02"}

Returns {"success":true,"data":{"doc":"creator-programme-v02","token":"…","endpoint":"/ep-decision-sync/"}}. The first call creates your site’s secret. Minting again gives the same token until you run rotate-secret.

Read the current state:

POST /ep-decision-sync
op=get&doc=creator-programme-v02&token=…

Returns {"success":true,"data":{"current":{"state":{…},"saved_by":"Kenn","saved_at":"2026-09-17 03:40:12"},"versions":7}}, or "current":false when nothing has been saved yet.

Save a new version:

POST /ep-decision-sync
op=save&doc=creator-programme-v02&name=Kenn&token=…&state={"ticks":{"a":true}}

Returns {"success":true,"data":{"saved_by":"Kenn","saved_at":"…","versions":8}}. Failure reasons are bad_request, bad_token, too_large, bad_state, slow_down and unknown_op.

Each document now has its own access token, made from a secret unique to your site. A token copied from one page opens that page’s saved state on your site only. Two new admin actions: mint-doc-token returns the token for a document key, and rotate-secret cancels every token at once.

Action needed after updating: pages that save through this plugin stop saving until you mint a token for each document key and put it in that page’s sync config in place of the old one. Saved state is kept.

First release on the ElmsPark update channel. The plugin now tells PageMotor where its updates and documentation live, so future versions arrive through your site’s Updates screen instead of by hand. No change to how it saves or serves decision state.

Server-side save and load for interactive plan documents: decision checklists, ticks, notes and calculator settings, persisted per document key, attributed and versioned, over a front-end JSON endpoint for gated strategy pages.