@mushi-mushi/core 1.15.0 → 1.17.0

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.
package/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ interface MushiConfig {
19
19
  integrations?: MushiIntegrationsConfig;
20
20
  offline?: MushiOfflineConfig;
21
21
  rewards?: MushiRewardsConfig;
22
+ /** Page-aware, user-data-aware in-SDK assistant (P5). */
23
+ assistant?: MushiAssistantConfig;
22
24
  debug?: boolean;
23
25
  enabled?: boolean;
24
26
  /** Hook called before a report is sent. Return null to cancel, or return the (possibly modified) report. */
@@ -1024,6 +1026,56 @@ interface MushiDiagnosticsResult {
1024
1026
  */
1025
1027
  bannerRendered: boolean;
1026
1028
  }
1029
+ /**
1030
+ * Page-aware assistant (P5). The host app publishes a structured snapshot of
1031
+ * what the current screen is showing; the SDK forwards only this narrow,
1032
+ * server-validated subset so a malicious page cannot inject arbitrary prompt
1033
+ * fields. Ported from the admin console's page-context registry.
1034
+ */
1035
+ interface MushiPageContext {
1036
+ /** Current route/path (e.g. '/activity'). */
1037
+ route: string;
1038
+ /** Human title of the screen. */
1039
+ title?: string;
1040
+ /** One-line description of what is on screen. */
1041
+ summary?: string;
1042
+ /** Active filters as a flat key/value map. */
1043
+ filters?: Record<string, string | number | boolean | null | undefined>;
1044
+ /** The focused/selected entity, if any. */
1045
+ selection?: {
1046
+ kind: string;
1047
+ id: string;
1048
+ label?: string;
1049
+ } | null;
1050
+ }
1051
+ interface MushiAssistantConfig {
1052
+ /**
1053
+ * Enable the in-SDK assistant tab. Defaults to false; the console can also
1054
+ * enable it via runtime config so it can be turned on without a rebuild.
1055
+ */
1056
+ enabled?: boolean;
1057
+ /** Tab label (default: "Ask"). */
1058
+ label?: string;
1059
+ /** Greeting shown on an empty assistant thread. */
1060
+ greeting?: string;
1061
+ /** Suggested starter questions shown on an empty thread. */
1062
+ suggestions?: string[];
1063
+ }
1064
+ interface MushiAssistantStep {
1065
+ label: string;
1066
+ detail?: string;
1067
+ }
1068
+ interface MushiAssistantReply {
1069
+ /** 'answer' resolves the turn; 'clarify' asks the user a follow-up. */
1070
+ kind: 'answer' | 'clarify';
1071
+ text?: string;
1072
+ steps?: MushiAssistantStep[];
1073
+ /** For 'clarify' replies. */
1074
+ question?: string;
1075
+ options?: string[];
1076
+ /** Server-assigned thread id so the next turn continues the conversation. */
1077
+ threadId?: string;
1078
+ }
1027
1079
  interface MushiSDKInstance {
1028
1080
  /**
1029
1081
  * Open the reporter widget. With no options, opens to the category
@@ -1063,6 +1115,8 @@ interface MushiSDKInstance {
1063
1115
  hide(): void;
1064
1116
  attachTo(selectorOrElement: string | Element, options?: MushiWidgetConfig): () => void;
1065
1117
  setTrigger(trigger: NonNullable<MushiWidgetConfig['trigger']>): void;
1118
+ /** Open the widget directly to the reporter's "My reports" history view. */
1119
+ openReporter(): void;
1066
1120
  close(): void;
1067
1121
  destroy(): void;
1068
1122
  updateConfig(config: MushiRuntimeSdkConfig): void;
@@ -1100,6 +1154,26 @@ interface MushiSDKInstance {
1100
1154
  name?: string;
1101
1155
  [k: string]: unknown;
1102
1156
  }): void;
1157
+ /**
1158
+ * Identify the current end user with a signed Mushi identity JWT minted by
1159
+ * the host app's server (see `@mushi-mushi/node`'s `mintMushiIdentityToken`).
1160
+ * This is the trust anchor for secure "My Reports", rewards-to-membership
1161
+ * grants, and the per-user assistant data index — the backend re-verifies
1162
+ * the signature against the project's identity secret. Unlike `identify()`,
1163
+ * which is spoofable, claims from this token are trusted server-side.
1164
+ *
1165
+ * Pass `null` (or call on logout) to clear the identity and fall back to the
1166
+ * anonymous reporter token.
1167
+ */
1168
+ identifyWithToken(token: string | null): void;
1169
+ /**
1170
+ * Publish the current screen's context so the in-SDK assistant can answer
1171
+ * page-aware questions. Call on every route/selection change. Pass `null`
1172
+ * to clear (e.g. on unmount). Only a narrow subset is sent to the server.
1173
+ */
1174
+ publishPageContext(context: MushiPageContext | null): void;
1175
+ /** Open the widget on the assistant ("Ask") tab. */
1176
+ openAssistant(): void;
1103
1177
  /**
1104
1178
  * Sentry-grade observability surface (2026-05-07).
1105
1179
  *
@@ -1227,6 +1301,16 @@ interface MushiApiClient {
1227
1301
  status: MushiReportStatus;
1228
1302
  }>>;
1229
1303
  getSdkConfig(): Promise<MushiApiResponse<MushiRuntimeSdkConfig>>;
1304
+ /**
1305
+ * Send one assistant turn. Forwards the page context + thread id; the
1306
+ * end-user identity token (when set) travels on the X-Mushi-User-Token
1307
+ * header so the backend can scope retrieval to the verified user.
1308
+ */
1309
+ askAssistant(input: {
1310
+ message: string;
1311
+ threadId?: string | null;
1312
+ context?: MushiPageContext | null;
1313
+ }): Promise<MushiApiResponse<MushiAssistantReply>>;
1230
1314
  getLatestSdkVersion(packageName: string): Promise<MushiApiResponse<MushiSdkVersionInfo>>;
1231
1315
  /**
1232
1316
  * Mushi v2.1: ship a single passive-discovery observation (route +
@@ -1347,11 +1431,9 @@ interface MushiApiClient {
1347
1431
  /** Whether the caller has a mushi_testers row. */
1348
1432
  getTesterStatus(jwt: string): Promise<MushiApiResponse<{
1349
1433
  is_tester: boolean;
1350
- tester: {
1351
- id: string;
1352
- public_handle: string | null;
1353
- display_name: string | null;
1354
- } | null;
1434
+ tester_id: string | null;
1435
+ public_handle: string | null;
1436
+ display_name: string | null;
1355
1437
  }>>;
1356
1438
  }
1357
1439
  /**
@@ -1471,6 +1553,15 @@ interface ApiClientOptions {
1471
1553
  apiEndpoint?: string;
1472
1554
  timeout?: number;
1473
1555
  maxRetries?: number;
1556
+ /** When set, sent on every request so heartbeats record the running SDK version. */
1557
+ sdkPackage?: string;
1558
+ sdkVersion?: string;
1559
+ /**
1560
+ * Returns the current signed end-user identity JWT, or null when the user is
1561
+ * anonymous. When present it is sent on the X-Mushi-User-Token header so the
1562
+ * backend can verify it and scope identity-bound features to that user.
1563
+ */
1564
+ getUserToken?: () => string | null | undefined;
1474
1565
  }
1475
1566
  declare const DEFAULT_API_ENDPOINT = "https://dxptnwrhwsqckaftyymj.supabase.co/functions/v1/api";
1476
1567
  declare const MUSHI_INTERNAL_HEADER = "X-Mushi-Internal";
@@ -1510,6 +1601,43 @@ declare function resolveRegionEndpoint(opts: {
1510
1601
  fetcher?: typeof fetch;
1511
1602
  }): Promise<string>;
1512
1603
 
1604
+ /**
1605
+ * FILE: packages/core/src/env-config.ts
1606
+ * PURPOSE: Reads Mushi credentials from the environment when they are not
1607
+ * supplied explicitly. This lets every framework init work with
1608
+ * zero-config — just run `npx mushi-mushi` once, add the .env.local
1609
+ * line, and the provider/plugin/init works without props.
1610
+ *
1611
+ * Resolution order per field:
1612
+ * 1. Vite / SvelteKit / Angular (VITE_MUSHI_*)
1613
+ * 2. Next.js (NEXT_PUBLIC_MUSHI_*)
1614
+ * 3. Nuxt (NUXT_PUBLIC_MUSHI_*)
1615
+ * 4. Expo managed workflow (EXPO_PUBLIC_MUSHI_*)
1616
+ * 5. Node / React Native / server (bare MUSHI_*)
1617
+ *
1618
+ * Vite statically replaces `import.meta.env.VITE_*` at build time, so the
1619
+ * literal key references here are intentional — they make bundlers replace
1620
+ * the values even when accessed indirectly.
1621
+ *
1622
+ * Next.js and Expo, by contrast, do STATIC string replacement that only
1623
+ * inlines literal `process.env.NEXT_PUBLIC_*` / `process.env.EXPO_PUBLIC_*`
1624
+ * dot-notation references. A dynamic `process.env[key]` lookup is explicitly
1625
+ * unsupported and silently resolves to `undefined` in production client
1626
+ * bundles (Expo even ships an ESLint rule against it). Every `process.env`
1627
+ * read below is therefore a literal, statically-analyzable reference.
1628
+ */
1629
+ interface ResolvedEnvConfig {
1630
+ projectId?: string;
1631
+ apiKey?: string;
1632
+ apiEndpoint?: string;
1633
+ }
1634
+ /**
1635
+ * Reads Mushi projectId, apiKey, and (optionally) apiEndpoint from
1636
+ * the environment. Returns only the fields that are present so callers
1637
+ * can cleanly spread: `{ ...resolveEnvConfig(), ...explicitConfig }`.
1638
+ */
1639
+ declare function resolveEnvConfig(): ResolvedEnvConfig;
1640
+
1513
1641
  interface PreFilterResult {
1514
1642
  passed: boolean;
1515
1643
  reason?: string;
@@ -1802,4 +1930,208 @@ declare function createLogger(options: LoggerOptions): Logger;
1802
1930
  */
1803
1931
  declare const noopLogger: Logger;
1804
1932
 
1805
- export { type ApiClientOptions, type BreadcrumbBuffer, type BreadcrumbBufferOptions, DEFAULT_API_ENDPOINT, type LogEntry, type LogFormat, type LogLevel, type Logger, type LoggerOptions, MAX_REPORT_PAYLOAD_BYTES, MAX_SCREENSHOT_DATA_URL_BYTES, MUSHI_INTERNAL_HEADER, MUSHI_INTERNAL_INIT_MARKER, type MushiActivityEvent, type MushiApiCascadeConfig, type MushiApiClient, type MushiApiResponse, type MushiBannerConfig, type MushiBannerLink, type MushiBetaChangelogEntry, type MushiBetaModeConfig, type MushiBreadcrumb, type MushiCaptureConfig, type MushiCaptureEventInput, type MushiCaptureExceptionOptions, type MushiConfig, type MushiConsoleEntry, type MushiCooldownConfig, type MushiCrossAppReport, type MushiCustomCategory, type MushiDiagnosticsResult, type MushiDiscoverInventoryConfig, type MushiDiscoveryEventPayload, type MushiEnvironment, type MushiEventHandler, type MushiEventType, type MushiHallOfFameEntry, type MushiIntegrationsConfig, type MushiInternalRequestKind, type MushiLeaderboardEntry, type MushiNetworkEntry, type MushiOfflineConfig, type MushiOnDeviceClassifier, type MushiOnDeviceClassifierInput, type MushiOnDeviceClassifierResult, type MushiPerformanceMetrics, type MushiPreFilterConfig, type MushiPreset, type MushiPrivacyConfig, type MushiProactiveConfig, type MushiRegion, type MushiReport, type MushiReportBuilder, type MushiReportCategory, type MushiReportStatus, type MushiReporterComment, type MushiReporterReport, type MushiReputationResult, type MushiRewardsConfig, type MushiRuntimeSdkConfig, type MushiSDKInstance, type MushiSdkVersionInfo, type MushiSelectedElement, type MushiSentryConfig, type MushiSentryContext, type MushiTesterReputation, type MushiTierResult, type MushiTimelineEntry, type MushiTimelineKind, type MushiTracePropagationConfig, type MushiUrlMatcher, type MushiWidgetAnchor, type MushiWidgetConfig, type NormalisedException, type OfflineQueue, type PayloadGuardResult, type PiiScrubberConfig, type PreFilterResult, REGION_ENDPOINTS, type RateLimiter, type RateLimiterConfig, captureEnvironment, checkReportPayloadSize, createApiClient, createBreadcrumbBuffer, createLogger, createOfflineQueue, createPiiScrubber, createPreFilter, createRateLimiter, estimateJsonBytes, formatBytes, getDeviceFingerprintHash, getReporterToken, getSessionId, newUuid, noopLogger, normaliseThrown, resolveRegionEndpoint, scrubPii };
1933
+ /**
1934
+ * FILE: packages/core/src/design-tokens.ts
1935
+ * PURPOSE: The single cross-platform source of truth for Mushi widget design.
1936
+ *
1937
+ * Every platform SDK (web Shadow-DOM CSS, React Native components, Capacitor
1938
+ * native sheet) reads its colours, spacing, radii, typography, z-index scale,
1939
+ * motion, launcher geometry, and default copy from this module so the widget
1940
+ * renders coherently everywhere. `@mushi-mushi/core` is already a dependency
1941
+ * of every platform package, which is why the tokens live here rather than in
1942
+ * a separate published package — one import path, no extra build wiring.
1943
+ *
1944
+ * Colour values mirror the historical washi/vermillion palette previously
1945
+ * inlined in `@mushi-mushi/web`'s styles.ts so the visual identity is
1946
+ * unchanged; the difference is that RN and Capacitor now share the exact
1947
+ * same constants instead of re-deriving their own.
1948
+ */
1949
+ type MushiThemeMode = 'light' | 'dark';
1950
+ interface MushiColorPalette {
1951
+ /** washi cream / dark wash — primary surface */
1952
+ paper: string;
1953
+ /** elevated surface (panels, sheets) */
1954
+ paperRaised: string;
1955
+ /** sumi black / cream type — primary text */
1956
+ ink: string;
1957
+ /** captions, descriptions */
1958
+ inkMuted: string;
1959
+ /** disabled, separators */
1960
+ inkFaint: string;
1961
+ /** dim text */
1962
+ inkDim: string;
1963
+ /** hairline rules */
1964
+ rule: string;
1965
+ /** stronger rules / borders */
1966
+ ruleStrong: string;
1967
+ /** 朱 hanko red — signature accent */
1968
+ accent: string;
1969
+ /** ~8–12% accent wash */
1970
+ accentWash: string;
1971
+ /** accessible text on the accent wash */
1972
+ accentInk: string;
1973
+ /** success */
1974
+ ok: string;
1975
+ /** danger / destructive */
1976
+ danger: string;
1977
+ }
1978
+ /** Light-mode palette. */
1979
+ declare const MUSHI_COLORS_LIGHT: MushiColorPalette;
1980
+ /** Dark-mode palette. */
1981
+ declare const MUSHI_COLORS_DARK: MushiColorPalette;
1982
+ /** Resolve the palette for a theme mode. */
1983
+ declare function mushiPalette(mode: MushiThemeMode): MushiColorPalette;
1984
+ /**
1985
+ * Spacing scale (px). Named by feel, matching the editorial design system so
1986
+ * the same rhythm reads across web and native.
1987
+ */
1988
+ declare const MUSHI_SPACING: {
1989
+ readonly hairline: 2;
1990
+ readonly tight: 4;
1991
+ readonly snug: 8;
1992
+ readonly comfy: 12;
1993
+ readonly roomy: 16;
1994
+ readonly lounge: 20;
1995
+ readonly open: 24;
1996
+ readonly wide: 32;
1997
+ };
1998
+ /** Corner radii (px). Tables/strips stay sharp; controls get soft corners. */
1999
+ declare const MUSHI_RADIUS: {
2000
+ readonly none: 0;
2001
+ readonly control: 4;
2002
+ readonly card: 10;
2003
+ readonly sheet: 16;
2004
+ readonly pill: 999;
2005
+ };
2006
+ /** Typography stacks shared by every platform (system-first, no web-font fetch). */
2007
+ declare const MUSHI_TYPE: {
2008
+ readonly fontDisplay: "'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'Cambria', Georgia, 'Times New Roman', serif";
2009
+ readonly fontBody: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', sans-serif";
2010
+ readonly fontMono: "ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace";
2011
+ readonly sizeBody: 14;
2012
+ readonly sizeLabel: 12;
2013
+ readonly sizeTitle: 16;
2014
+ readonly lineBody: 1.55;
2015
+ };
2016
+ /**
2017
+ * z-index scale. The host element is pass-through; only interactive surfaces
2018
+ * opt back into pointer events. Banner sits just under the FAB; panel above.
2019
+ */
2020
+ declare const MUSHI_Z: {
2021
+ readonly base: 99999;
2022
+ /** banner sits one below the trigger so an open FAB overlaps it */
2023
+ readonly banner: 99998;
2024
+ /** report/assistant panel sits one above the trigger */
2025
+ readonly panel: 100000;
2026
+ /** element-selector overlay — always on top */
2027
+ readonly overlay: 2147483647;
2028
+ };
2029
+ /** Motion signature — a soft back-out "stamp press". */
2030
+ declare const MUSHI_MOTION: {
2031
+ readonly easeStamp: "cubic-bezier(0.22, 1, 0.36, 1)";
2032
+ readonly durationFast: 200;
2033
+ readonly durationPanel: 300;
2034
+ };
2035
+ /**
2036
+ * Launcher geometry — the numbers that previously diverged between platforms
2037
+ * (banner height, FAB size, default gutter, panel width). Centralising them
2038
+ * is what fixes the "different on every app" + safe-area bleed problems.
2039
+ */
2040
+ declare const MUSHI_GEOMETRY: {
2041
+ readonly bannerHeight: 36;
2042
+ readonly fabSize: 52;
2043
+ readonly edgeTabWidth: 28;
2044
+ /** default gutter from the screen edge (added on top of safe-area insets) */
2045
+ readonly gutter: 24;
2046
+ readonly panelWidth: 384;
2047
+ /** below this viewport width the panel becomes a full-width bottom sheet */
2048
+ readonly panelSheetBreakpoint: 480;
2049
+ };
2050
+ /**
2051
+ * Default user-facing copy. Centralised so apps stop drifting on the banner
2052
+ * label / CTA wording (seen as inconsistent across the four host apps).
2053
+ */
2054
+ declare const MUSHI_COPY: {
2055
+ readonly bannerLabel: "Beta";
2056
+ readonly bannerMessage: "Help us improve — your feedback shapes what we ship.";
2057
+ readonly bugCta: "Report a bug";
2058
+ readonly featureCta: "Feature request";
2059
+ readonly triggerText: "🐛";
2060
+ readonly panelTitle: "Send feedback";
2061
+ readonly myReportsTab: "My reports";
2062
+ readonly assistantTab: "Ask";
2063
+ };
2064
+ /** A flat, serialisable snapshot of every token for a given theme mode. */
2065
+ interface MushiTokenSnapshot {
2066
+ mode: MushiThemeMode;
2067
+ colors: MushiColorPalette;
2068
+ spacing: typeof MUSHI_SPACING;
2069
+ radius: typeof MUSHI_RADIUS;
2070
+ type: typeof MUSHI_TYPE;
2071
+ z: typeof MUSHI_Z;
2072
+ motion: typeof MUSHI_MOTION;
2073
+ geometry: typeof MUSHI_GEOMETRY;
2074
+ copy: typeof MUSHI_COPY;
2075
+ }
2076
+ /** Build a full token snapshot for a theme mode (used by RN/Capacitor). */
2077
+ declare function mushiTokens(mode: MushiThemeMode): MushiTokenSnapshot;
2078
+
2079
+ /**
2080
+ * FILE: packages/core/src/identity.ts
2081
+ * PURPOSE: The signed-JWT end-user identity contract shared between the SDK
2082
+ * and the Mushi backend.
2083
+ *
2084
+ * The host app's server mints a short-lived JWT (HS256, signed with the
2085
+ * project's identity secret obtained from the console) describing the
2086
+ * currently-logged-in end user, and hands it to the SDK via
2087
+ * `Mushi.identifyWithToken(jwt)`. The SDK never verifies the signature — it
2088
+ * only base64url-decodes the payload to show the user's name locally and
2089
+ * forwards the raw token to the backend, which verifies it against the
2090
+ * per-project secret before trusting any claim. This mirrors the Featurebase
2091
+ * `featurebaseJwt` model and is the trust anchor for "My Reports", rewards,
2092
+ * and the per-user assistant data index.
2093
+ *
2094
+ * Anonymous reporters (logged-out) keep using the random reporter token; the
2095
+ * signed JWT is purely additive.
2096
+ */
2097
+ /** Claims carried by a Mushi end-user identity token. */
2098
+ interface MushiIdentityClaims {
2099
+ /** Mushi external project id this token is scoped to. */
2100
+ projectId: string;
2101
+ /** The host app's stable id for this end user (becomes `external_user_id`). */
2102
+ sub: string;
2103
+ /** Optional display email (never stored raw server-side — hashed). */
2104
+ email?: string;
2105
+ /** Optional display name. */
2106
+ name?: string;
2107
+ /** Issued-at (seconds since epoch). */
2108
+ iat?: number;
2109
+ /** Expiry (seconds since epoch). Tokens should be short-lived (<= 1h). */
2110
+ exp?: number;
2111
+ }
2112
+ /**
2113
+ * Sentinel so callers can distinguish a Mushi identity token from the random
2114
+ * anonymous reporter token (`mushi_<uuid>`). Identity tokens are standard JWTs
2115
+ * (three dot-separated base64url segments), so this prefix is informational
2116
+ * only and not embedded in the wire format.
2117
+ */
2118
+ declare const MUSHI_IDENTITY_TOKEN_PREFIX = "mushi.identity";
2119
+ /**
2120
+ * Build the canonical claims object a host server should sign. Exposed so the
2121
+ * `@mushi-mushi/node` SDK and docs share one definition of the payload shape.
2122
+ */
2123
+ declare function buildIdentityClaims(input: {
2124
+ projectId: string;
2125
+ userId: string;
2126
+ email?: string;
2127
+ name?: string;
2128
+ ttlSeconds?: number;
2129
+ }): Required<Pick<MushiIdentityClaims, 'projectId' | 'sub' | 'iat' | 'exp'>> & Pick<MushiIdentityClaims, 'email' | 'name'>;
2130
+ /**
2131
+ * Decode (WITHOUT verifying) the claims of an identity JWT. Returns null if the
2132
+ * token is malformed. CLIENT-SIDE DISPLAY ONLY — never trust these claims for
2133
+ * authorisation; the server re-verifies the signature.
2134
+ */
2135
+ declare function parseIdentityToken(token: string): MushiIdentityClaims | null;
2136
+
2137
+ export { type ApiClientOptions, type BreadcrumbBuffer, type BreadcrumbBufferOptions, DEFAULT_API_ENDPOINT, type LogEntry, type LogFormat, type LogLevel, type Logger, type LoggerOptions, MAX_REPORT_PAYLOAD_BYTES, MAX_SCREENSHOT_DATA_URL_BYTES, MUSHI_COLORS_DARK, MUSHI_COLORS_LIGHT, MUSHI_COPY, MUSHI_GEOMETRY, MUSHI_IDENTITY_TOKEN_PREFIX, MUSHI_INTERNAL_HEADER, MUSHI_INTERNAL_INIT_MARKER, MUSHI_MOTION, MUSHI_RADIUS, MUSHI_SPACING, MUSHI_TYPE, MUSHI_Z, type MushiActivityEvent, type MushiApiCascadeConfig, type MushiApiClient, type MushiApiResponse, type MushiAssistantConfig, type MushiAssistantReply, type MushiAssistantStep, type MushiBannerConfig, type MushiBannerLink, type MushiBetaChangelogEntry, type MushiBetaModeConfig, type MushiBreadcrumb, type MushiCaptureConfig, type MushiCaptureEventInput, type MushiCaptureExceptionOptions, type MushiColorPalette, type MushiConfig, type MushiConsoleEntry, type MushiCooldownConfig, type MushiCrossAppReport, type MushiCustomCategory, type MushiDiagnosticsResult, type MushiDiscoverInventoryConfig, type MushiDiscoveryEventPayload, type MushiEnvironment, type MushiEventHandler, type MushiEventType, type MushiHallOfFameEntry, type MushiIdentityClaims, type MushiIntegrationsConfig, type MushiInternalRequestKind, type MushiLeaderboardEntry, type MushiNetworkEntry, type MushiOfflineConfig, type MushiOnDeviceClassifier, type MushiOnDeviceClassifierInput, type MushiOnDeviceClassifierResult, type MushiPageContext, type MushiPerformanceMetrics, type MushiPreFilterConfig, type MushiPreset, type MushiPrivacyConfig, type MushiProactiveConfig, type MushiRegion, type MushiReport, type MushiReportBuilder, type MushiReportCategory, type MushiReportStatus, type MushiReporterComment, type MushiReporterReport, type MushiReputationResult, type MushiRewardsConfig, type MushiRuntimeSdkConfig, type MushiSDKInstance, type MushiSdkVersionInfo, type MushiSelectedElement, type MushiSentryConfig, type MushiSentryContext, type MushiTesterReputation, type MushiThemeMode, type MushiTierResult, type MushiTimelineEntry, type MushiTimelineKind, type MushiTokenSnapshot, type MushiTracePropagationConfig, type MushiUrlMatcher, type MushiWidgetAnchor, type MushiWidgetConfig, type NormalisedException, type OfflineQueue, type PayloadGuardResult, type PiiScrubberConfig, type PreFilterResult, REGION_ENDPOINTS, type RateLimiter, type RateLimiterConfig, type ResolvedEnvConfig, buildIdentityClaims, captureEnvironment, checkReportPayloadSize, createApiClient, createBreadcrumbBuffer, createLogger, createOfflineQueue, createPiiScrubber, createPreFilter, createRateLimiter, estimateJsonBytes, formatBytes, getDeviceFingerprintHash, getReporterToken, getSessionId, mushiPalette, mushiTokens, newUuid, noopLogger, normaliseThrown, parseIdentityToken, resolveEnvConfig, resolveRegionEndpoint, scrubPii };