添加agent studio的cli能力 - #116
Merged
Merged
Conversation
# Conflicts: # packages/commands/src/commands/auth/login.ts # packages/commands/src/commands/config/set.ts # packages/commands/src/index.ts # packages/core/src/client/index.ts # packages/core/src/config/schema.ts # skills/bailian-cli/reference/auth.md # skills/bailian-cli/reference/config.md # skills/bailian-cli/reference/index.md
XXPermanentXX
previously requested changes
Jul 23, 2026
XXPermanentXX
left a comment
Collaborator
There was a problem hiding this comment.
这次接入方向基本正确:使用 @openagentpack/sdk,并把能力注册为真实 CLI command,而不是简单转发 argv;同时也补了 User-Agent、渠道 header 和部分错误适配。
但当前实现还没有完整接入 Bailian CLI 的宿主契约,在命令空间、鉴权/Profile、dry-run、结构化输出、错误分类、timeout、运行时兼容性和配置生命周期方面仍有阻塞问题。部分问题会产生真实误操作、账号错用或破坏自动化调用,因此本轮先 Request changes。
合入前至少需要完成:
- 命令统一迁移到产品确认的独立命名空间,例如
bl cma ...。 - 建立明确的 Host Adapter,由 Bailian CLI 负责鉴权、Profile、遥测、输出、错误和 timeout;不要通过 SDK bootstrap 隐式接管这些能力。
- 所有本地及远程 mutation 正确支持
--dry-run。 - 保证
--output json的 stdout 始终只有一个合法 JSON 结果。 - 解决 SDK Node >=22 与 Bailian CLI Node >=18.17 的发布契约冲突。
- 补齐配置写入、Profile、logout、URL 规范化和错误映射。
- 增加 commands E2E,覆盖 help、缺参、dry-run、JSON、Profile、鉴权、网络错误和最低 Node 版本。
另外请确认产品边界:当前实现同时暴露 bailian、claude、qoder、ark 和 all。如果首期只支持百炼,应由产品层 policy 禁止其他 provider;如果确定支持多 provider,需要正式设计 provider credential、telemetry、错误归属和安全边界,不能继续统一使用 auth: "none"。
当前只有错误映射和 credential bridge 的辅助单测,没有新增 CMA/Agent commands topic E2E。修复后请至少覆盖每个 leaf command 的 help/缺参、dry-run 不联网不写盘、单一 JSON stdout、显式 JSONL、命名 Profile、NETWORK/TIMEOUT、配置/logout 生命周期,以及最低支持 Node 版本 smoke。
…th-chain scenarios
XXPermanentXX
dismissed
their stale review
July 27, 2026 14:32
PR 已更新,撤销此前的 Changes requested;剩余问题将单独跟进。
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.
No description provided.