feat(host): manage multiple Ellipsis instances (agent host)#37
Merged
Conversation
Adds an `agent host` command group so the CLI can target Ellipsis Cloud, a preview environment, or a self-hosted deployment, and switch between them without re-exporting env vars. Config becomes a named set of hosts + an active pointer; each host keeps its own token (switching doesn't re-auth) and its own dashboard/app URL. The app/dashboard URL is derived from the API URL (api. -> app.) or set explicitly per host (--app-base) for self-hosted instances whose dashboard isn't a mechanical swap. `login` builds the device-code approval URL from the active host's app base, not the server's verification_uri_complete (which the backend defaults to prod) — this fixes beta/dev/self-hosted login and supersedes #36. Precedence unchanged (arg -> env -> active host -> prod default), so sandbox env injection still works. A pre-hosts v1 config is migrated in place on first load. Closes #36.
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
Adds an
agent hostcommand group so the CLI can target multiple Ellipsis instances — Ellipsis Cloud, a preview environment, or a self-hosted deployment — and switch between them without re-exporting env vars.agent hostsets where the CLI points;agent loginsets the credential for wherever it's pointing. No overlap, no--loginshortcut.Model
{ version: 2, activeHost, hosts: { <name>: { apiBase, appBase?, token?, enrolledRepos? } } }.api.→app.) by default, or set explicitly with--app-basefor a self-hosted instance whose dashboard host isn't a mechanical swap. Every dashboard link the CLI prints (including the login verification URL) uses it.ELLIPSIS_API_BASE_URL/ELLIPSIS_API_TOKENenv → active host → prod default. Sandbox env injection still works untouched.Login fix (supersedes #36)
agent loginnow builds the approval URL from the active host's app base instead of the server'sverification_uri_complete. The backend fills that fromELLIPSIS_APP_BASE_URL, which is unset in every env and defaults to prod — so a beta/self-hosted login was sent to the prod dashboard, where the code can't be approved (login hung). Closes #36.The backend is still wrong for non-prod (separate consolidation: set
ELLIPSIS_APP_BASE_URLper instance + unify the app-host helpers); the CLI no longer depends on it. Server-authoritative app-URL learning is a clean future enhancement once that lands.Test plan
bun run typecheck,bun run test(202 pass — new host/migration/cliAuthUrl cases),bun run build, compile smoke — all green locally.--app-baseoverride and v1→v2 migration confirmed.