Newapp-sdks

@revenexx/app-sdk@0.8.0

Minor Changes

  • 9534404: Add db.events.emit() — an App fires its own declared events.

    manifest.events.emits[] gains a second kind: trigger: "app", for a fact with no row behind it (a derived value, a finding from a scheduled scan). Baseline generates one routine per App and this calls it as a PostgREST RPC with the token the App already holds.

    db.events exists only when the manifest declares such an event, and an undeclared name throws before the round trip, listing the declared ones — the generated routine refuses it too, but only as a Postgres error the mapper has to reduce to "wrong format", and a typo deserves to say so.

    emit and emitted are optional on Adapter, the way page already is: remote (and therefore runtime) publishes, mock records so a unit test can assert what an App fired with no infrastructure — including the outbox's idempotency, where a repeated id is a no-op and the first payload stands. The PHP runtime mirrors all of it through EmitsEvents / RecordsEvents.