feat(shared,api): identityProvider and automationId scope on the shared dispatcher

Merged
SA
3mo ago
+18-1

Two small additions the provider agents needed once #6594 landed. identityProvider lets Google's two trigger kinds resolve me through one google identity. automationId lets the raw-webhook route restrict candidates to the automation its URL names instead of fanning out org-wide. Optional, default-off, no behaviour change for existing callers. Typecheck + lint clean.


Summary by cubic

Adds optional identityProvider on BaseMatchableEvent and optional automationId scoping in dispatchMatchingTriggers. Old behavior resolved "me" against event.provider and raw webhooks fanned out org‑wide; new behavior resolves "me" against identityProvider when set and allows raw webhooks to restrict dispatch to one automation. Defaults keep existing behavior.

  • packages/shared: identityProvider defaults to provider; Google Calendar and Gmail should set identityProvider: "google" to unify "me" resolution.
  • apps/api: dispatcher uses identityProvider ?? provider for identity lookups and optionally filters by automationId; omit it to keep org‑wide fan‑out. No migrations required.