From 3298cacc410015faf9c6097de4bccfb45213f21f Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 28 Sep 2026 10:45:52 +0200 Subject: [PATCH 1/3] chore: allow EmDash 0.42.0, 1.0.1-rc.0 and their harnesses under the release-age minimum --- pnpm-workspace.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4cdda1f..a2c413e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -21,15 +21,15 @@ allowBuilds: strictDepBuilds: true dangerouslyAllowAllBuilds: false minimumReleaseAgeExclude: - - '@emdash-cms/admin@0.39.0 || 0.40.1' - - '@emdash-cms/auth@0.39.0 || 0.40.1' - - '@emdash-cms/blocks@0.39.0 || 0.40.1' - - '@emdash-cms/cloudflare@0.39.0 || 0.40.1' - - '@emdash-cms/gutenberg-to-portable-text@0.39.0 || 0.40.1' - - '@emdash-cms/plugin-cli@0.12.0' - - '@emdash-cms/plugin-test@0.2.0 || 0.2.3' - - '@emdash-cms/plugin-types@0.4.0' - - '@emdash-cms/registry-client@0.6.1' - - '@emdash-cms/registry-lexicons@0.6.0' - - '@emdash-cms/registry-verification@0.3.2' - - emdash@0.39.0 || 0.40.1 + - '@emdash-cms/admin@0.39.0 || 0.40.1 || 0.42.0 || 1.0.1-rc.0' + - '@emdash-cms/auth@0.39.0 || 0.40.1 || 0.42.0 || 1.0.1-rc.0' + - '@emdash-cms/blocks@0.39.0 || 0.40.1 || 0.42.0 || 1.0.1-rc.0' + - '@emdash-cms/cloudflare@0.39.0 || 0.40.1 || 0.42.0 || 1.0.1-rc.0' + - '@emdash-cms/gutenberg-to-portable-text@0.39.0 || 0.40.1 || 0.42.0 || 1.0.1-rc.0' + - '@emdash-cms/plugin-cli@0.12.0 || 0.13.0' + - '@emdash-cms/plugin-test@0.2.0 || 0.2.3 || 0.2.5 || 0.2.6-rc.0' + - '@emdash-cms/plugin-types@0.4.0 || 0.5.0' + - '@emdash-cms/registry-client@0.6.1 || 0.7.0' + - '@emdash-cms/registry-lexicons@0.6.0 || 0.7.0' + - '@emdash-cms/registry-verification@0.3.2 || 0.3.3' + - emdash@0.39.0 || 0.40.1 || 0.42.0 || 1.0.1-rc.0 From 45f92b471cd7f3af64e584a080f79abf039ba6e2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 28 Sep 2026 10:57:52 +0200 Subject: [PATCH 2/3] ci: test against EmDash 0.42.0 and 1.0.1-rc.0, each 1.x host under its own harness --- .github/workflows/compat-matrix.yml | 13 +++++++++---- AGENTS.md | 2 +- scripts/compat-matrix.sh | 22 +++++++++++++++++----- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/compat-matrix.yml b/.github/workflows/compat-matrix.yml index ac474e6..5c5d245 100644 --- a/.github/workflows/compat-matrix.yml +++ b/.github/workflows/compat-matrix.yml @@ -41,7 +41,7 @@ jobs: cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm typecheck - - run: ./scripts/compat-matrix.sh 0.39.0 0.39.1 0.40.0 0.40.1 0.41.0 + - run: ./scripts/compat-matrix.sh 0.39.0 0.39.1 0.40.0 0.40.1 0.41.0 0.42.0 1.0.1-rc.0:0.2.6-rc.0 latest: name: current EmDash (informational) @@ -59,7 +59,12 @@ jobs: # dist-tags.latest, not the highest semver: emdash@1.0.0 exists on npm # but was published 2026-04-27 and deprecated, and it outranks every # real 0.x release in semver order. - run: echo "version=$(npm view emdash dist-tags.latest)" >> "$GITHUB_OUTPUT" + # + # The harness is the current plugin-test too: one from before 0.2.6 + # cannot start an EmDash 1.x host. + run: | + echo "version=$(npm view emdash dist-tags.latest)" >> "$GITHUB_OUTPUT" + echo "harness=$(npm view @emdash-cms/plugin-test dist-tags.latest)" >> "$GITHUB_OUTPUT" - run: | - echo "current EmDash on npm: ${{ steps.resolve.outputs.version }}" - ./scripts/compat-matrix.sh "${{ steps.resolve.outputs.version }}" + echo "current EmDash on npm: ${{ steps.resolve.outputs.version }} (plugin-test ${{ steps.resolve.outputs.harness }})" + ./scripts/compat-matrix.sh "${{ steps.resolve.outputs.version }}:${{ steps.resolve.outputs.harness }}" diff --git a/AGENTS.md b/AGENTS.md index 997ccb9..ff2f869 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,7 +43,7 @@ pnpm install pnpm typecheck pnpm test # emdash-plugin validate, then vitest, per package pnpm build -./scripts/compat-matrix.sh 0.39.0 0.39.1 0.40.0 0.40.1 0.41.0 # suites against other EmDash releases +./scripts/compat-matrix.sh 0.39.0 0.39.1 0.40.0 0.40.1 0.41.0 0.42.0 1.0.1-rc.0:0.2.6-rc.0 # suites against other EmDash releases ``` ## Releases diff --git a/scripts/compat-matrix.sh b/scripts/compat-matrix.sh index f478974..3b87086 100755 --- a/scripts/compat-matrix.sh +++ b/scripts/compat-matrix.sh @@ -17,7 +17,13 @@ # the workerd harness. `shared` uses plain vitest with no host, and a `link:`ed # package has no npm versions to override against. # -# Usage: scripts/compat-matrix.sh [version...] (default: 0.39.1 0.40.0) +# The reverse happened with EmDash 1.0: it moved the module the harness loads +# (`emdash/plugin-test-runtime` became `emdash/internal/plugin-test-runtime`), +# so no harness before plugin-test 0.2.6 can start a 1.0 host. A version +# written as `version:harness` also overrides plugin-test, for example +# `1.0.1-rc.0:0.2.6-rc.0`. +# +# Usage: scripts/compat-matrix.sh [version[:harness]...] (default: 0.39.1 0.40.0) set -euo pipefail @@ -97,8 +103,11 @@ run_suites() { echo "baseline (harness's own pinned host, no overrides)" run_suites "baseline" -for v in "${VERSIONS[@]}"; do - echo "emdash $v" +for spec in "${VERSIONS[@]}"; do + v="${spec%%:*}" + harness="" + [ "$spec" != "$v" ] && harness="${spec#*:}" + echo "emdash $v${harness:+ (plugin-test $harness)}" git checkout -- pnpm-workspace.yaml pnpm-lock.yaml cat >> pnpm-workspace.yaml <<-EOF @@ -107,16 +116,19 @@ for v in "${VERSIONS[@]}"; do "@emdash-cms/cloudflare": $v "@emdash-cms/blocks": $v EOF + if [ -n "$harness" ]; then + printf ' "@emdash-cms/plugin-test": %s\n' "$harness" >> pnpm-workspace.yaml + fi run_suites "$v" done echo printf '%-26s %-12s' "package" "baseline" -for v in "${VERSIONS[@]}"; do printf '%-12s' "$v"; done +for spec in "${VERSIONS[@]}"; do printf '%-12s' "${spec%%:*}"; done echo for p in "${PKGS[@]}"; do printf '%-26s %-12s' "$p" "$(lookup baseline "$p")" - for v in "${VERSIONS[@]}"; do printf '%-12s' "$(lookup "$v" "$p")"; done + for spec in "${VERSIONS[@]}"; do printf '%-12s' "$(lookup "${spec%%:*}" "$p")"; done echo done echo From 5d8882dbae581389a667cf82b1694b8133477e82 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 28 Sep 2026 10:57:52 +0200 Subject: [PATCH 3/3] docs(analytics): MCP tools in plugins: [] from EmDash 0.42, an install section --- .changeset/analytics-emdash-1-0-rc.md | 5 ++++ packages/analytics/AGENTS.md | 7 ++--- packages/analytics/README.md | 37 ++++++++++++++++++++++----- 3 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 .changeset/analytics-emdash-1-0-rc.md diff --git a/.changeset/analytics-emdash-1-0-rc.md b/.changeset/analytics-emdash-1-0-rc.md new file mode 100644 index 0000000..5b60782 --- /dev/null +++ b/.changeset/analytics-emdash-1-0-rc.md @@ -0,0 +1,5 @@ +--- +"@eisbachcode/emdash-plugin-analytics": patch +--- + +Tested on EmDash 0.42.0 and the 1.0 release candidate (1.0.1-rc.0); neither needed a change. From EmDash 0.42.0 the four MCP tools also work when the plugin is registered in `plugins: []`; on 0.39 to 0.41 only sandboxed and registry installs have them. The README now shows how to install and register the plugin. diff --git a/packages/analytics/AGENTS.md b/packages/analytics/AGENTS.md index 36b8104..3d1e213 100644 --- a/packages/analytics/AGENTS.md +++ b/packages/analytics/AGENTS.md @@ -57,9 +57,10 @@ at the workspace root is enough. does not match, so a loader's result and its declared output have to agree key for key. `tests/tools.test.ts` checks each answer against the schema the build wrote. -- **MCP tools reach sandboxed installs only.** EmDash's in-process loader - reads tools from the runtime module, where the build removed them, so a - `plugins: []` install lists none. Test tools sandboxed. +- **In `plugins: []`, MCP tools need EmDash 0.42.0 or later.** Older + in-process loaders read tools from the runtime module, where the build + removes them, so a `plugins: []` install on 0.39 to 0.41 lists none. + Sandboxed installs have them on every supported version. - **Block Kit keeps no state.** Anything a page needs to remember between interactions travels in an `action_id`, a button `value` or a table cursor (see `src/ui/content.ts`). diff --git a/packages/analytics/README.md b/packages/analytics/README.md index 1a322a1..f8913b4 100644 --- a/packages/analytics/README.md +++ b/packages/analytics/README.md @@ -9,7 +9,8 @@ entry that earned them rather than to a URL string. > **Status: early releases.** Cloudflare Web Analytics plus demo data: a > dashboard widget, an Analytics page with a setup check, a per-entry page, > an Analytics panel in the entry editor and four read-only MCP tools. -> Tested on EmDash 0.39 to 0.41. See "Not in this version". +> Tested on EmDash 0.39 to 0.42 and on the 1.0 release candidate +> (1.0.1-rc.0). See "Not in this version". The screenshots show demo data on a site made from EmDash's blog template. @@ -136,11 +137,11 @@ To use them: After an update that changes a tool, EmDash stops serving the tools until they are approved again, but the switch stays on. Turn it off and on. -**Sandboxed installs only, for now.** A plugin registered in `plugins: []` -gets none of its MCP tools on EmDash 0.39 to 0.41: the plugin build keeps -the tool declarations out of the runtime module, and EmDash's in-process -loader looks for them only there. Under `sandboxed: []` or installed from -the registry, the tools work. This is an EmDash limitation, not a setting. +**Registered in `plugins: []`, the tools need EmDash 0.42 or later.** On +0.39 to 0.41, EmDash's in-process loader looks for tool declarations only in +the plugin's runtime module, where the plugin build leaves them out, so such +a site gets none. Under `sandboxed: []` or installed from the registry, the +tools work on every EmDash version this plugin supports. ## What you need @@ -174,6 +175,30 @@ your sites through the analytics data instead. Prefer an **account-owned** token over a user-owned one. A user token dies with that user's membership; an account-owned token does not. +## Install + +```sh +pnpm add @eisbachcode/emdash-plugin-analytics +``` + +```js +// astro.config.mjs +import analytics from "@eisbachcode/emdash-plugin-analytics"; + +export default defineConfig({ + integrations: [ + emdash({ + // database, storage, ... + plugins: [analytics], + }), + ], +}); +``` + +To run it sandboxed, list it under `sandboxed: [analytics]` instead. That +needs a sandbox runner, which on Cloudflare means the Workers Paid plan; see +EmDash's [plugin sandbox guide](https://docs.emdashcms.com/deployment/plugin-sandbox/). + ## Settings Fill these in under Plugins → Analytics → Settings.