feat: follow XDG spec on linux/mac and use windows known folders for config and logs #1153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
migrate to using
etcetera
to handle config/log/state files to follow XDG when on MacOS/Linux and use Windows known folders on windowsetcetera
crate which allows us to useXDG
on mac, and support known windows folderstl;dr table mapping changes for macos/linux
config.yaml
~/.config/goose/config.yaml
~/.config/goose/config.yaml
sessions
~/.local/share/goose/sessions
~/.config/goose/sessions/
goose.log
~/.local/state/goose/logs/goose.log
~/.config/goose/logs/goose.log
goose-cli logs
~/.local/state/goose/logs/cli/*
~/.config/goose/logs/cli/*
goose-server logs
~/.local/state/goose/logs/server/*
~/.config/goose/logs/server/*
computer_controller
~/.cache/goose/computer_controller
$HOME/Library/Caches
developer (goosehints)
~/.config/goose/.goosehints
~/.config/goose/.goosehints
memory
~/.config/goose/memory
~/.config/goose/memory
XDG_STATE_HOME
for logsXDG_DATA_HOME
for session filesWindows
, where~
==C:\Users\$USERNAME\
:config.yaml
~\AppData\Roaming\Block\goose\config\config.yaml
sessions
~\AppData\Roaming\Block\goose\data\sessions\*
goose.log
~\AppData\Roaming\Block\goose\logs\data\goose.log
goose-cli logs
~\AppData\Roaming\Block\goose\data\logs\cli\*
goose-server logs
~\AppData\Roaming\Block\goose\data\logs\server\*
computer_controller
~\AppData\Local\Block\goose\cache\computer_controller\
developer (goosehints)
~\AppData\Roaming\Block\goose\config\.goosehints
memory
~\AppData\Roaming\Block\goose\config\memory
dirs
crate since it does not allow forcing the use ofXDG
on mac, and we want to keepXDG
on mac~/.config
and into STATE/DATA dirsstate_dir
and we fallback todata_dir
in that caseonce_cell
to be the same version across all cratesAPP_STRATEGY
static per crate, which allows us to rip out crates easier in the future/tmp
/.config
relative where it existsresolves #1049