Skip to content

feat(hireaicreator): filter account +list by workspace tags - #168

Merged
MikeChenWM merged 1 commit into
mainfrom
claude/account-list-tag-filter
Sep 30, 2026
Merged

MikeChenWM merged 1 commit into
mainfrom
claude/account-list-tag-filter

Conversation

@MikeChenWM

Copy link
Copy Markdown
Contributor

背景

运营在 HAC 前端给账号打了工作区标签(pool_account_workspace_tags),需要在 CLI 里按标签把账号筛出来。hireaicreator account +list 的返回里已经带 tags,但没有按标签筛选的入参。后端 GET /api/v2/pool-accounts/workspace-accounts 本来就支持 tags(逗号分隔、任一命中),和 HAC 前端用的是同一个过滤。

改动

  • hireaicreator account +list 新增可重复的 --tags(结构化输入为 tags: string[],最多 50 个),发送时拼成后端需要的逗号分隔 tags 参数;多个标签按「任一命中」匹配。
  • 含逗号的标签直接报 invalid_input,避免被后端拆成两个标签。
  • 重新生成 contracts/command-catalog.json 和命令文档。

新增入参,不影响已有调用,非 breaking。

验证

  • ai_hook_requests.json 的 account-list 样例加上 tags:去掉代码改动时 json/file/flags 三种入参方式都失败,加上后通过。
  • uv run ruff check .、uv run pytest -q(1162 passed)、gen_command_docs.py / gen_command_contract.py、uv build --wheel、verify_public_artifacts.py、smoke_install.py 全部通过。
  • 用本分支 CLI 对生产做只读实测:--tags chii-情感类 返回 20 个号,和该标签的实际数量一致;--tags 孙出-女性typo --tags 0930候补 返回 59 个号(18 + 49 − 两者重叠的 8 个)。

后续

CLI 发版后,还要在 museon 仓库执行 pnpm agent-cli:contract:sync,同步 apps/api/app/contracts/agent_cli_command_catalog.json。

🤖 Generated with Claude Code

`hireaicreator account +list` already returns each account's workspace tags,
but could not filter by them. Add a repeatable `--tags` input that is sent as
the API's comma-separated `tags` filter (any match). Tags containing commas are
rejected, since the API would split them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MikeChenWM
MikeChenWM merged commit 916c0ce into main Sep 30, 2026
10 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