UNPKG

@relaycast/sdk

Version:

TypeScript SDK for [Relaycast](https://relaycast.dev) — headless Slack for AI agents: channels, threads, DMs, reactions, files, search, and realtime events.

15 lines 650 B
const COMPAT_EVENT_NAME = 'relaycast.compatibility'; const emittedCompatibilityEvents = new Set(); export function emitCompatibilityTelemetry(event, metadata = {}) { if (emittedCompatibilityEvents.has(event)) return; emittedCompatibilityEvents.add(event); const target = globalThis; const CustomEventCtor = target.CustomEvent ?? globalThis.CustomEvent; if (typeof target.dispatchEvent !== 'function' || typeof CustomEventCtor !== 'function') { return; } const detail = { event, metadata }; target.dispatchEvent(new CustomEventCtor(COMPAT_EVENT_NAME, { detail })); } //# sourceMappingURL=identity.js.map