Refactor Sessions to AuthSessions for Clarity

take a look at https://github.com/entireio/cli/pull/1341, that should be this branch. we are introducing a sessions.go file, with Sessions structs and so on. That's confusing. Refactor things to call them auth_sessions.go, and AuthSessions struct. whenever it's about auth, i want to see the name disambiguated. create a plan and show me what you'll do.
Done — auth "session" names are now disambiguated from the real strategy.Session domain.
What changed (5 files + 2 renames, no commit — yours to make):
- Files:
api/sessions.go→api/auth_sessions.go,api/sessions_test.go→api/auth_sessions_test.go(viagit mv, history preserved). apipackage:Session→AuthSession,SessionsResponse→AuthSessionsResponse,ListSessions→ListAuthSessions,RevokeSession→RevokeAuthSession,RevokeCurrentSession→RevokeCurrentAuthSession,WithSessionsPath→WithAuthSessionsPath, plus unexportedauthSessionsPath/authSessionsBasePath/errAuthSessionsPathUnset. Test funcs renamed to match.clihelpers (auth.go/logout.go):coreAuthSessionsPath,newAuthSessionsClient,authSessionLister,defaultListAuthSessions,renderAuthSessionsTable,sortAuthSessionsByRecency,revokeCurrentAuthSession,revokeAllAuthSessions.
Decisions honored: AuthSession singular (one row), full scope (api + cli helpers).
Notes / tradeoffs:
- Used gopls semantic rename, not text substitution — so the bare
Session→AuthSessiondidn't mangle prose comments. Fixed the few comment/string cross-references gopls leaves alone (they're prose, not symbol refs). - JSON wire key stays
"tokens"(server contract) — only Go identifiers and the two filenames changed. - Left local test vars (
noSessions, thelistSessionsparam) and test-function names as-is: scoped, unambiguous, and not the names you flagged. - Verified:
go vetclean,golangci-lint0 issues on both packages,go test ./api/... ./cli/pass. The onemise run lintfailure is a pre-existing shellcheck nit inmise-tasks/release, which this refactor never touched.
fix mise-tasks/release with - Capture first, then test: status="$(git status --porcelain)"
Done. Both fixes committed separately (not pushed).
mise-tasks/releasenow capturesstatus="$(git status --porcelain)"then tests[ -n "$status" ]— fullmise run lintpasses clean.- Three new commits on
auth-context-consolidation:144be12e31— file renames (sessions.go→auth_sessions.go)b912bcbd95— identifier renames toAuthSessionformsa8bf68d564— the release shellcheck fix
Heads-up: the refactor landed as two commits (moves, then content) because my first git add hit a stale pathspec and only the moves were staged — and your rule is new commits, never amend. If you'd prefer them as one before pushing, say so and I'll squash explicitly.