Move config to ~/.ellipsis, friendly auth errors, connect UI cleanups#63
Merged
Conversation
…me` without a token - Default config dir is now ~/.ellipsis (was ~/.config/ellipsis): the CLI creates it directly under $HOME, so a root-owned ~/.config left behind by an old sudo install can no longer cause first-run EACCES. ELLIPSIS_CONFIG_DIR still overrides. A config at the legacy path is read as a fallback until the first write lands it in ~/.ellipsis, so existing logins survive the move. - runAction maps 401 ApiErrors to a re-login hint (env-token vs stored-login variants) instead of echoing the raw HTTP failure. - `agent me` calls requireToken() before hitting GET /v1/me, so a missing credential fails fast with the login hint instead of sending an unauthenticated request.
…sible); help: sort subcommands alphabetically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Config:
~/.ellipsisreplaces~/.config/ellipsisA user hit first-run EACCES because their
~/.configwas root-owned (leftover from an old sudo install). The CLI now creates its own directory directly under$HOME, so it can never inherit broken ownership.ELLIPSIS_CONFIG_DIRstill overrides, and the spool/hooks dirs move with it (now derived from the sharedconfigDir()).~/.config/ellipsis/config.jsonis read as a fallback so existing logins survive; the first write lands it in~/.ellipsis. An unreadable legacy file (the root-owned case) is skipped instead of crashing.Auth errors
runActionmaps 401ApiErrors to a re-login hint instead of echoing the raw HTTP failure, with a distinct message when the rejected token came fromELLIPSIS_API_TOKEN(env outranks the config file, soagent loginalone would not fix it).agent mecallsrequireToken()before hittingGET /v1/me, so a missing credential fails fast with the login hint instead of sending an unauthenticated request.Connect UI
status · $X total (Last step: $Y) · <session id, hyperlinked to the dashboard> · <model> · v<version>.Help
--help(configureHelp({ sortSubcommands: true })).Testing
vitest run: 246 passed, including new coverage for the legacy-config fallback (mocked homedir) and the 401 message mapping.tsc --noEmitclean.agent mewith no token fails fast without a network call; a legacy config is read and migrated to~/.ellipsison first write; 401s from a stub server print both friendly variants.