@mushi-mushi/core 1.7.5 → 1.8.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/README.md CHANGED
@@ -37,6 +37,7 @@ Core types, API client, and utilities for the Mushi Mushi SDK.
37
37
  | `MushiSentryContext` | 1.0+ — rich Sentry handshake the SDK captures via `@sentry/browser` v7/v8/v9: `eventId`, `replayId`, `traceId`, `spanId`, `transaction`, `release`, `environment`, `user`, `tags`, `breadcrumbs`, `issueUrl`, `mushiReportId` (bidirectional). |
38
38
  | `MushiCaptureExceptionOptions` | 1.0+ — options for `Mushi.captureException(err, opts)`: `level`, `tags`, `extras`, `category`, `userIntent` overrides for the structured report. |
39
39
  | `NormalisedException` | 1.0+ — return type of `normaliseThrown(err)` (`{ name, message, stack?, cause? }`); used internally by `captureException` and exposed for adapters that want to ship their own thin wrappers. |
40
+ | `MushiBannerLink` | 1.8+ — flat action on the rich banner layout: `{ label, href? }` opens an external URL in a new tab, `{ label, featureRequest: true }` opens the widget in feature-request mode. Consumed via `MushiBannerConfig.links`. |
40
41
 
41
42
  Constants: `MUSHI_INTERNAL_HEADER` (`'X-Mushi-Internal'`),
42
43
  `MUSHI_INTERNAL_INIT_MARKER`, and the `MushiInternalRequestKind` literal union
@@ -68,4 +69,4 @@ MIT
68
69
  <!-- mushi-readme-stats-footer -->
69
70
  ---
70
71
 
71
- <sub>Monorepo scale (June 2026): 43 edge functions · 233 SQL migrations · 13 outbound plugins · 11 inbound adapters. Canonical counts: <a href="https://github.com/kensaurus/mushi-mushi/blob/master/docs/stats.md">docs/stats.md</a> · <code>pnpm docs-stats</code></sub>
72
+ <sub>Monorepo scale (June 2026): 43 edge functions · 234 SQL migrations · 13 outbound plugins · 11 inbound adapters. Canonical counts: <a href="https://github.com/kensaurus/mushi-mushi/blob/master/docs/stats.md">docs/stats.md</a> · <code>pnpm docs-stats</code></sub>
package/dist/index.d.cts CHANGED
@@ -130,6 +130,15 @@ interface MushiWidgetConfig {
130
130
  */
131
131
  avoidSelectors?: string[];
132
132
  }
133
+ /** Optional flat link in the rich banner action row (admin-console BetaBanner style). */
134
+ interface MushiBannerLink {
135
+ /** Link label shown in the action row. */
136
+ label: string;
137
+ /** External URL — opens in a new tab when set. */
138
+ href?: string;
139
+ /** When `href` is absent, opens the widget in feature-request mode. */
140
+ featureRequest?: boolean;
141
+ }
133
142
  /**
134
143
  * Configuration for the `trigger: 'banner'` header-strip launcher.
135
144
  *
@@ -148,12 +157,25 @@ interface MushiBannerConfig {
148
157
  variant?: 'neon' | 'brand' | 'subtle';
149
158
  /** 'top' pins the banner below any existing sticky headers; 'bottom' pins above bottom navs. Defaults to 'top'. */
150
159
  position?: 'top' | 'bottom';
151
- /** Override the call-to-action text in the banner. Defaults to 'Report a bug'. */
160
+ /**
161
+ * Body copy on the strip — the lime "Beta" announcement line users see in
162
+ * the Mushi admin console. When set, the banner switches to the rich layout
163
+ * (pill + message + flat text actions) instead of button-only CTAs.
164
+ */
165
+ message?: string;
166
+ /**
167
+ * Pill label shown before `message` (e.g. "Beta"). Defaults to `"Beta"` when
168
+ * `message` is set. Pass `false` to hide the pill.
169
+ */
170
+ label?: string | false;
171
+ /** Override the call-to-action text in the banner. Defaults to '🐛 Report a bug'. */
152
172
  bugCta?: string;
153
173
  /** Show a "✨ Request a feature" button alongside the bug button. Defaults to true. */
154
174
  featureCta?: boolean;
155
175
  /** Override the feature-request button label. */
156
176
  featureCtaLabel?: string;
177
+ /** Extra flat links after the bug/feature CTAs (e.g. "My submissions"). */
178
+ links?: MushiBannerLink[];
157
179
  /** CSS z-index of the banner element. Defaults to the widget's configured zIndex. */
158
180
  zIndex?: number;
159
181
  }
@@ -1475,4 +1497,4 @@ declare function createLogger(options: LoggerOptions): Logger;
1475
1497
  */
1476
1498
  declare const noopLogger: Logger;
1477
1499
 
1478
- export { type ApiClientOptions, type BreadcrumbBuffer, type BreadcrumbBufferOptions, DEFAULT_API_ENDPOINT, type LogEntry, type LogFormat, type LogLevel, type Logger, type LoggerOptions, MUSHI_INTERNAL_HEADER, MUSHI_INTERNAL_INIT_MARKER, type MushiActivityEvent, type MushiApiCascadeConfig, type MushiApiClient, type MushiApiResponse, type MushiBannerConfig, type MushiBetaChangelogEntry, type MushiBetaModeConfig, type MushiBreadcrumb, type MushiCaptureConfig, type MushiCaptureEventInput, type MushiCaptureExceptionOptions, type MushiConfig, type MushiConsoleEntry, type MushiCooldownConfig, type MushiDiagnosticsResult, type MushiDiscoverInventoryConfig, type MushiDiscoveryEventPayload, type MushiEnvironment, type MushiEventHandler, type MushiEventType, type MushiIntegrationsConfig, type MushiInternalRequestKind, 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 MushiTierResult, type MushiTimelineEntry, type MushiTimelineKind, type MushiUrlMatcher, type MushiWidgetAnchor, type MushiWidgetConfig, type NormalisedException, type OfflineQueue, type PiiScrubberConfig, type PreFilterResult, REGION_ENDPOINTS, type RateLimiter, type RateLimiterConfig, captureEnvironment, createApiClient, createBreadcrumbBuffer, createLogger, createOfflineQueue, createPiiScrubber, createPreFilter, createRateLimiter, getDeviceFingerprintHash, getReporterToken, getSessionId, newUuid, noopLogger, normaliseThrown, resolveRegionEndpoint, scrubPii };
1500
+ export { type ApiClientOptions, type BreadcrumbBuffer, type BreadcrumbBufferOptions, DEFAULT_API_ENDPOINT, type LogEntry, type LogFormat, type LogLevel, type Logger, type LoggerOptions, 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 MushiDiagnosticsResult, type MushiDiscoverInventoryConfig, type MushiDiscoveryEventPayload, type MushiEnvironment, type MushiEventHandler, type MushiEventType, type MushiIntegrationsConfig, type MushiInternalRequestKind, 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 MushiTierResult, type MushiTimelineEntry, type MushiTimelineKind, type MushiUrlMatcher, type MushiWidgetAnchor, type MushiWidgetConfig, type NormalisedException, type OfflineQueue, type PiiScrubberConfig, type PreFilterResult, REGION_ENDPOINTS, type RateLimiter, type RateLimiterConfig, captureEnvironment, createApiClient, createBreadcrumbBuffer, createLogger, createOfflineQueue, createPiiScrubber, createPreFilter, createRateLimiter, getDeviceFingerprintHash, getReporterToken, getSessionId, newUuid, noopLogger, normaliseThrown, resolveRegionEndpoint, scrubPii };
package/dist/index.d.ts CHANGED
@@ -130,6 +130,15 @@ interface MushiWidgetConfig {
130
130
  */
131
131
  avoidSelectors?: string[];
132
132
  }
133
+ /** Optional flat link in the rich banner action row (admin-console BetaBanner style). */
134
+ interface MushiBannerLink {
135
+ /** Link label shown in the action row. */
136
+ label: string;
137
+ /** External URL — opens in a new tab when set. */
138
+ href?: string;
139
+ /** When `href` is absent, opens the widget in feature-request mode. */
140
+ featureRequest?: boolean;
141
+ }
133
142
  /**
134
143
  * Configuration for the `trigger: 'banner'` header-strip launcher.
135
144
  *
@@ -148,12 +157,25 @@ interface MushiBannerConfig {
148
157
  variant?: 'neon' | 'brand' | 'subtle';
149
158
  /** 'top' pins the banner below any existing sticky headers; 'bottom' pins above bottom navs. Defaults to 'top'. */
150
159
  position?: 'top' | 'bottom';
151
- /** Override the call-to-action text in the banner. Defaults to 'Report a bug'. */
160
+ /**
161
+ * Body copy on the strip — the lime "Beta" announcement line users see in
162
+ * the Mushi admin console. When set, the banner switches to the rich layout
163
+ * (pill + message + flat text actions) instead of button-only CTAs.
164
+ */
165
+ message?: string;
166
+ /**
167
+ * Pill label shown before `message` (e.g. "Beta"). Defaults to `"Beta"` when
168
+ * `message` is set. Pass `false` to hide the pill.
169
+ */
170
+ label?: string | false;
171
+ /** Override the call-to-action text in the banner. Defaults to '🐛 Report a bug'. */
152
172
  bugCta?: string;
153
173
  /** Show a "✨ Request a feature" button alongside the bug button. Defaults to true. */
154
174
  featureCta?: boolean;
155
175
  /** Override the feature-request button label. */
156
176
  featureCtaLabel?: string;
177
+ /** Extra flat links after the bug/feature CTAs (e.g. "My submissions"). */
178
+ links?: MushiBannerLink[];
157
179
  /** CSS z-index of the banner element. Defaults to the widget's configured zIndex. */
158
180
  zIndex?: number;
159
181
  }
@@ -1475,4 +1497,4 @@ declare function createLogger(options: LoggerOptions): Logger;
1475
1497
  */
1476
1498
  declare const noopLogger: Logger;
1477
1499
 
1478
- export { type ApiClientOptions, type BreadcrumbBuffer, type BreadcrumbBufferOptions, DEFAULT_API_ENDPOINT, type LogEntry, type LogFormat, type LogLevel, type Logger, type LoggerOptions, MUSHI_INTERNAL_HEADER, MUSHI_INTERNAL_INIT_MARKER, type MushiActivityEvent, type MushiApiCascadeConfig, type MushiApiClient, type MushiApiResponse, type MushiBannerConfig, type MushiBetaChangelogEntry, type MushiBetaModeConfig, type MushiBreadcrumb, type MushiCaptureConfig, type MushiCaptureEventInput, type MushiCaptureExceptionOptions, type MushiConfig, type MushiConsoleEntry, type MushiCooldownConfig, type MushiDiagnosticsResult, type MushiDiscoverInventoryConfig, type MushiDiscoveryEventPayload, type MushiEnvironment, type MushiEventHandler, type MushiEventType, type MushiIntegrationsConfig, type MushiInternalRequestKind, 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 MushiTierResult, type MushiTimelineEntry, type MushiTimelineKind, type MushiUrlMatcher, type MushiWidgetAnchor, type MushiWidgetConfig, type NormalisedException, type OfflineQueue, type PiiScrubberConfig, type PreFilterResult, REGION_ENDPOINTS, type RateLimiter, type RateLimiterConfig, captureEnvironment, createApiClient, createBreadcrumbBuffer, createLogger, createOfflineQueue, createPiiScrubber, createPreFilter, createRateLimiter, getDeviceFingerprintHash, getReporterToken, getSessionId, newUuid, noopLogger, normaliseThrown, resolveRegionEndpoint, scrubPii };
1500
+ export { type ApiClientOptions, type BreadcrumbBuffer, type BreadcrumbBufferOptions, DEFAULT_API_ENDPOINT, type LogEntry, type LogFormat, type LogLevel, type Logger, type LoggerOptions, 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 MushiDiagnosticsResult, type MushiDiscoverInventoryConfig, type MushiDiscoveryEventPayload, type MushiEnvironment, type MushiEventHandler, type MushiEventType, type MushiIntegrationsConfig, type MushiInternalRequestKind, 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 MushiTierResult, type MushiTimelineEntry, type MushiTimelineKind, type MushiUrlMatcher, type MushiWidgetAnchor, type MushiWidgetConfig, type NormalisedException, type OfflineQueue, type PiiScrubberConfig, type PreFilterResult, REGION_ENDPOINTS, type RateLimiter, type RateLimiterConfig, captureEnvironment, createApiClient, createBreadcrumbBuffer, createLogger, createOfflineQueue, createPiiScrubber, createPreFilter, createRateLimiter, getDeviceFingerprintHash, getReporterToken, getSessionId, newUuid, noopLogger, normaliseThrown, resolveRegionEndpoint, scrubPii };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mushi-mushi/core",
3
- "version": "1.7.5",
3
+ "version": "1.8.0",
4
4
  "description": "Core types, API client, and pre-filter for Mushi Mushi SDK",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -62,15 +62,6 @@
62
62
  "provenance": true
63
63
  },
64
64
  "sideEffects": false,
65
- "scripts": {
66
- "build": "tsup",
67
- "dev": "tsup --watch",
68
- "clean": "rm -rf dist .turbo",
69
- "lint": "eslint src/",
70
- "typecheck": "tsc --noEmit",
71
- "test": "vitest run",
72
- "size": "size-limit"
73
- },
74
65
  "size-limit": [
75
66
  {
76
67
  "path": "dist/index.js",
@@ -78,18 +69,27 @@
78
69
  }
79
70
  ],
80
71
  "devDependencies": {
81
- "@mushi-mushi/eslint-config": "workspace:*",
82
- "@mushi-mushi/tsconfig": "workspace:*",
83
72
  "@size-limit/file": "^12.1.0",
84
73
  "eslint": "^10.3.0",
85
74
  "jsdom": "^29.1.1",
86
75
  "size-limit": "^12.1.0",
87
76
  "tsup": "^8.5.1",
88
77
  "typescript": "^6.0.3",
89
- "vitest": "^4.1.5"
78
+ "vitest": "^4.1.5",
79
+ "@mushi-mushi/tsconfig": "0.0.0",
80
+ "@mushi-mushi/eslint-config": "0.0.0"
90
81
  },
91
82
  "author": "Kenji Sakuramoto",
92
83
  "engines": {
93
84
  "node": ">=20"
85
+ },
86
+ "scripts": {
87
+ "build": "tsup",
88
+ "dev": "tsup --watch",
89
+ "clean": "rm -rf dist .turbo",
90
+ "lint": "eslint src/",
91
+ "typecheck": "tsc --noEmit",
92
+ "test": "vitest run",
93
+ "size": "size-limit"
94
94
  }
95
- }
95
+ }