FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

plugin api: api.events.on('change') — expose the resource change feed to plugins · Issue #623 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

plugin api: api.events.on('change') — expose the resource change feed to plugins #623

Closed as not planned

Description

Plugin seam for #621 (LWS), under #206.

Problem

src/notifications/events.js already emits resource change events for the solid-0.1 WebSocket channel, but the emitter isn't reachable from a plugin. LWS webhook notifications (and ActivityPub outbox fan-out, search indexing, type index #535, …) all need "tell me when a resource changes".

Proposal

const off = api.events.on('change', ({ type, url, isContainer, agent, at }) => { ... });
// type: 'create' | 'update' | 'delete'
  • Fires after the write has committed, off the request path (setImmediate / queueMicrotask), so a slow listener can't delay the response.
  • Listener exceptions are caught and logged with the plugin id.
  • off() unsubscribes; deactivate() should call it, but the loader also drops all listeners registered by a plugin on close.
  • Mirrors what the WebSocket notifier consumes today — no new event source, just exposure.

Prior art: LwsNotificationListener in jeswr/LinkedWebStorage, which turns changes into Create/Update/Delete activities, matches recursive container topics, and re-checks read permission at delivery time.

Activity

  1. added
    enhancementNew feature or request
    pluginCould be implemented as a plugin (#206); core/plugin line defined in #564
    on Oct 14, 2026
  2. melvincarvalho commented on Oct 14, 2026

    ContributorAuthor

    Duplicate of #603 (api.events.onResourceChange), which I missed — it was filed in July from the lwsd experiment. Folding the LWS motivation in there. Note lwsd's CONFORMANCE.md C9: for storage the plugin owns, it doesn't need host events at all; #603 only matters for notifying on host-pod writes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpluginCould be implemented as a plugin (#206); core/plugin line defined in #564

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL