feat(openviking-controlplane): 新增数据空间(Account)管理,发布 0.3.0 - #435
Merged
cuericlee merged 2 commits intoSep 18, 2026
Merged
Conversation
Add account lifecycle support across the shared client, CLI, and MCP surfaces, thread account scopes through user and usage operations, and document the 0.3.0 contract. Validate identifiers locally, preserve legacy request bodies when account scope is omitted, and cover the new wire contracts and destructive confirmations. Co-authored-by: TRAE CLI <traecli@bytedance.com>
…ntID The control plane renamed the data-space field from AccountID to OpenVikingAccountID on both requests and responses, so account-scoped calls were rejected with "AccountID is empty". Send and read the new name across the shared client, the account renderer, the MCP tool contracts, and the wire tests. Replace personal names in the CLI and documentation examples with generic placeholders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
对接 OpenViking 企业版新增的「数据空间(Account)」能力。数据空间是同一个 OV 库内的一级隔离边界:不同数据空间的用户、鉴权凭证、记忆、资源、会话与技能互相不可见。
MCP tool 与
ov-cp命令共用client.py,下述能力在两个前端完全一致。覆盖的 Action 从 11 个扩展到 14 个,版本 0.2.0 → 0.3.0。主要变更
1. 数据空间管理:新增 3 个 Action(
627c457)CreateOpenVikingAccountcreate_collection_accountov-cp account create <rid> <account>ListOpenVikingAccountslist_collection_accountsov-cp account list <rid> [--keyword] [--page] [--limit]DeleteOpenVikingAccountdelete_collection_accountov-cp account delete <rid> <account> [--yes][A-Za-z0-9_.@-]、不以_开头、不能是./..、至多一个@),非法输入不发请求,报错附带完整规则--yes跳过;default数据空间在确认提示之前就被本地拒绝,不会让用户走完确认才收到服务端报错collection_前缀,与现有*_collection_user*对齐,也避免和"火山账号"的 account 语义混淆2. 存量接口增加可选数据空间范围(
627c457)user list|register|update|delete、api-key、usage新增--account-id(MCP 侧account_id),不传即default数据空间usage支持三级下钻:库级总览 →--account-id→--account-id --user-id。按数据空间或用户查询时不返回EstimatedCosts/EstimatedBilling:费用是库级口径,贴在切片上会误导,同时省掉一次GetOpenVikingCollection请求test_user_contract.py中既有的 client 层 wire 断言一字未改、全部通过3. 字段名对齐
OpenVikingAccountID(8a8f6b1)后端把数据空间字段从
AccountID改名为OpenVikingAccountID,请求和响应两侧都改了。旧实现除usage外都发AccountID,后端报InvalidParameter: AccountID is empty。本提交统一改名,account list表格与 MCP tool 的返回值说明也改读新字段。4. 展示
account list渲染为 Data Spaces 表格(ID / 用户数 / 创建时间 / 是否默认)usage面板不再显示¥—,改为说明费用按全库统计5. 文档
--yes;禁止从account list的模糊匹配推断 ID<swimlane>、alice)验证
NO_COLOR=1 TERM=dumb python -m unittest discover -s tests),新增tests/test_account_contract.py覆盖 client wire 契约、CLI、MCP 与三层签名一致性mcp.list_tools()返回 14 个 toolaccount list/account create的请求体与渲染符合接口文档