test(cli): cover login --token defaulting to hosted relayfile

Draft
KH
4mo ago
+45-0

Closes #328.

Verified — no production code change needed — that the CLI already defaults to `https://file.agentrelay.com\`. Traced `defaultServerURL` through `runLogin`, `loginWithAPIKey`, `newAPIClient`, and `resolveServer`; no Go code retains the stale `https://api.relayfile.dev\` default. Adds a real regression test asserting `login --token` with no `--server` issues its health check against, and persists, the hosted endpoint.

Test plan

  • `go build ./...`
  • `go test ./cmd/relayfile-cli/... -run TestLoginWithTokenDefaultsToHostedRelayfile -v -count=1`
  • `go test ./cmd/relayfile-cli/... -count=1` (full package suite)