WeKnora/cli/cmd/auth
nullkey 26fa43e2cc fix(cli): post-audit fixes (MCP MatchCount + sessions + auth + view)
Four unrelated shipped-code drifts found during v0.5 audit cycles:

1. MCP search_chunks tool omitted MatchCount from SearchParams. Server
   fell back to its default cap; agents asking for limit:50 silently
   got fewer results. Adds MatchCount: limit to the struct literal.

2. search sessions printed UpdatedAt as raw RFC3339 while session list
   used a fuzzy "X hours ago" render — same SDK field, two human
   renderings. Switches to the shared text.FuzzyAgoStr helper for
   parity.

3. auth status --json omitted three operationally-meaningful AuthUser
   fields (username, is_active, can_access_all_tenants). Agents
   branching on can_access_all_tenants previously needed a second
   round-trip.

4. session view Long help claimed the SDK doesn't wrap session_messages;
   it does (LoadMessages / GetMessagesBefore / GetRecentMessages all
   exist in client/message.go). Rewrites the comment to be accurate.
2026-05-16 16:56:33 +08:00
..
auth.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
auth_test.go refactor(cli): auth security audit — gh CLI parity hardening 2026-05-15 12:03:56 +08:00
list.go chore(cli): gofmt sweep 2026-05-15 12:03:56 +08:00
list_test.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
login.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
login_test.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
logout.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
logout_test.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
refresh.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
refresh_test.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
status.go fix(cli): post-audit fixes (MCP MatchCount + sessions + auth + view) 2026-05-16 16:56:33 +08:00
status_test.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
token.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00
token_test.go refactor(cli): drop aiclient package; align AGENTS.md with mainstream 2026-05-15 12:03:56 +08:00