@mushi-mushi/svelte 0.9.0 → 1.0.1
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/CONTRIBUTING.md +50 -20
- package/README.md +41 -6
- package/package.json +4 -4
package/CONTRIBUTING.md
CHANGED
|
@@ -58,12 +58,12 @@ packages/
|
|
|
58
58
|
react-native/ React Native SDK (MIT)
|
|
59
59
|
cli/ CLI tool (MIT)
|
|
60
60
|
mcp/ MCP server for coding agents (MIT)
|
|
61
|
-
server/ Supabase Edge Functions (
|
|
62
|
-
agents/ Agentic fix pipeline (
|
|
63
|
-
verify/ Fix verification (
|
|
61
|
+
server/ Supabase Edge Functions (AGPLv3)
|
|
62
|
+
agents/ Agentic fix pipeline (AGPLv3)
|
|
63
|
+
verify/ Fix verification (AGPLv3)
|
|
64
64
|
apps/
|
|
65
65
|
admin/ Admin dashboard (React + Tailwind)
|
|
66
|
-
docs/ Documentation site (
|
|
66
|
+
docs/ Documentation site (Nextra — apps/docs)
|
|
67
67
|
tooling/
|
|
68
68
|
eslint-config/ Shared ESLint flat config
|
|
69
69
|
tsconfig/ Shared TypeScript configs
|
|
@@ -81,6 +81,30 @@ tooling/
|
|
|
81
81
|
```
|
|
82
82
|
6. Open a pull request
|
|
83
83
|
|
|
84
|
+
### Documentation (docs-as-code)
|
|
85
|
+
|
|
86
|
+
If your PR changes **user-visible SDK or CLI behavior**, update docs in the **same PR**:
|
|
87
|
+
|
|
88
|
+
| Surface | When to update |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `packages/*/README.md` | npm-facing install/API/config changes for that package |
|
|
91
|
+
| `apps/docs/content/**/*.mdx` | Long-form guides, quickstarts, admin console docs |
|
|
92
|
+
| Root `README.md` | Marketing stats only when counts change — run `pnpm check:docs-stats` |
|
|
93
|
+
|
|
94
|
+
Guardrails (run locally before pushing):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pnpm check:docs-stats # root README stat badges
|
|
98
|
+
pnpm check:sdk-version-matrix # apps/docs/content/sdks/index.mdx versions
|
|
99
|
+
pnpm check:internal-doc-links # dead /foo links in MDX
|
|
100
|
+
pnpm check:onboarding-drift # phantom MCP env vars / stale tool names
|
|
101
|
+
pnpm check:bundle-docs # @mushi-mushi/web size-limit vs README
|
|
102
|
+
pnpm gen:llms-txt # regenerate apps/docs/public/llms.txt after nav changes
|
|
103
|
+
pnpm gen:mcp-tools-doc # regenerate sdks/mcp-tools.generated.mdx from catalog.ts
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
README changes on npm packages only appear on [npmjs.com](https://www.npmjs.com) after the next **Changesets publish**.
|
|
107
|
+
|
|
84
108
|
## Changesets
|
|
85
109
|
|
|
86
110
|
We use [Changesets](https://github.com/changesets/changesets) for versioning. If your PR modifies a published package (`core`, `web`, `react`, `vue`, `svelte`, `angular`, `react-native`, `cli`, `mcp`), add a changeset:
|
|
@@ -93,24 +117,30 @@ Select the affected packages, the semver bump type, and write a summary. The cha
|
|
|
93
117
|
|
|
94
118
|
## Release flow
|
|
95
119
|
|
|
96
|
-
Releases are fully automated. Maintainers don't run
|
|
120
|
+
Releases are fully automated once the version PR is merged. Maintainers don't run
|
|
121
|
+
`npm publish` by hand for routine bumps. See **[`docs/DEPLOYMENT.md`](docs/DEPLOYMENT.md)**
|
|
122
|
+
for the full production runbook (edge functions, admin SPA, docs site, migrations).
|
|
97
123
|
|
|
98
124
|
1. PRs land on `master` with one or more changeset files in `.changeset/`.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
125
|
+
Orphaned changesets (only ignored packages) fail `pnpm check:changeset-orphans`.
|
|
126
|
+
2. `release.yml` runs on every push to `master`. It opens (or updates) a
|
|
127
|
+
**`chore: version packages`** PR on `changeset-release/master` that bumps
|
|
128
|
+
affected `package.json` files, rolls up changelogs, and deletes consumed
|
|
129
|
+
changesets.
|
|
130
|
+
3. **Wait for CI on the version PR.** If checks don't appear (bot-branch
|
|
131
|
+
suppression), push an empty commit to `changeset-release/master`. If
|
|
132
|
+
`check:sdk-version-matrix` fails, run `pnpm gen:sdk-version-matrix` on that
|
|
133
|
+
branch and commit `apps/docs/content/sdks/index.mdx`.
|
|
134
|
+
4. Merge the version PR. The publish step uses **OIDC Trusted Publishers** +
|
|
135
|
+
Sigstore provenance (with `NPM_TOKEN` only for brand-new package bootstrap).
|
|
136
|
+
5. **Manually dispatch Release** unless a run starts within ~2 minutes:
|
|
137
|
+
**Actions → Release → Run workflow → `master`**. Squash-merges attributed to
|
|
138
|
+
`github-actions[bot]` usually suppress the auto `push` trigger — manual
|
|
139
|
+
dispatch is the normal path, not a fallback of last resort.
|
|
105
140
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
| --- | --- | --- |
|
|
110
|
-
| The `Build & Test` required check never registers on the `chore: version packages` PR — the PR stays "Required check missing" forever | `changeset-release/master` is pushed by `github-actions[bot]`. GitHub silently drops the downstream `pull_request` event to prevent bot loops (observed on PR #45, #102, #124). | `ci.yml` now also triggers on `push` to `changeset-release/master`, so `Build & Test` reports against the head commit directly. No empty-commit nudge needed. |
|
|
111
|
-
| Release workflow fails with `No commits between master and changeset-release/master` after merging a PR with a new changeset. | A `.changeset/*.md` file whose YAML frontmatter only targets packages listed in `.changeset/config.json#ignore` (e.g. `@mushi-mushi/server`, `@mushi-mushi/admin`). `changeset version` produces no bumps, the version PR is empty, the next push errors (PR #102 / #121, 2026-05-19). | `pnpm check:changeset-orphans` runs in both `ci.yml` and `release.yml`. PR CI fails with an actionable message naming the orphan file *before* it can reach master. If you legitimately need to record an internal-only change, omit the changeset entirely — the diff lives in git history. |
|
|
112
|
-
| Release workflow's `Audit signatures of installed dependencies` step fails with `npm ETARGET / No matching version found for @mushi-mushi/<pkg>@<ver>` seconds after the publish step succeeded. | npm's registry CDN can take up to ~30s to propagate a freshly-published manifest. The audit step shells out to `npm install` against the just-published version and races the CDN (observed 2026-05-20, run 26149167393). | The audit step retries with exponential backoff (1, 2, 4, 8, 16, 32s — 63s total) before failing. Sigstore signatures are written at publish time, so a one-off audit failure never indicates a corrupted package — `pnpm view <pkg> version` is the ground truth. |
|
|
113
|
-
| Push to `master` after merging a PR doesn't fire the `Release` workflow. | Same anti-loop protection: when a squash merge is attributed to `github-actions[bot]`, GitHub may suppress the downstream `push` trigger. Sporadic — observed twice in the last 60 days. | `release.yml` keeps `workflow_dispatch` as the manual fallback. Recovery: **Actions → Release → Run workflow → master**. The `Build & Verify` job re-runs identically to the auto-fired path. |
|
|
141
|
+
```bash
|
|
142
|
+
gh workflow run release.yml --ref master
|
|
143
|
+
```
|
|
114
144
|
|
|
115
145
|
### Adding a brand-new publishable package
|
|
116
146
|
|
|
@@ -157,7 +187,7 @@ chore: bump dependencies
|
|
|
157
187
|
## License
|
|
158
188
|
|
|
159
189
|
- SDK packages are MIT — your contributions will be MIT-licensed
|
|
160
|
-
- Server/agents/verify are
|
|
190
|
+
- Server/agents/verify are AGPLv3 — contributions to those packages fall under AGPLv3
|
|
161
191
|
|
|
162
192
|
## Questions?
|
|
163
193
|
|
package/README.md
CHANGED
|
@@ -1,31 +1,58 @@
|
|
|
1
1
|
# @mushi-mushi/svelte
|
|
2
2
|
|
|
3
|
+
> **Your AI wrote it. Mushi tells you why it broke.**
|
|
4
|
+
> Plain-English diagnosis + a paste-ready fix, right inside Cursor. MIT-licensed SDKs · self-hostable · no second LLM key.
|
|
5
|
+
|
|
3
6
|
Svelte SDK for Mushi Mushi bug reporting. **API-only** — captures errors and submits reports but does not include the widget UI. Add `@mushi-mushi/web` alongside this package for the full Shadow DOM widget experience.
|
|
4
7
|
|
|
5
8
|
> **One-command setup:** `npx mushi-mushi` auto-detects Svelte / SvelteKit and installs this package + `@mushi-mushi/web`.
|
|
6
9
|
>
|
|
7
10
|
> **Other frameworks:** [`@mushi-mushi/react`](https://npmjs.com/package/@mushi-mushi/react) · [`@mushi-mushi/vue`](https://npmjs.com/package/@mushi-mushi/vue) · [`@mushi-mushi/angular`](https://npmjs.com/package/@mushi-mushi/angular) · [`@mushi-mushi/react-native`](https://npmjs.com/package/@mushi-mushi/react-native) · [`@mushi-mushi/capacitor`](https://npmjs.com/package/@mushi-mushi/capacitor) · [`@mushi-mushi/web`](https://npmjs.com/package/@mushi-mushi/web) (vanilla JS)
|
|
8
11
|
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @mushi-mushi/svelte @mushi-mushi/web
|
|
16
|
+
# or: npx mushi-mushi
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Environment variables
|
|
20
|
+
|
|
21
|
+
| Stack | Project ID | API key |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| Vite / SvelteKit | `VITE_MUSHI_PROJECT_ID` | `VITE_MUSHI_API_KEY` |
|
|
24
|
+
|
|
25
|
+
See [Project ID & API keys](https://docs.mushimushi.dev/concepts/credentials).
|
|
26
|
+
|
|
9
27
|
## Usage
|
|
10
28
|
|
|
11
29
|
```ts
|
|
12
30
|
import { initMushi, getMushi } from '@mushi-mushi/svelte'
|
|
13
31
|
|
|
14
|
-
initMushi({
|
|
32
|
+
initMushi({
|
|
33
|
+
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
34
|
+
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
35
|
+
})
|
|
15
36
|
|
|
16
|
-
// Later
|
|
17
37
|
const mushi = getMushi()
|
|
18
38
|
mushi.submitReport({ title: 'broken', description: '...' })
|
|
19
39
|
```
|
|
20
40
|
|
|
21
|
-
### With
|
|
41
|
+
### With widget UI
|
|
22
42
|
|
|
23
43
|
```ts
|
|
24
44
|
import { initMushi } from '@mushi-mushi/svelte'
|
|
25
45
|
import { Mushi } from '@mushi-mushi/web'
|
|
26
46
|
|
|
27
|
-
initMushi({
|
|
28
|
-
|
|
47
|
+
initMushi({
|
|
48
|
+
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
49
|
+
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
Mushi.init({
|
|
53
|
+
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
54
|
+
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
55
|
+
})
|
|
29
56
|
```
|
|
30
57
|
|
|
31
58
|
### SvelteKit error handler
|
|
@@ -36,7 +63,15 @@ import { createMushiErrorHandler } from '@mushi-mushi/svelte'
|
|
|
36
63
|
export const handleError = createMushiErrorHandler()
|
|
37
64
|
```
|
|
38
65
|
|
|
39
|
-
##
|
|
66
|
+
## API
|
|
67
|
+
|
|
68
|
+
| Export | Purpose |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `initMushi(config)` | Initialize once at app startup |
|
|
71
|
+
| `getMushi()` | Access the SDK instance |
|
|
72
|
+
| `createMushiErrorHandler()` | SvelteKit `handleError` integration |
|
|
73
|
+
|
|
74
|
+
## Peer dependencies
|
|
40
75
|
|
|
41
76
|
- `svelte` >= 4
|
|
42
77
|
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mushi-mushi/svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Svelte SDK for Mushi Mushi — context-based init, SvelteKit error hook integration",
|
|
6
|
-
"main": "./dist/index.
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"svelte": ">=4"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@mushi-mushi/core": "^1.
|
|
14
|
-
"@mushi-mushi/web": "^1.
|
|
13
|
+
"@mushi-mushi/core": "^1.16.0",
|
|
14
|
+
"@mushi-mushi/web": "^1.16.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"eslint": "^10.3.0",
|