Skip to content

feat: split auth into auth.json, keep config.json token-free#29

Merged
vreshch merged 2 commits intomasterfrom
feature/auth-json-split
Mar 3, 2026
Merged

feat: split auth into auth.json, keep config.json token-free#29
vreshch merged 2 commits intomasterfrom
feature/auth-json-split

Conversation

@vreshch
Copy link
Contributor

@vreshch vreshch commented Mar 3, 2026

Summary

  • Splits auth storage from config.json into dedicated auth.json file (Decision D3)
  • config.json now only stores registry.url and deviceId — no tokens
  • Logout (clearAuth) writes {} to auth.json instead of deleting config.json, preserving deviceId and registry
  • Aligns userSchema with desktop (relaxed validators, verifiedAlias field)
  • All legacy types/functions removed — clean API: loadAuth/saveAuth/clearAuth + loadAppConfig/saveAppConfig

File layout

~/.agentage/
├── auth.json          # token, expiresAt, user
└── config.json        # registry.url, deviceId (NO tokens)

Test plan

  • All 168 tests pass (19 suites)
  • Type-check clean (tsc --noEmit)
  • Manual: agent login writes to auth.json
  • Manual: agent logout clears auth.json, config.json untouched
  • Manual: agent whoami reads from auth.json

vreshch added 2 commits March 3, 2026 23:05
Aligns CLI with North Star spec (Decision D3):
- auth.json: token, expiresAt, user
- config.json: registry URL, deviceId (no tokens)

Logout no longer destroys deviceId and registry settings.
@vreshch vreshch merged commit d0aaec6 into master Mar 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant