@mulmoclaude/core 1.7.0 → 1.7.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.
|
@@ -623,3 +623,49 @@ queue of paths, with one short-delay retry on 429. See the throttled-resolver
|
|
|
623
623
|
example in `custom-view.md` ("Displaying images"). Do NOT widen the server
|
|
624
624
|
cap, switch to base64-embedding images in the HTML, or treat the 429'd paths
|
|
625
625
|
as bad values.
|
|
626
|
+
|
|
627
|
+
## An API key in `.env` has no effect — the shell is shadowing it
|
|
628
|
+
|
|
629
|
+
### Symptoms
|
|
630
|
+
|
|
631
|
+
- The user says they put a key (`GEMINI_API_KEY`, `OPENAI_API_KEY`, …) in
|
|
632
|
+
`.env` and restarted, but generation still fails with an auth / 401 /
|
|
633
|
+
"API key not valid" error from the provider.
|
|
634
|
+
- They may have edited `.env` several times, each time with no change.
|
|
635
|
+
- The bell may show **"Shell env is overriding .env"**, and the server log
|
|
636
|
+
a `[shadowed-env]` warning naming the keys.
|
|
637
|
+
|
|
638
|
+
### Cause
|
|
639
|
+
|
|
640
|
+
An exported shell variable beats the file. `.env` is loaded with
|
|
641
|
+
no-override semantics, so if `~/.zshrc` (or the current shell) still holds
|
|
642
|
+
`export GEMINI_API_KEY=<old value>`, the file's value is read and
|
|
643
|
+
discarded. Editing `.env` cannot fix it, which is why the loop repeats.
|
|
644
|
+
|
|
645
|
+
An **empty** export shadows just as hard: `export GEMINI_API_KEY=` counts
|
|
646
|
+
as set, so the provider receives an empty key while a perfectly good one
|
|
647
|
+
sits in `.env`.
|
|
648
|
+
|
|
649
|
+
Two files can be shadowed this way — the directory the user launched from
|
|
650
|
+
(`npx mulmoclaude`) and the server's own working directory (`yarn dev`).
|
|
651
|
+
|
|
652
|
+
### Fix
|
|
653
|
+
|
|
654
|
+
Have the user check the shell, not the file. Test whether the variable
|
|
655
|
+
is **set**, not whether it prints something — `export GEMINI_API_KEY=`
|
|
656
|
+
prints nothing and still shadows, which is the case `echo` cannot see:
|
|
657
|
+
|
|
658
|
+
```bash
|
|
659
|
+
[ -n "${GEMINI_API_KEY+x}" ] && echo "set in the shell — this is what the app uses" \
|
|
660
|
+
|| echo "not set — the shell is not the problem"
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
If it reports "set", that shell value is what the app is using, whatever
|
|
664
|
+
`.env` says. Either correct the export, or remove it — from the current
|
|
665
|
+
shell AND from `~/.zshrc` / `~/.bashrc`, or the next terminal brings it
|
|
666
|
+
straight back — so the `.env` value takes effect. Restart the app
|
|
667
|
+
afterwards; the load happens once at boot.
|
|
668
|
+
|
|
669
|
+
Do NOT tell the user to re-check the spelling in `.env`, add the key
|
|
670
|
+
again, or move it elsewhere; the file is already correct, and it is being
|
|
671
|
+
read. The conflict is the whole problem.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mulmoclaude/core",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Shared server-side core for MulmoClaude and MulmoTerminal — the always-shipped-together subsystems consolidated behind subpath exports so the two hosts can't drift. Server-only except the browser-safe ./artifacts, ./whisper/client, ./workspace-setup/slug, ./translation/client, ./remote-view, ./remote-host and ./plugin-vue entries. All host specifics are injected.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|