mushi-mushi 0.8.15 → 1.36.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 +72 -229
- package/dist/angular.cjs +113 -0
- package/dist/angular.d.cts +95 -0
- package/dist/angular.d.ts +95 -0
- package/dist/angular.js +88 -0
- package/dist/bin.js +16 -0
- package/dist/core.cjs +24 -0
- package/dist/core.d.cts +10 -0
- package/dist/core.d.ts +10 -0
- package/dist/core.js +2 -0
- package/dist/eslint.cjs +1767 -0
- package/dist/eslint.d.cts +76 -0
- package/dist/eslint.d.ts +76 -0
- package/dist/eslint.js +1740 -0
- package/dist/headless.cjs +24 -0
- package/dist/headless.d.cts +1 -0
- package/dist/headless.d.ts +1 -0
- package/dist/headless.js +2 -0
- package/dist/i18n.cjs +24 -0
- package/dist/i18n.d.cts +1 -0
- package/dist/i18n.d.ts +1 -0
- package/dist/i18n.js +2 -0
- package/dist/index.cjs +24 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -84
- package/dist/node-express.cjs +24 -0
- package/dist/node-express.d.cts +1 -0
- package/dist/node-express.d.ts +1 -0
- package/dist/node-express.js +2 -0
- package/dist/node-fastify.cjs +24 -0
- package/dist/node-fastify.d.cts +1 -0
- package/dist/node-fastify.d.ts +1 -0
- package/dist/node-fastify.js +2 -0
- package/dist/node-hono.cjs +24 -0
- package/dist/node-hono.d.cts +1 -0
- package/dist/node-hono.d.ts +1 -0
- package/dist/node-hono.js +2 -0
- package/dist/node.cjs +24 -0
- package/dist/node.d.cts +1 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.js +2 -0
- package/dist/otel.cjs +24 -0
- package/dist/otel.d.cts +1 -0
- package/dist/otel.d.ts +1 -0
- package/dist/otel.js +2 -0
- package/dist/react.cjs +318 -0
- package/dist/react.d.cts +153 -0
- package/dist/react.d.ts +153 -0
- package/dist/react.js +280 -0
- package/dist/svelte.cjs +83 -0
- package/dist/svelte.d.cts +87 -0
- package/dist/svelte.d.ts +87 -0
- package/dist/svelte.js +53 -0
- package/dist/test-utils.cjs +24 -0
- package/dist/test-utils.d.cts +1 -0
- package/dist/test-utils.d.ts +1 -0
- package/dist/test-utils.js +2 -0
- package/dist/vue.cjs +89 -0
- package/dist/vue.d.cts +25 -0
- package/dist/vue.d.ts +25 -0
- package/dist/vue.js +59 -0
- package/package.json +272 -5
package/README.md
CHANGED
|
@@ -4,292 +4,141 @@
|
|
|
4
4
|
|
|
5
5
|
> **Your AI built it. Mushi Mushi makes it better.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
One place to improve your AI-built app. Mushi Mushi finds what breaks, where people get stuck and what the code needs. Then it hands the fix to Lovable, Cursor or Claude Code, in plain English.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npx mushi-mushi
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<sub>`mushi-mushi` is the setup command. It adds the Mushi Mushi SDK to the app you already have: React, Next.js, Vue, Nuxt, Svelte, SvelteKit, Angular, React Native, Expo, Capacitor, Node or plain JavaScript. [Launcher docs](https://kensaur.us/mushi-mushi/docs/sdks/launcher)</sub>
|
|
13
|
+
Run it in your app's folder. No terminal? [Use Lovable or Bolt instead](https://kensaur.us/mushi-mushi/docs/quickstart/lovable-bolt).
|
|
16
14
|
|
|
17
15
|
[](https://www.npmjs.com/package/mushi-mushi)
|
|
18
16
|
[](https://www.npmjs.com/package/mushi-mushi)
|
|
19
17
|
[](https://github.com/kensaurus/mushi-mushi/blob/master/LICENSE)
|
|
20
18
|
[](https://docs.npmjs.com/generating-provenance-statements)
|
|
21
|
-
[](https://socket.dev/npm/package/mushi-mushi)
|
|
22
|
-
[](https://nodejs.org)
|
|
23
19
|
|
|
24
20
|
<a href="https://kensaur.us/mushi-mushi/docs/demo/diagnosis" title="See a sample diagnosis: no signup">
|
|
25
|
-
<img src="https://raw.githubusercontent.com/kensaurus/mushi-mushi/master/docs/screenshots/
|
|
21
|
+
<img src="https://raw.githubusercontent.com/kensaurus/mushi-mushi/master/docs/screenshots/sample-diagnosis.png" alt="A Mushi Mushi diagnosis of the report 'Pay now does nothing on my phone': the cause in plain English, why it broke, the two lines of code at fault, the suggested fix and the steps to reproduce." width="860" />
|
|
26
22
|
</a>
|
|
27
23
|
|
|
28
|
-
<sub>↑
|
|
24
|
+
<sub>↑ What you get back when a user writes "Pay now does nothing on my phone". [Read the whole sample](https://kensaur.us/mushi-mushi/docs/demo/diagnosis), no signup.</sub>
|
|
29
25
|
|
|
30
26
|
</div>
|
|
31
27
|
|
|
32
28
|
---
|
|
33
29
|
|
|
34
|
-
## What
|
|
35
|
-
|
|
36
|
-
Something in your app feels broken to a user: a button that doesn't react, a page that takes forever, a layout that folds on their phone. Often nothing crashed, so an error tracker stays quiet, and most people just leave.
|
|
37
|
-
|
|
38
|
-
Mushi Mushi adds a small report button to your app (or shake-to-report on a phone). The user taps it and writes a note. Mushi Mushi saves a screenshot, the page, what they tapped, and the last console and network events. An AI explains the likely cause in plain English and groups repeat reports, so you see one row per real bug. Your editor gets a ready fix prompt. If you want, an agent opens a draft pull request, and you decide whether it merges.
|
|
39
|
-
|
|
40
|
-
Who it's for and where each group starts: [who it's for](https://kensaur.us/mushi-mushi/docs/who-its-for).
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Install in one line
|
|
30
|
+
## What happens next
|
|
45
31
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
1. **You sign in through your browser.** The command opens a page. You approve it, and Mushi Mushi makes your free project and key. There is nothing to copy.
|
|
33
|
+
2. **It installs Mushi Mushi and shows you a few lines of code.** Add them to your app (or ask your AI editor to). They show a small report button.
|
|
34
|
+
3. **Your users tap the button when something is wrong.** They write one sentence. Mushi Mushi adds a screenshot and what the app was doing.
|
|
35
|
+
4. **You get the cause in plain English, and a fix your AI editor can apply.** Open the report in the [console](https://kensaur.us/mushi-mushi/admin), or ask your editor for it.
|
|
49
36
|
|
|
50
|
-
The
|
|
37
|
+
The setup adds `mushi-mushi` to your `package.json` and writes your two settings to `.env.local`. It doesn't change your app's code (for a plain JavaScript app it offers to, and asks first). It warns you if `.env.local` is not in `.gitignore`.
|
|
51
38
|
|
|
52
|
-
|
|
53
|
-
// After the wizard runs (React + Vite example, src/main.tsx):
|
|
54
|
-
import { MushiProvider } from '@mushi-mushi/react'
|
|
39
|
+
## What it does
|
|
55
40
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<App />
|
|
62
|
-
</MushiProvider>
|
|
63
|
-
)
|
|
64
|
-
```
|
|
41
|
+
| | What you get | What it needs |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| **Fix what breaks** | A report button for your users, and a plain-English diagnosis of each bug with a fix prompt. Repeat reports of one bug become one row. | Nothing extra. |
|
|
44
|
+
| **Smooth user journeys** | A map of how people move through your app: where they leave, get lost or hit a dead end, each with a prompt for your AI editor. | The map from real visits needs nothing extra. A scan of your live site needs a [Firecrawl](https://www.firecrawl.dev) key. |
|
|
45
|
+
| **Clean up the code** | Known security holes in your packages, and [lint rules](#catch-what-ai-tools-leave-behind) that catch empty buttons and fake data. Changes come as pull requests you review. | GitHub connected, for the security check. |
|
|
65
46
|
|
|
66
|
-
|
|
47
|
+
More detail on each: [what it does](https://kensaur.us/mushi-mushi/docs/what-it-does).
|
|
67
48
|
|
|
68
|
-
|
|
49
|
+
## Ask your AI editor to do it
|
|
69
50
|
|
|
70
|
-
|
|
51
|
+
Paste this into Cursor, Claude Code or any AI editor that can run commands:
|
|
71
52
|
|
|
72
|
-
```
|
|
73
|
-
|
|
53
|
+
```text
|
|
54
|
+
Add Mushi Mushi to this app. In the project folder, run `npx mushi-mushi --yes`.
|
|
55
|
+
It prints a sign-in link: show it to me and wait while I approve it in my
|
|
56
|
+
browser. Then add the code it prints to the file it names, and tell me which
|
|
57
|
+
file you changed.
|
|
74
58
|
```
|
|
75
59
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## What you get
|
|
60
|
+
Then connect your editor so it can read reports: `npx mushi-mushi setup --ide cursor` (or `claude`). Ask it: *"Get the latest Mushi Mushi report and fix it."* There is also a one-click button on the [connect page](https://kensaur.us/mushi-mushi/docs/connect).
|
|
81
61
|
|
|
82
|
-
|
|
83
|
-
- **A diagnosis for each report.** A fast filter drops spam first. Then a second AI pass names the likely cause, how serious it is, how sure it is, and the part of the app involved, in plain English.
|
|
84
|
-
- **One row per real bug.** Reports that mean the same thing are merged, even when users word them differently.
|
|
85
|
-
- **The fix in your editor.** Over MCP, Cursor or Claude Code reads the diagnosis and a fix prompt with the smallest set of files. Your editor's own model writes the fix, so this part needs no extra AI key.
|
|
86
|
-
- **Optional agent fixes.** An agent can open a draft pull request for you to review. On hosted Mushi Mushi the built-in fixer needs no key of your own; Cursor's agents need your Cursor key; or run fixes on your computer with the Mushi Mushi worker. With your own Anthropic key, a second AI reviews each one before it can merge.
|
|
62
|
+
## Set it up by hand
|
|
87
63
|
|
|
88
|
-
|
|
64
|
+
`npm install mushi-mushi`, then add the import for your framework. Your project ID and key are on the console's **Set up** page.
|
|
89
65
|
|
|
90
|
-
|
|
66
|
+
| Your app | Install | Import from |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| React, Next.js, Remix | `mushi-mushi` | `mushi-mushi/react` |
|
|
69
|
+
| Vue, Nuxt | `mushi-mushi` | `mushi-mushi/vue` |
|
|
70
|
+
| Svelte, SvelteKit | `mushi-mushi` | `mushi-mushi/svelte` |
|
|
71
|
+
| Angular 17+ | `mushi-mushi` | `mushi-mushi/angular` |
|
|
72
|
+
| Astro, Solid, plain JavaScript | `mushi-mushi` | `mushi-mushi` |
|
|
73
|
+
| Node (Express, Fastify, Hono) | `mushi-mushi` | `mushi-mushi/node` |
|
|
74
|
+
| React Native, Expo | `@mushi-mushi/react-native` | `@mushi-mushi/react-native` |
|
|
75
|
+
| Capacitor, Ionic | `@mushi-mushi/capacitor` | `@mushi-mushi/capacitor` |
|
|
91
76
|
|
|
92
|
-
-
|
|
93
|
-
- **You're a developer and you own your code.** You read the diffs and may run Sentry already. Reports and Sentry errors share one list, and agent pull requests get a second review before they merge.
|
|
94
|
-
- **You run a team.** Reports come from the app, Sentry, store reviews and Slack. They share one list, each with a diagnosis, and can go on to Linear, Jira or GitHub Issues.
|
|
77
|
+
Step-by-step for each one: [quickstarts](https://kensaur.us/mushi-mushi/docs/quickstart). `mushi-mushi` never installs a framework you don't use.
|
|
95
78
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
---
|
|
79
|
+
## Start a new app with it
|
|
99
80
|
|
|
100
|
-
|
|
81
|
+
To begin from nothing, make a small starter app with Mushi Mushi already in it:
|
|
101
82
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- A second AI reviews every agent fix before it merges (needs your own Anthropic key).
|
|
106
|
-
- A watch on your live site every hour, and an audit of every page once a week (need your own Firecrawl key).
|
|
107
|
-
- A daily check of your lockfiles for known security holes (needs your GitHub repo connected).
|
|
108
|
-
- Your GitHub Actions bill explained, and whether a red check was your code or the CI machine (needs your GitHub repo; reading the bill needs a token that can see billing).
|
|
109
|
-
- Playbooks such as "make it accessible" that run in rounds of fix pull requests (need your own Cursor key or the worker).
|
|
110
|
-
- Low-star App Store and Google Play reviews turned into bug reports.
|
|
111
|
-
- Bug reports from your phone through Telegram, Slack or an iPhone shortcut.
|
|
112
|
-
|
|
113
|
-
What each one solves and needs: [what else it does](https://kensaur.us/mushi-mushi/docs/what-it-does).
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Why not just Sentry?
|
|
118
|
-
|
|
119
|
-
> **Sentry is built around what the code threw, with a User Feedback widget and
|
|
120
|
-
> replay alongside. Mushi Mushi starts from what the user reported, ingests Sentry's
|
|
121
|
-
> errors too, explains each one in plain English, and hands your agent a fix
|
|
122
|
-
> prompt to start from. One queue, with or without Sentry.**
|
|
123
|
-
|
|
124
|
-
Mushi Mushi catches the bugs that never throw: a button that looks clickable but isn't, a 12-second page load, a layout broken on one phone. It works without Sentry. If you run Sentry, point its alert webhook at Mushi Mushi and the errors land in the same list; merging a Mushi Mushi fix resolves the Sentry issue. Details: [Sentry vs Mushi Mushi](https://kensaur.us/mushi-mushi/docs/compare/sentry-vs-mushi).
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Integrates with
|
|
129
|
-
|
|
130
|
-
Nothing needs to be ripped out. Bugs come in from the tools you already run, and fixes and status go back out to them.
|
|
131
|
-
|
|
132
|
-
**13 outbound plugins** send reports and status to: Slack, Discord, Microsoft Teams, Linear, Jira, GitHub Issues, PagerDuty, Sentry, Bugsnag, Rollbar, Crashlytics, Zapier and Cursor Cloud agents.
|
|
133
|
-
|
|
134
|
-
**11 inbound adapters** bring alerts from your monitoring into the same list as user reports: Sentry, Datadog, Bugsnag, Rollbar, Firebase Crashlytics, New Relic, Honeycomb, Grafana Loki, AWS CloudWatch, Opsgenie and Firebase Analytics. They ship in [`@mushi-mushi/adapters`](https://www.npmjs.com/package/@mushi-mushi/adapters) for any Node webhook server.
|
|
135
|
-
|
|
136
|
-
Editors connect over MCP: Cursor, Claude Code, VS Code, Windsurf, Cline, Claude Desktop, Zed and any other MCP client ([`@mushi-mushi/mcp`](https://www.npmjs.com/package/@mushi-mushi/mcp)).
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Framework support
|
|
141
|
-
|
|
142
|
-
| Framework | Install after wizard (automatic) |
|
|
143
|
-
| ------------------------------- | ------------------------------------------------- |
|
|
144
|
-
| React, Next.js, Create React App, Remix | `@mushi-mushi/react` |
|
|
145
|
-
| Vue 3 / Nuxt | `@mushi-mushi/vue` |
|
|
146
|
-
| Svelte / SvelteKit | `@mushi-mushi/svelte` |
|
|
147
|
-
| Angular 17+ | `@mushi-mushi/angular` |
|
|
148
|
-
| React Native / Expo | `@mushi-mushi/react-native` |
|
|
149
|
-
| Capacitor / Ionic | `@mushi-mushi/capacitor` |
|
|
150
|
-
| Astro, Solid, plain JavaScript | `@mushi-mushi/web` |
|
|
151
|
-
| Node (Express / Fastify / Hono) | `@mushi-mushi/node` (server-side errors) |
|
|
152
|
-
| Flutter / Dart | Git dependency, a preview, not on pub.dev yet ([how](https://github.com/kensaurus/mushi-mushi/tree/master/packages/flutter#install)) |
|
|
153
|
-
| iOS native (Swift) | SwiftPM from the repo, a preview, not tagged yet ([how](https://github.com/kensaurus/mushi-mushi/tree/master/packages/ios#install)) |
|
|
154
|
-
| Android native (Kotlin/Java) | Build from source, a preview, not on Maven Central yet ([how](https://github.com/kensaurus/mushi-mushi/tree/master/packages/android#install)) |
|
|
83
|
+
```bash
|
|
84
|
+
npx mushi-mushi --template vue my-app # or: svelte, node
|
|
85
|
+
```
|
|
155
86
|
|
|
156
|
-
|
|
87
|
+
## Catch what AI tools leave behind
|
|
157
88
|
|
|
158
|
-
|
|
89
|
+
`mushi-mushi/eslint` adds lint rules for two things AI tools often ship: buttons whose click does nothing, and placeholder data (John Doe, lorem ipsum) left in real pages.
|
|
159
90
|
|
|
160
|
-
|
|
91
|
+
```js
|
|
92
|
+
// eslint.config.js
|
|
93
|
+
import mushi from 'mushi-mushi/eslint'
|
|
161
94
|
|
|
162
|
-
|
|
163
|
-
User taps the report button ──▶ screenshot + page + clicks + console + network
|
|
164
|
-
│
|
|
165
|
-
▼
|
|
166
|
-
Fast filter ──▶ drops spam and empty reports
|
|
167
|
-
│
|
|
168
|
-
▼
|
|
169
|
-
Diagnosis ──▶ likely cause, how serious, which part of the app, in plain English
|
|
170
|
-
│
|
|
171
|
-
▼
|
|
172
|
-
Merge repeats ──▶ reports that mean the same thing become one row
|
|
173
|
-
│
|
|
174
|
-
▼
|
|
175
|
-
Your editor (MCP) ──▶ reads the diagnosis and the fix prompt
|
|
176
|
-
│
|
|
177
|
-
▼
|
|
178
|
-
Optional agent ──▶ opens a draft pull request; a second AI reviews it; you merge
|
|
95
|
+
export default [mushi.configs.recommended]
|
|
179
96
|
```
|
|
180
97
|
|
|
181
|
-
The
|
|
98
|
+
[The rules, with examples](https://kensaur.us/mushi-mushi/docs/sdks/eslint-plugin).
|
|
182
99
|
|
|
183
|
-
|
|
100
|
+
## Free to start
|
|
184
101
|
|
|
185
|
-
|
|
102
|
+
The free plan covers one app and 100 diagnoses a month, with no card and no AI key of your own. Repeat reports of one bug count once. [Pricing](https://kensaur.us/mushi-mushi/docs/pricing).
|
|
186
103
|
|
|
187
|
-
|
|
188
|
-
npx mushi-mushi # this package
|
|
189
|
-
npm create mushi-mushi # the same wizard
|
|
190
|
-
npx @mushi-mushi/cli init # the same wizard, from the full CLI
|
|
191
|
-
```
|
|
104
|
+
You don't need Sentry or any monitoring tool. If you have one, Mushi Mushi can read its errors too.
|
|
192
105
|
|
|
193
106
|
<details>
|
|
194
|
-
<summary><b>
|
|
107
|
+
<summary><b>For developers: flags, CI, self-hosting and the full CLI</b></summary>
|
|
195
108
|
|
|
196
109
|
```bash
|
|
197
|
-
npx mushi-mushi --framework next
|
|
198
|
-
npx mushi-mushi --
|
|
199
|
-
npx mushi-mushi --skip-install
|
|
200
|
-
npx mushi-mushi --
|
|
201
|
-
npx mushi-mushi --audit # health-check an existing install instead
|
|
202
|
-
npx mushi-mushi --cwd apps/web # run inside a monorepo sub-package
|
|
110
|
+
npx mushi-mushi --framework next # skip framework detection
|
|
111
|
+
npx mushi-mushi --cwd apps/web # run inside a monorepo package
|
|
112
|
+
npx mushi-mushi --skip-install # print the install command instead
|
|
113
|
+
npx mushi-mushi --audit # health-check an existing install
|
|
203
114
|
npx mushi-mushi --endpoint https://mushi.your-company.com # self-hosted
|
|
204
|
-
npx mushi-mushi -y
|
|
205
|
-
npx mushi-mushi -v # print version
|
|
115
|
+
npx mushi-mushi -y --project-id <uuid> --api-key mushi_xxx # CI, no prompts
|
|
206
116
|
npx mushi-mushi --help
|
|
207
117
|
```
|
|
208
118
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<details>
|
|
212
|
-
<summary><b>Troubleshooting</b></summary>
|
|
213
|
-
|
|
214
|
-
- **Wrong framework detected?** Pass `--framework <id>`. Valid values: `next, react, cra, remix, astro, solid, vue, nuxt, svelte, sveltekit, angular, expo, react-native, capacitor, express, fastify, hono, vanilla`.
|
|
215
|
-
- **Monorepo?** `cd` into the package first, or pass `--cwd apps/web`.
|
|
216
|
-
- **Stale `npx` cache?** `npm cache clean --force` or `npx mushi-mushi@latest`.
|
|
217
|
-
- **Non-interactive terminal (CI)?** Pass `--yes --project-id <project-uuid> --api-key mushi_xxx`. The wizard exits with a clear error instead of hanging.
|
|
218
|
-
- **Node version too old?** Requires Node 20.19 or newer. Upgrade at [nodejs.org](https://nodejs.org/).
|
|
219
|
-
- **Full stack traces on error?** `DEBUG=mushi npx mushi-mushi`.
|
|
220
|
-
|
|
221
|
-
</details>
|
|
222
|
-
|
|
223
|
-
<details>
|
|
224
|
-
<summary><b>Security notes</b></summary>
|
|
225
|
-
|
|
226
|
-
- Credentials passed via `--api-key` are visible to other users on the same machine via `ps -ef`. Use the interactive prompt on shared hosts.
|
|
227
|
-
- `~/.config/mushi/config.json` (the credentials cache) is written with mode `0o600` on Unix; legacy `~/.mushirc` auto-migrates on first load.
|
|
228
|
-
- The wizard strips CR/LF/NUL from pasted secrets to prevent `.env` injection.
|
|
229
|
-
- Prompts validate format: the project ID is a UUID (or `proj_` + 10 or more characters), and the API key starts with `mushi_` or `mush_pk_` followed by 10 or more characters.
|
|
230
|
-
- This release ships with [npm provenance](https://docs.npmjs.com/generating-provenance-statements). Verify it with `npm audit signatures`.
|
|
231
|
-
|
|
232
|
-
</details>
|
|
233
|
-
|
|
234
|
-
<details>
|
|
235
|
-
<summary><b>Supply-chain & verification (Socket, Bundlephobia, Snyk)</b></summary>
|
|
236
|
-
|
|
237
|
-
`mushi-mushi` is a CLI launcher. It spawns one `npm install` and appends a small multi-line `MUSHI_*` env block to `.env.local` (or `.env` when `.env.local` does not exist). Here's what each scanner shows and why:
|
|
119
|
+
Any other command goes to the full CLI, so `npx mushi-mushi reports list` works. It needs Node 20.19 or newer.
|
|
238
120
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
| **Snyk Advisor** | Health score (lower right after publish) | Snyk's crawler often lags by 1–2 weeks for new public packages — score corrects itself once it picks up the actual `package.json` (repository links, downloads, repo activity). |
|
|
121
|
+
- [Every flag, troubleshooting and security notes](https://kensaur.us/mushi-mushi/docs/sdks/launcher)
|
|
122
|
+
- [The full CLI](https://kensaur.us/mushi-mushi/docs/sdks/cli) (`npm i -g @mushi-mushi/cli` for a `mushi` command)
|
|
123
|
+
- [Integrations](https://kensaur.us/mushi-mushi/docs/plugins): Sentry, Slack, Linear, Jira, GitHub Issues and more
|
|
124
|
+
- [Self-hosting](https://kensaur.us/mushi-mushi/docs/self-hosting)
|
|
125
|
+
- More entry points: `mushi-mushi/headless`, `/i18n`, `/otel`, `/test-utils`, `/core` (types)
|
|
245
126
|
|
|
246
|
-
|
|
127
|
+
Already on `@mushi-mushi/react`, `@mushi-mushi/web` or another `@mushi-mushi/*` package? It keeps working and keeps getting updates. `mushi-mushi` ships the same code, so you can switch by changing the import path.
|
|
247
128
|
|
|
248
129
|
</details>
|
|
249
130
|
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
## Power-user CLI
|
|
253
|
-
|
|
254
|
-
`mushi-mushi` runs the setup wizard and forwards any other command to `@mushi-mushi/cli` (`npx mushi-mushi reports list` works). For daily use, install the full CLI to get a `mushi` command:
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
npm i -g @mushi-mushi/cli
|
|
258
|
-
mushi reports list
|
|
259
|
-
mushi reports show <id>
|
|
260
|
-
mushi reports triage <id> --status triaged --severity high
|
|
261
|
-
mushi deploy check # post-deploy smoke check
|
|
262
|
-
mushi doctor # what is wired up, and the next step when it isn't
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
All commands: [`@mushi-mushi/cli`](https://www.npmjs.com/package/@mushi-mushi/cli).
|
|
266
|
-
|
|
267
|
-
**Pre-release checks in CI (early).** A GitHub Action runs Mushi Mushi's checks on a pull request, such as API calls that match no endpoint or a status the app claims but never sets. These checks sit behind the `inventory_v2` plan flag. The dead-handler and mock-leak checks also need an ESLint JSON report (`eslint-report`); see the [action's README](https://github.com/kensaurus/mushi-mushi/tree/master/packages/mcp-ci).
|
|
268
|
-
|
|
269
|
-
```yaml
|
|
270
|
-
# .github/workflows/mushi-gates.yml
|
|
271
|
-
- uses: kensaurus/mushi-mushi/packages/mcp-ci@master
|
|
272
|
-
with:
|
|
273
|
-
api-key: ${{ secrets.MUSHI_API_KEY }}
|
|
274
|
-
project-id: ${{ secrets.MUSHI_PROJECT_ID }}
|
|
275
|
-
command: gates # also: propose · discover-api · discovery-status · auth-bootstrap
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Prefer to work from your editor instead of a terminal? `npx mushi-mushi setup --ide cursor` (or `claude`, `continue`, `zed`) connects [`@mushi-mushi/mcp`](https://www.npmjs.com/package/@mushi-mushi/mcp), and the same reads and actions become tools your editor can call. Its README covers a manual config for any other MCP client.
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
131
|
## Links
|
|
283
132
|
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
-
|
|
133
|
+
- [Docs](https://kensaur.us/mushi-mushi/docs/): quickstarts and guides
|
|
134
|
+
- [Sample diagnosis](https://kensaur.us/mushi-mushi/docs/demo/diagnosis): one bug from report to fix, no signup
|
|
135
|
+
- [Live numbers](https://kensaur.us/mushi-mushi/docs/proof): what Mushi Mushi found and fixed on the maker's own apps
|
|
136
|
+
- [GitHub](https://github.com/kensaurus/mushi-mushi): source code
|
|
137
|
+
- [Report a bug](https://github.com/kensaurus/mushi-mushi/issues) in Mushi Mushi itself
|
|
289
138
|
|
|
290
139
|
## License
|
|
291
140
|
|
|
292
|
-
MIT © [Kenji Sakuramoto](https://github.com/kensaurus).
|
|
141
|
+
MIT © [Kenji Sakuramoto](https://github.com/kensaurus). The server packages are [AGPLv3](https://github.com/kensaurus/mushi-mushi/blob/master/packages/server/LICENSE).
|
|
293
142
|
|
|
294
143
|
## More apps from the same maker
|
|
295
144
|
|
|
@@ -306,9 +155,3 @@ MIT © [Kenji Sakuramoto](https://github.com/kensaurus). Backend packages (`@mus
|
|
|
306
155
|
| <img src="https://kensaur.us/favicon.svg" width="28" height="28" alt=""> | [kensaur.us](https://kensaur.us/?view=portfolio&utm_source=github&utm_medium=readme) | All apps from the same maker |
|
|
307
156
|
|
|
308
157
|
All apps live under [kensaur.us](https://kensaur.us).
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
<!-- mushi-readme-stats-footer -->
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
<sub>Monorepo scale (October 2026): 77 edge functions · 567 SQL migrations · 13 outbound plugins · 11 inbound adapters · 19 pipeline agents. 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/angular.cjs
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/angular.ts
|
|
21
|
+
var angular_exports = {};
|
|
22
|
+
__export(angular_exports, {
|
|
23
|
+
MUSHI_CONFIG: () => MUSHI_CONFIG,
|
|
24
|
+
MushiErrorHandler: () => MushiErrorHandler,
|
|
25
|
+
MushiService: () => MushiService,
|
|
26
|
+
provideMushi: () => provideMushi,
|
|
27
|
+
provideMushiAngular: () => provideMushiAngular
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(angular_exports);
|
|
30
|
+
|
|
31
|
+
// ../angular/dist/index.js
|
|
32
|
+
var import_core = require("@angular/core");
|
|
33
|
+
var import_web = require("@mushi-mushi/web");
|
|
34
|
+
var MUSHI_CONFIG = new import_core.InjectionToken("MushiConfig");
|
|
35
|
+
var isBrowser = () => typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined" && typeof globalThis.document !== "undefined";
|
|
36
|
+
var MushiService = class {
|
|
37
|
+
constructor(config) {
|
|
38
|
+
if (config && isBrowser()) {
|
|
39
|
+
import_web.Mushi.init(config);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
report(data) {
|
|
43
|
+
return import_web.Mushi.getInstance()?.captureEvent({
|
|
44
|
+
description: data.description,
|
|
45
|
+
category: data.category,
|
|
46
|
+
metadata: data.metadata
|
|
47
|
+
}) ?? Promise.resolve(null);
|
|
48
|
+
}
|
|
49
|
+
/** @deprecated Use report() — kept for backwards compatibility */
|
|
50
|
+
async submitReport(data) {
|
|
51
|
+
await this.report(data);
|
|
52
|
+
}
|
|
53
|
+
/** Attach the signed-in user to reports and analytics (same as `Mushi.identify()`). */
|
|
54
|
+
identify(userId, traits) {
|
|
55
|
+
import_web.Mushi.getInstance()?.identify(userId, traits);
|
|
56
|
+
}
|
|
57
|
+
captureError(error, context) {
|
|
58
|
+
import_web.Mushi.getInstance()?.captureException(error, { metadata: context }).catch(() => {
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var MushiErrorHandler = class extends import_core.ErrorHandler {
|
|
63
|
+
service;
|
|
64
|
+
constructor(service) {
|
|
65
|
+
super();
|
|
66
|
+
this.service = service;
|
|
67
|
+
}
|
|
68
|
+
handleError(error) {
|
|
69
|
+
this.service.captureError(error);
|
|
70
|
+
super.handleError(error);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
function mushiProviders(config, serviceFactory) {
|
|
74
|
+
return [
|
|
75
|
+
{ provide: MUSHI_CONFIG, useValue: config },
|
|
76
|
+
{ provide: MushiService, useFactory: serviceFactory, deps: [MUSHI_CONFIG] },
|
|
77
|
+
{ provide: MushiErrorHandler, useFactory: (service) => new MushiErrorHandler(service), deps: [MushiService] },
|
|
78
|
+
{ provide: import_core.ErrorHandler, useExisting: MushiErrorHandler },
|
|
79
|
+
// Angular resolves ErrorHandler lazily, on the first error, so nothing
|
|
80
|
+
// would construct MushiService (and call Mushi.init) at startup. The
|
|
81
|
+
// environment initializer does. It is the v14+ token rather than
|
|
82
|
+
// provideEnvironmentInitializer() (v19+) so the >=17 peer range holds.
|
|
83
|
+
{
|
|
84
|
+
provide: import_core.ENVIRONMENT_INITIALIZER,
|
|
85
|
+
multi: true,
|
|
86
|
+
useValue: () => {
|
|
87
|
+
(0, import_core.inject)(MushiService);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
function provideMushi(config) {
|
|
93
|
+
let shared = null;
|
|
94
|
+
const serviceFor = (cfg) => shared ??= new MushiService(cfg);
|
|
95
|
+
let legacyHandler = null;
|
|
96
|
+
const providers = (0, import_core.makeEnvironmentProviders)(mushiProviders(config, serviceFor));
|
|
97
|
+
Object.defineProperties(providers, {
|
|
98
|
+
service: { get: () => serviceFor(config) },
|
|
99
|
+
errorHandler: { get: () => legacyHandler ??= new MushiErrorHandler(serviceFor(config)) }
|
|
100
|
+
});
|
|
101
|
+
return providers;
|
|
102
|
+
}
|
|
103
|
+
function provideMushiAngular(config) {
|
|
104
|
+
return mushiProviders(config, (cfg) => new MushiService(cfg));
|
|
105
|
+
}
|
|
106
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
107
|
+
0 && (module.exports = {
|
|
108
|
+
MUSHI_CONFIG,
|
|
109
|
+
MushiErrorHandler,
|
|
110
|
+
MushiService,
|
|
111
|
+
provideMushi,
|
|
112
|
+
provideMushiAngular
|
|
113
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { InjectionToken, EnvironmentProviders, ErrorHandler, Provider } from '@angular/core';
|
|
2
|
+
import { MushiConfig, MushiReportCategory } from '@mushi-mushi/core';
|
|
3
|
+
export { MushiConfig, MushiReportCategory, MushiSDKInstance } from '@mushi-mushi/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* FILE: packages/angular/src/index.ts
|
|
7
|
+
* PURPOSE: Angular SDK for Mushi Mushi — delegates entirely to @mushi-mushi/web
|
|
8
|
+
* so offline queue, PII scrubber, breadcrumb buffer, rate limiter,
|
|
9
|
+
* INP capture, beforeSendFeedback, and onCrashedLastRun are all
|
|
10
|
+
* inherited automatically. Mirrors the React provider pattern.
|
|
11
|
+
*
|
|
12
|
+
* Round 8 (2026-05-21):
|
|
13
|
+
* - `MushiConfig` is now the canonical core type (no narrow re-shape).
|
|
14
|
+
* - SSR guard around `Mushi.init` so Angular Universal / @nguniversal
|
|
15
|
+
* prerender doesn't reach for `window` on the server.
|
|
16
|
+
*
|
|
17
|
+
* No decorators, on purpose. This package is built with tsup, not ng-packagr,
|
|
18
|
+
* so an `@Injectable()` class ships as a runtime decorator call whose factory
|
|
19
|
+
* Angular must compile with `@angular/compiler` — which AOT apps (every
|
|
20
|
+
* `ng build`) never load, so DI threw "needs to be compiled using the JIT
|
|
21
|
+
* compiler". Every provider below is an explicit factory with explicit
|
|
22
|
+
* `deps`, which Angular resolves without compiling anything.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
declare const MUSHI_CONFIG: InjectionToken<MushiConfig>;
|
|
26
|
+
/**
|
|
27
|
+
* App-wide Mushi handle. Provided by `provideMushi()` / `provideMushiAngular()`
|
|
28
|
+
* and read with `inject(MushiService)`. Do not list the class itself in a
|
|
29
|
+
* `providers` array: it has no compiled factory, so use the provider functions.
|
|
30
|
+
*/
|
|
31
|
+
declare class MushiService {
|
|
32
|
+
constructor(config?: MushiConfig);
|
|
33
|
+
report(data: {
|
|
34
|
+
description: string;
|
|
35
|
+
category: MushiReportCategory;
|
|
36
|
+
metadata?: Record<string, unknown>;
|
|
37
|
+
}): Promise<string | null>;
|
|
38
|
+
/** @deprecated Use report() — kept for backwards compatibility */
|
|
39
|
+
submitReport(data: {
|
|
40
|
+
description: string;
|
|
41
|
+
category: MushiReportCategory;
|
|
42
|
+
metadata?: Record<string, unknown>;
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
/** Attach the signed-in user to reports and analytics (same as `Mushi.identify()`). */
|
|
45
|
+
identify(userId: string, traits?: {
|
|
46
|
+
email?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
[k: string]: unknown;
|
|
49
|
+
}): void;
|
|
50
|
+
captureError(error: unknown, context?: Record<string, unknown>): void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Angular `ErrorHandler` that reports uncaught errors to Mushi, then logs them
|
|
54
|
+
* exactly like Angular's default handler so the console output does not change.
|
|
55
|
+
*/
|
|
56
|
+
declare class MushiErrorHandler extends ErrorHandler {
|
|
57
|
+
private service;
|
|
58
|
+
constructor(service: MushiService);
|
|
59
|
+
handleError(error: unknown): void;
|
|
60
|
+
}
|
|
61
|
+
/** `provideMushi()`'s return value: environment providers, plus the original `{ service, errorHandler }` accessors. */
|
|
62
|
+
type MushiEnvironmentProviders = EnvironmentProviders & {
|
|
63
|
+
/** @deprecated Inject `MushiService` instead. Same instance DI hands out. */
|
|
64
|
+
readonly service: MushiService;
|
|
65
|
+
/** @deprecated Provided as Angular's `ErrorHandler` automatically. */
|
|
66
|
+
readonly errorHandler: MushiErrorHandler;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* App-level setup for `bootstrapApplication` (or `NgModule.providers`):
|
|
70
|
+
*
|
|
71
|
+
* ```ts
|
|
72
|
+
* bootstrapApplication(AppComponent, {
|
|
73
|
+
* providers: [provideMushi({ projectId: '…', apiKey: '…' })],
|
|
74
|
+
* })
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* Provides `MushiService`, installs `MushiErrorHandler` as Angular's
|
|
78
|
+
* `ErrorHandler`, and initialises the SDK at startup (browser only).
|
|
79
|
+
*/
|
|
80
|
+
declare function provideMushi(config: MushiConfig): MushiEnvironmentProviders;
|
|
81
|
+
/**
|
|
82
|
+
* The same providers as a plain `Provider[]`, for spreading:
|
|
83
|
+
*
|
|
84
|
+
* ```ts
|
|
85
|
+
* bootstrapApplication(AppComponent, {
|
|
86
|
+
* providers: [...provideMushiAngular({ projectId: '…', apiKey: '…' })],
|
|
87
|
+
* })
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* `MushiService` reads `MUSHI_CONFIG` through DI, so SSR-aware platforms
|
|
91
|
+
* (Angular Universal) can override it per request.
|
|
92
|
+
*/
|
|
93
|
+
declare function provideMushiAngular(config: MushiConfig): Provider[];
|
|
94
|
+
|
|
95
|
+
export { MUSHI_CONFIG, type MushiEnvironmentProviders, MushiErrorHandler, MushiService, provideMushi, provideMushiAngular };
|