Files
OpenViking/crates
dingbenandTRAE CLI 953d0bb9f1 feat(admin): support wildcard matching in list-accounts and list-users (#4409)
* feat(admin): support wildcard matching in list-accounts and list-users

Add fnmatch-based wildcard filtering to the admin list-accounts operation,
matching the existing semantics of list-users (case-sensitive, substring
via *x*). Both operations now accept an optional name filter and limit.

- server: get_accounts(name_filter, limit) using fnmatch; list_accounts
  router exposes `name` and `limit` query params
- ov_cli: add --name/--limit flags to list-accounts
- SDKs (python/go/typescript): thread filter params through admin clients
- docs: document the new filtering params for the admin API

Also fix two pre-existing, unrelated test failures (test-only):
- test_legacy_cleanup_removes_only_legacy_namespaces: update to the
  per-agent-id cleanup contract introduced in 0102a48c
- test_remove_user: raise _wait_for_task budget to accommodate the
  ~2s AGFS recursive cleanup during user deletion

Co-authored-by: TRAE CLI <traecli@bytedance.com>

* refactor(admin): drop limit param from list-accounts, keep name filter

The account list is consumed by callers that fetch the full set and scan
it (vikingbot root-key namespace-policy lookup, config-wizard account
menu, migration registry checks). Defaulting the HTTP route to limit=100
would silently truncate those consumers once an install has >100
accounts. The original requirement was only wildcard name matching, so
remove the limit param from the account path across route, CLI, SDKs and
manager, keeping only the fnmatch `name` filter. list-users is unchanged
(its limit predates this work and its consumers pass explicit large caps).

Co-authored-by: TRAE CLI <traecli@bytedance.com>

* feat(admin): add opt-in limit/page pagination to list-accounts and list-users

Both endpoints now return results in lexicographic order of ID and accept
optional limit/page query params. Pagination is opt-in: omitting limit
returns the full set, so internal full-set consumers stay unaffected.

Co-authored-by: TRAE CLI <traecli@bytedance.com>

---------

Co-authored-by: TRAE CLI <traecli@bytedance.com>
2026-08-28 11:26:23 +08:00
..