Repository navigation
fix(config): give standalone Gentle Shell its own config home - #2207
Conversation
The isolated launcher home now keeps Gentle Shell preferences in ~/.gentle-shell/gentle-ai instead of the shared ~/.pi/gentle-ai. On first launch, files are copied once from ~/.pi/gentle-ai without overwriting or touching the source. An explicit GENTLE_PI_CONFIG_HOME still wins, and Gentle AI processes get the same folder through the bundled-mode isolation pair. Every reader shares one resolver, so an empty GENTLE_PI_CONFIG_HOME now counts as unset everywhere instead of naming the current folder. Install-level state (dev-binary.json, channel.json) stays in ~/.pi/gentle-ai. Closes #2201.
… home Beside a custom GENTLE_SHELL_HOME such as ~/myagent the sibling would be ~/gentle-ai, which may be anyone's folder; only an agent dir inside a .gentle-shell folder gets its own config folder.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
…ng#2205, Gentleman-Programming#2207) before resolving the launcher import conflict # Conflicts: # bin/gentle-shell.mjs
Closes #2201
Summary
gentle-shellin its default isolated home now keeps Gentle Shell preferences (profiles, models, banner, vim, card and other policies) in~/.gentle-shell/gentle-aiinstead of the shared~/.pi/gentle-ai, so a standalone install and a Pi-package install (Path B) no longer overwrite each other's settings.~/.pi/gentle-ai: never overwrites, never modifies or deletes the source, skips symlinks, subdirectories and install-level state, prints one line, and never blocks launch on failure.GENTLE_PI_CONFIG_HOME> launcher markerGENTLE_SHELL_CONFIG_HOME>~/.pi/gentle-ai. Gentle AI processes get the same folder through the bundled-mode pair (GENTLE_AI_PI_CONFIG_DIR+ parentGENTLE_PI_CONFIG_HOME), and setup preserves bothpersona.jsoncopies.Behavior changes to note
GENTLE_PI_CONFIG_HOMEnow counts as unset everywhere. Before, the banner, profiles and dev-binary readers resolved""to the current folder whilelib/agent-home.tstreated it as unset.tests/gentle-shell.test.tspinned the old cwd behavior only as non-regression for the bundled work; it is updated.--link, custom--home <path>, a customGENTLE_SHELL_HOMEoutside a.gentle-shellfolder (its parent may be any folder, such as~, so Gentle Shell never claims agentle-aifolder there), gentle-pi inside Pi, and bundled installs.dev-binary.jsonandchannel.jsonstay in~/.pi/gentle-ai: the installer andgentle-shell upgradewrite them outside any session.self-uninstallremoves~/.gentle-shell/gentle-ai; the shared~/.pi/gentle-airule (kept unless--include-shared) is unchanged.Changes
lib/gentle-shell-bundled.ts,lib/agent-home.ts,extensions/startup-banner.ts,extensions/gentle-shell.ts,scripts/main-channel.mjslib/gentle-shell-launcher.ts,lib/gentle-ai-binary.ts,bin/gentle-shell.mjslib/gentle-shell-uninstall.tsruntime/*.mjstests/standalone-config-home.test.ts(new), uninstall, launcher, startup-banner, gentle-shelldocs/readme-reference.md(Config home),docs/gentle-shell-uninstall.md,README.md,--helpTest plan
gentle-shell listgave Pi no config marker (config in~/.pi/gentle-ai);GENTLE_PI_CONFIG_HOME=""resolveddev-binary.jsonrelative to the cwd.npm test: exit 0, 6644 pass, 0 fail; unit-tests, provider-contract and runtime-harness pass (re-run after rebasing on currentmain).node scripts/check-types.mjs: no regressions;pnpm run check:runtime-modules: in sync.HOMEand a fake pi: migration copies only regular non-install files, folder 0700, source hash/mode/mtime unchanged, second run is a no-op, existing files never overwritten;--linkand--homeget no marker; explicitGENTLE_PI_CONFIG_HOMEwins with no migration; empty value from another cwd does not resolve to the cwd;self-uninstall --dry-runplan correct; Gentle AI setup receives the env pair and bothpersona.jsoncopies are restored.GENTLE_SHELL_HOME=~/myagentno longer adopts an existing~/gentle-ai(repro re-run: no marker, foreign folder untouched; default home still migrates).Summary by CodeRabbit
New Features
Bug Fixes