Skip to content

feat(token-plan): add Token Plan organization & seats commands#75

Merged
lishengzxc merged 9 commits into
mainfrom
token-plan-openapi
Jun 24, 2026
Merged

feat(token-plan): add Token Plan organization & seats commands#75
lishengzxc merged 9 commits into
mainfrom
token-plan-openapi

Conversation

@lishengzxc

@lishengzxc lishengzxc commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new token-plan command group that talks to the ModelStudio Token Plan POP APIs (ACS3-HMAC-SHA256 signed), plus a few small follow-ups.

New commands

  • bl token-plan seats — list subscription seat details
  • bl token-plan create-key — create an access key
  • bl token-plan assign-seats — assign seats
  • bl token-plan add-member — add an organization member (with optional seat tier / role)

Supporting changes

  • token-plan/utils.ts, types.ts, ak-sign.ts: shared ACS3 query-string signer + credential resolution + common query/AK options
  • Registered commands in catalog.ts
  • Added Token Plan base URLs in urls.ts
  • Updated skills/bailian-cli reference docs (token-plan.md, setup, index) and READMEs
  • chore: bump Node.js to 24 (.node-version)

Note: the top-level command was renamed from tokenplan to token-plan (kebab-case). Remote API paths (/tokenplan/...) are unchanged.

Test plan

  • bl token-plan seats --dry-run resolves and dispatches correctly
  • bl tokenplan seats reports "Unknown command" (old name removed, no alias)
  • pnpm run check passes (0 errors)
  • bl token-plan create-key / assign-seats / add-member round-trip against staging
  • Existing omni and video e2e tests still pass

🤖 Generated with Claude Code

wb-liuxuehuan and others added 9 commits June 23, 2026 14:05
新增 tokenplan seats 命令,支持分页和状态过滤,提供详细的座位信息查询功能。相关文档已更新。
新增 `tokenplan add-member`、`tokenplan assign-seats` 和 `tokenplan create-key` 命令,支持管理 Token Plan 组织成员和 API 密钥。相关文档已更新,提供使用示例和参数说明。
修改 `assign-seats` 命令中的 AccountIds 参数处理,将字符串类型的 AccountIds 转换为数组。同时,更新相关的测试用例以验证新逻辑的正确性。
更新 `assign-seats` 和 `seats` 命令中的参数处理逻辑,简化对 AccountIds 和 StatusList 的检查,确保在缺少必要参数时抛出相应错误。同时,增强对 `--query-assigned` 参数的验证,确保其值为 'true' 或 'false'。此更改提高了代码的可读性和健壮性。
对 `tokenplan` 相关命令进行了重构,新增了 `ak-sign` 模块以支持 ACS3-HMAC-SHA256 签名,优化了参数处理逻辑,简化了对凭证的处理。更新了 `add-member`、`assign-seats`、`create-key` 和 `seats` 命令,增强了对参数的验证和处理,确保代码的可读性和健壮性。同时,新增了类型定义和工具函数以支持更好的代码结构。
Rename the public command group from `bl tokenplan` to `bl token-plan`
for kebab-case consistency. Source directory and reference doc renamed
accordingly; remote API paths (/tokenplan/...) and internal TS
identifiers are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lishengzxc lishengzxc changed the title feat(tokenplan): add Token Plan organization & seats commands feat(token-plan): add Token Plan organization & seats commands Jun 24, 2026
@lishengzxc lishengzxc merged commit 908439e into main Jun 24, 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