@vermeulen.solutions/eventual 0.18.4 → 0.18.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,101 +0,0 @@
1
- # Developer guide — Eventual 0.15.0
2
-
3
- EmDash collections own content, rich text, languages, drafts, revisions and publication. Eventual's sandbox supplies schedule validation, recurrence, saved-entry controls and feeds. See [setup](collection-setup.md) and [upgrading](upgrade-0.13.0.md).
4
-
5
- The [public feed caching guide](public-feed-caching.md) describes additive
6
- dependency/expiry metadata, direct runtime dispatch and the host's explicit opt-in.
7
-
8
- ## Installation and plugin ID
9
-
10
- Registry installations use the host's sandbox runner and downloaded bundle. Config-managed installations register the source descriptor in `sandboxed: [eventual]`. Use one backend per site. Cloudflare Registry hosts need Worker Loader and PluginBridge: [EmDash sandbox setup](https://docs.emdashcms.com/deployment/plugin-sandbox/).
11
-
12
- **Use the installed plugin ID in URLs and MCP names.** Config-managed installs normally use `eventual`; Registry installs have generated IDs such as `r_hxn32uyal53iahxf`. Read it from the install result or authenticated `GET /_emdash/api/admin/plugins`. MCP names are `<pluginId>__<toolName>`.
13
-
14
- Astro/schema/transfer helpers come from the npm package
15
- [`@vermeulen.solutions/eventual`](https://www.npmjs.com/package/@vermeulen.solutions/eventual)
16
- (0.18.1 and later), not the Registry `.tar.gz`. Install the version that matches the Registry backend:
17
-
18
- ```sh
19
- npm install @vermeulen.solutions/eventual@0.18.1
20
- ```
21
-
22
- Import it as `@vermeulen.solutions/eventual/astro`, `@vermeulen.solutions/eventual/schema` and so on; the plugin ID stays `eventual`.
23
- Releases before 0.18.1 were not on npm; their source archives (`eventual-<version>.tgz`) are attached to the GitHub releases.
24
-
25
- To build the same helpers from the release checkout, run `npm ci`, `npm run build`
26
- and `npm pack`. Keep helper and backend versions aligned.
27
-
28
- Source tooling needs Node 24+. Peer ranges are in [package.json](../package.json); release acceptance uses EmDash/Admin/Block Kit **1.2.0 and 1.4.0**, Astro 7.3.x/7.4.x and React 19. The source `@vermeulen.solutions/eventual/install` lane is tested on 1.2.0, 1.4.0 and 1.5.0. It refuses only hosts older than 1.2.0; a newer untested host builds with a warning, and an editor adapter that no longer matches the admin build steps aside (with a warning) so EmDash's own editor is used. Registry installs never execute that transform.
29
-
30
- | Host | Status | Notes |
31
- | --- | --- | --- |
32
- | 1.2.0 | supported, unit-tested | Panel Enter/validation is scoped to the outer content-editor form; Cloudflare cross-isolate plugin mutations can fail. |
33
- | 1.3.x | supported, untested | Same form/Cloudflare limitations; includes the plugin-storage cursor fix. |
34
- | 1.4.x | supported, full acceptance | Recommended. Fixes nested Block Kit forms and Cloudflare plugin mutations. |
35
- | 1.5.x | supported, host-tested | 1.5.0 passes the native-site and plugin integration suites; the admin adapter recognises its editor panel. |
36
- | newer | allowed with a warning | Not yet tested. Check the event editor after upgrading. |
37
-
38
- ## Public routes
39
-
40
- Routes are relative to `/_emdash/api/plugins/<pluginId>/`.
41
-
42
- | Route | Inputs and behavior |
43
- | --- | --- |
44
- | `GET publicEvents` | Inclusive `from`/`through` dates (YYYY-MM-DD); default UTC today through 180 days later; maximum 366 inclusive dates. Also `locale`, `strict` (false), `category`, `publicUrls` (true). |
45
- | `GET calendar` | Raw text/calendar; fixed window from UTC today through 365 days later. Supports locale, strict and category. |
46
- | `GET publicEventImage?eventId=…` | Published featured image with MIME/size checks; absent, unpublished or disabled legacy images return 404. |
47
-
48
- `strict=true` omits events without the requested translation; false can use another language with a `[FR]`/`[EN]` title prefix. Categories match without case sensitivity. `publicUrls=false` skips native canonical-URL lookups; slug/id remain available for site-owned links.
49
-
50
- JSON success:
51
-
52
- ```json
53
- {"success":true,"data":{"ok":true,"from":"2026-11-01","through":"2026-11-30","events":[]}}
54
- ```
55
-
56
- The feed has no top-level locale. Event rows carry title, description/plain text, optional descriptionBlocks, start/end, allDay, timezone, location, organizer, externalUrl, imageUrl, categories, venue and directionsUrl. Optional native metadata includes locale, translationGroup, slug and publicUrl. Business status is `status`, not `eventStatus`: see [PublicEvent](../src/public-event.ts). All-day end dates are inclusive here and exclusive in ICS.
57
-
58
- Handle both `success:false` host failures and `data.ok:false` plugin failures. EmDash 1.2.0 JSON configuration/RPC failures use HTTP 400, ROUTE_ERROR and private/no-store caching. Preserve errors instead of substituting stale rows or a successful empty feed.
59
-
60
- ## Astro integration
61
-
62
- `fetchPublicFeed(origin, from, through, category, {locale, strict, publicUrls})` from `@vermeulen.solutions/eventual/astro` validates responses and throws FeedError. **It hardcodes ID `eventual`**; its options do not accept a Registry ID. The showcase has the same assumption. Registry sites need a site-owned adapter to the actual URL or EmDash's SSR dispatcher:
63
-
64
- ```ts
65
- const pluginId = 'YOUR_INSTALLED_PLUGIN_ID';
66
- const url = new URL(`/_emdash/api/plugins/${pluginId}/publicEvents`, Astro.url);
67
- url.searchParams.set('from', '2026-11-01');
68
- url.searchParams.set('through', '2026-11-30');
69
- url.searchParams.set('locale', 'fr');
70
- const runtime = Astro.locals.emdash;
71
- if (!runtime) throw new Error('EmDash is unavailable');
72
- const result = await runtime.handlePublicPluginApiRoute(
73
- pluginId, 'GET', '/publicEvents', new Request(url),
74
- );
75
- if (!result.success) throw new Error(result.error?.message ?? 'Event feed unavailable');
76
- // Validate result.data.ok and result.data.events before rendering.
77
- ```
78
-
79
- `@vermeulen.solutions/eventual/astro/EventList.astro` is an optional unstyled list. JSON-LD helpers are eventToJsonLd and serializeJsonLd; use the safe serializer. The [showcase](../examples/astro-events/README.md) supplies seven complete visitor layouts.
80
-
81
- ## Settings, tools and transfer
82
-
83
- Tools `getSettings` and `updateSettings` use `mcp/settings/get` and `mcp/settings/update`. **updateSettings requires defaultTimezone**, even when only changing legacyReads. Read and retain its value first:
84
-
85
- ```json
86
- {"defaultTimezone":"Europe/Paris","legacyReads":false}
87
- ```
88
-
89
- Optional collections contains `{events,venues,organizers}`. Native timezone defaults belong to the schema. Only stored boolean true enables legacy public reads. Native collections stay authoritative; broken explicit bindings always error. Both MCP and admin `save-legacy-reads` invalidate the request memo.
90
-
91
- Enable intended tools under the plugin's **Agent access** controls. Eventual tools require plugins:manage; native editing uses core content tools and content:edit_any. Read tools: listEvents, getEvent, listOccurrences, listVenues, listOrganizers. Legacy writes are blocked once native collections are active. [Tool schemas](https://github.com/Vermeulen-Solutions/eventual-rsvp-core/blob/main/src/mcp-schemas.ts) define exact inputs/routes.
92
-
93
- exportRecords follows cursors (default 5, maximum 10). Native native-content-v1 exports are inspection records, not full backups or legacy-import input. previewImport/importRecords accept legacy data only: at most 10 rows / 64 KiB, insert absent IDs, and import events as drafts. The [@vermeulen.solutions/eventual/transfer interface](../transfer/index.d.mts) supplies legacy backup/copy/CSV/ICS helpers. CSV needs stable source IDs and explicit-offset timed dates; all-day ends are inclusive. ICS conversion accepts standalone UTC or VALUE=DATE events and rejects unsupported recurrence/timezone constructs. Media, settings, revisions and calendar-state recovery need the host's backup facilities.
94
-
95
- ## Limits and checks
96
-
97
- The host's ten-bridge-call budget can constrain feeds, dependency checks and migration even with few displayed events. Smaller date windows or publicUrls=false help some JSON requests; complete-source scans still cost calls. Native exceptions/occurrence copy are bounded at 500 items; calendar group/state/output bounds also apply and fail explicitly. Background migration jobs and bulk APIs remain pending: [Eventual #5](https://github.com/Vermeulen-Solutions/eventual-rsvp-core/issues/5), [EmDash #4004](https://github.com/emdash-cms/emdash/issues/4004).
98
-
99
- Calendar UIDs, monotonic SEQUENCE and 366-day cancellation retention support reconciliation. Preserve migrated calendar_uid values. Publication shares schedule fields across languages; pending drafts stay separate. Stale-form checks are not an atomic write lock. Some settings copy remains English in the French admin; stock development-renderer diagnostics are recorded in acceptance.
100
-
101
- Runtime checks: npm run validate, typecheck, build, bundle, budget, and npm test. Tooling/package/editor/media changes have test:tooling, test:package, test:editor and registry:media checks. `node scripts/audit-documentation.mjs` checks local links and Registry section caps. Publishing uses the pinned CLI; immutable releases and current profile/release CIDs need separate approvals. [Release evidence](../audit/releases/0.14.0/README.md).