@mushi-mushi/cli 0.20.0 → 0.21.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/CONTRIBUTING.md +14 -2
- package/SECURITY.md +1 -1
- package/dist/{chunk-7Q44KWGN.js → chunk-JAUKBLPK.js} +15 -9
- package/dist/chunk-L7KBJ2XY.js +6 -0
- package/dist/{chunk-D5IDNBJO.js → chunk-R2HPR2FV.js} +15 -9
- package/dist/{connect-IC7I76Z2.js → connect-2RM43XHO.js} +1 -1
- package/dist/{connect-W2Q6N7K3.js → connect-JIEIWTF3.js} +1 -1
- package/dist/detect.d.ts +1 -1
- package/dist/detect.js +1 -1
- package/dist/index.js +498 -87
- package/dist/init.js +105 -28
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-6LM2KW4S.js +0 -6
package/CONTRIBUTING.md
CHANGED
|
@@ -70,7 +70,7 @@ packages/
|
|
|
70
70
|
react-native/ React Native SDK (MIT)
|
|
71
71
|
cli/ CLI tool (MIT)
|
|
72
72
|
mcp/ MCP server for coding agents (MIT)
|
|
73
|
-
server/ Supabase Edge Functions (AGPLv3)
|
|
73
|
+
server/ Supabase Edge Functions (AGPLv3; ee/ is commercial)
|
|
74
74
|
agents/ Agentic fix pipeline (AGPLv3)
|
|
75
75
|
verify/ Fix verification (AGPLv3)
|
|
76
76
|
apps/
|
|
@@ -81,6 +81,18 @@ tooling/
|
|
|
81
81
|
tsconfig/ Shared TypeScript configs
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
## What we don't accept
|
|
85
|
+
|
|
86
|
+
Knowing this upfront saves everyone time.
|
|
87
|
+
|
|
88
|
+
- **Automated / bulk / AI-slop PRs** — any PR that was opened by a script, an LLM agent acting without meaningful human review, or as part of a parallel bounty-farming sweep is closed on sight. The commit history, branch name, or helper scripts included in the PR make this obvious.
|
|
89
|
+
- **PRs that target the wrong base** — all PRs must branch from and target `master`. PRs targeting `main` or any other branch are closed (and will show an inflated diff that is not your work).
|
|
90
|
+
- **One PR per issue, one issue per PR** — splitting or duplicating work just to collect acknowledgements isn't welcome.
|
|
91
|
+
- **Good-first-issues without claiming first** — comment on the issue to claim it before starting. If two people open PRs for the same issue, the one that commented first is prioritised.
|
|
92
|
+
- **Documentation-only PRs that merely duplicate existing content** — if the information already exists (e.g. in another file in this repo), adding a redundant copy adds noise without value.
|
|
93
|
+
|
|
94
|
+
If a PR violates these policies it will be closed with a brief explanation. No hard feelings — a genuine contribution on the same issue is always welcome.
|
|
95
|
+
|
|
84
96
|
## Making Changes
|
|
85
97
|
|
|
86
98
|
1. Create a feature branch from `master`
|
|
@@ -199,7 +211,7 @@ chore: bump dependencies
|
|
|
199
211
|
## License
|
|
200
212
|
|
|
201
213
|
- SDK packages are MIT — your contributions will be MIT-licensed
|
|
202
|
-
- Server/agents/verify are AGPLv3 — contributions to those packages fall under AGPLv3
|
|
214
|
+
- Server/agents/verify are AGPLv3 — contributions to those packages fall under AGPLv3. A [commercial license](./COMMERCIAL-LICENSE.md) is available for hosted-SaaS use cases that cannot publish modifications. The `packages/server/ee/` directory is source-available but commercial (production use needs a license); contributions there are accepted under the same EE terms.
|
|
203
215
|
|
|
204
216
|
## Questions?
|
|
205
217
|
|
package/SECURITY.md
CHANGED
|
@@ -113,7 +113,7 @@ What we treat as in-scope attacker capabilities, and what we don't.
|
|
|
113
113
|
| Compromised Supabase service-role key | ❌ | Treated as a tier-0 incident; would require key rotation and audit-log forensics. Not defendable in software. |
|
|
114
114
|
| Compromise of `kensaurus@gmail.com` | ❌ | Treated as a project-fork event; downstream consumers should pin to the last known-good version and follow the new release channel. |
|
|
115
115
|
| Physical / OS-level attacker on an end-user device | ❌ | Out of scope. |
|
|
116
|
-
| Malicious fork using the Mushi name to ship malware | ❌ (technical) ✅ (legal) | The MIT/
|
|
116
|
+
| Malicious fork using the Mushi name to ship malware | ❌ (technical) ✅ (legal) | The MIT / AGPLv3 grant lets the fork exist; the trademark policy (`TRADEMARK.md`) makes shipping it under the Mushi name an infringement we will pursue. |
|
|
117
117
|
|
|
118
118
|
## Data handling and PII
|
|
119
119
|
|
|
@@ -321,30 +321,36 @@ function installCommand(pm, packages) {
|
|
|
321
321
|
return `${pm} ${verb} ${packages.join(" ")}`;
|
|
322
322
|
}
|
|
323
323
|
var SERVER_FRAMEWORK_IDS = /* @__PURE__ */ new Set(["express", "fastify", "hono"]);
|
|
324
|
-
function envVarsToWrite(apiKey, projectId, framework) {
|
|
324
|
+
function envVarsToWrite(apiKey, projectId, framework, endpoint) {
|
|
325
|
+
const CLOUD_ENDPOINT = "https://dxptnwrhwsqckaftyymj.supabase.co/functions/v1/api";
|
|
326
|
+
const endpointLine = endpoint && endpoint !== CLOUD_ENDPOINT ? `MUSHI_API_ENDPOINT=${endpoint}` : null;
|
|
325
327
|
if (SERVER_FRAMEWORK_IDS.has(framework.id)) {
|
|
326
328
|
return [
|
|
327
329
|
`MUSHI_PROJECT_ID=${projectId}`,
|
|
328
|
-
`MUSHI_API_KEY=${apiKey}
|
|
329
|
-
|
|
330
|
+
`MUSHI_API_KEY=${apiKey}`,
|
|
331
|
+
endpointLine
|
|
332
|
+
].filter(Boolean).join("\n");
|
|
330
333
|
}
|
|
331
334
|
if (framework.id === "react-native") {
|
|
332
335
|
return [
|
|
333
336
|
`MUSHI_PROJECT_ID=${projectId}`,
|
|
334
|
-
`MUSHI_API_KEY=${apiKey}
|
|
335
|
-
|
|
337
|
+
`MUSHI_API_KEY=${apiKey}`,
|
|
338
|
+
endpointLine
|
|
339
|
+
].filter(Boolean).join("\n");
|
|
336
340
|
}
|
|
337
341
|
if (framework.id === "expo") {
|
|
338
342
|
return [
|
|
339
343
|
`EXPO_PUBLIC_MUSHI_PROJECT_ID=${projectId}`,
|
|
340
|
-
`EXPO_PUBLIC_MUSHI_API_KEY=${apiKey}
|
|
341
|
-
|
|
344
|
+
`EXPO_PUBLIC_MUSHI_API_KEY=${apiKey}`,
|
|
345
|
+
endpointLine ? `EXPO_PUBLIC_${endpointLine}` : null
|
|
346
|
+
].filter(Boolean).join("\n");
|
|
342
347
|
}
|
|
343
348
|
const prefix = framework.id === "next" ? "NEXT_PUBLIC_" : framework.id === "nuxt" ? "NUXT_PUBLIC_" : "VITE_";
|
|
344
349
|
return [
|
|
345
350
|
`${prefix}MUSHI_PROJECT_ID=${projectId}`,
|
|
346
|
-
`${prefix}MUSHI_API_KEY=${apiKey}
|
|
347
|
-
|
|
351
|
+
`${prefix}MUSHI_API_KEY=${apiKey}`,
|
|
352
|
+
endpointLine ? `${prefix}${endpointLine}` : null
|
|
353
|
+
].filter(Boolean).join("\n");
|
|
348
354
|
}
|
|
349
355
|
function collectDeps(pkg) {
|
|
350
356
|
if (!pkg) return /* @__PURE__ */ new Set();
|
|
@@ -405,30 +405,36 @@ function installCommand(pm, packages) {
|
|
|
405
405
|
return `${pm} ${verb} ${packages.join(" ")}`;
|
|
406
406
|
}
|
|
407
407
|
var SERVER_FRAMEWORK_IDS = /* @__PURE__ */ new Set(["express", "fastify", "hono"]);
|
|
408
|
-
function envVarsToWrite(apiKey, projectId, framework) {
|
|
408
|
+
function envVarsToWrite(apiKey, projectId, framework, endpoint) {
|
|
409
|
+
const CLOUD_ENDPOINT = "https://dxptnwrhwsqckaftyymj.supabase.co/functions/v1/api";
|
|
410
|
+
const endpointLine = endpoint && endpoint !== CLOUD_ENDPOINT ? `MUSHI_API_ENDPOINT=${endpoint}` : null;
|
|
409
411
|
if (SERVER_FRAMEWORK_IDS.has(framework.id)) {
|
|
410
412
|
return [
|
|
411
413
|
`MUSHI_PROJECT_ID=${projectId}`,
|
|
412
|
-
`MUSHI_API_KEY=${apiKey}
|
|
413
|
-
|
|
414
|
+
`MUSHI_API_KEY=${apiKey}`,
|
|
415
|
+
endpointLine
|
|
416
|
+
].filter(Boolean).join("\n");
|
|
414
417
|
}
|
|
415
418
|
if (framework.id === "react-native") {
|
|
416
419
|
return [
|
|
417
420
|
`MUSHI_PROJECT_ID=${projectId}`,
|
|
418
|
-
`MUSHI_API_KEY=${apiKey}
|
|
419
|
-
|
|
421
|
+
`MUSHI_API_KEY=${apiKey}`,
|
|
422
|
+
endpointLine
|
|
423
|
+
].filter(Boolean).join("\n");
|
|
420
424
|
}
|
|
421
425
|
if (framework.id === "expo") {
|
|
422
426
|
return [
|
|
423
427
|
`EXPO_PUBLIC_MUSHI_PROJECT_ID=${projectId}`,
|
|
424
|
-
`EXPO_PUBLIC_MUSHI_API_KEY=${apiKey}
|
|
425
|
-
|
|
428
|
+
`EXPO_PUBLIC_MUSHI_API_KEY=${apiKey}`,
|
|
429
|
+
endpointLine ? `EXPO_PUBLIC_${endpointLine}` : null
|
|
430
|
+
].filter(Boolean).join("\n");
|
|
426
431
|
}
|
|
427
432
|
const prefix = framework.id === "next" ? "NEXT_PUBLIC_" : framework.id === "nuxt" ? "NUXT_PUBLIC_" : "VITE_";
|
|
428
433
|
return [
|
|
429
434
|
`${prefix}MUSHI_PROJECT_ID=${projectId}`,
|
|
430
|
-
`${prefix}MUSHI_API_KEY=${apiKey}
|
|
431
|
-
|
|
435
|
+
`${prefix}MUSHI_API_KEY=${apiKey}`,
|
|
436
|
+
endpointLine ? `${prefix}${endpointLine}` : null
|
|
437
|
+
].filter(Boolean).join("\n");
|
|
432
438
|
}
|
|
433
439
|
function collectDeps(pkg) {
|
|
434
440
|
if (!pkg) return /* @__PURE__ */ new Set();
|
package/dist/detect.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ declare function readPackageJson(cwd: string): PackageJson | null;
|
|
|
25
25
|
declare function detectFramework(cwd: string, pkg: PackageJson | null): Framework;
|
|
26
26
|
declare function detectPackageManager(cwd: string): PackageManager;
|
|
27
27
|
declare function installCommand(pm: PackageManager, packages: string[]): string;
|
|
28
|
-
declare function envVarsToWrite(apiKey: string, projectId: string, framework: Framework): string;
|
|
28
|
+
declare function envVarsToWrite(apiKey: string, projectId: string, framework: Framework, endpoint?: string): string;
|
|
29
29
|
|
|
30
30
|
export { FRAMEWORKS, FRAMEWORK_IDS, type Framework, type FrameworkId, type PackageJson, type PackageManager, detectFramework, detectPackageManager, envVarsToWrite, installCommand, isFrameworkId, readPackageJson };
|