Repository navigation
fix(auth): 按实际策略展示授权范围 - #1751
Merged
deepcoldy merged 2 commits intoOct 9, 2026
Merged
Conversation
47seek
requested review from
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
October 9, 2026 03:34
- 补 bytedcli-only 配置下飞书专属失败指引缺席的双向断言:区分短语用
「遇到飞书鉴权失败」/「On a Feishu auth failure」;on_auth_link 对所有
工具无条件输出且同样出现 botmux auth request,不能用作区分
- acting_identity 升为 placeholder 并声明 {tools},定制覆盖删掉占位符
时由 validateFragmentOverride 拒绝,避免工具列表被静默丢弃
- 登记 git_identity({host}) 与 on_bytedcli_auth_failure 到
PROMPT_FRAGMENTS,使两条新文案在定制中心可见且受目录完整性校验
- 三处改动均经变异验证(失败行无条件化 / 两条目降回 editable 均变红)
Co-Authored-By: Claude Code <noreply@anthropic.com>
deepcoldy
approved these changes
Oct 9, 2026
deepcoldy
left a comment
Owner
There was a problem hiding this comment.
审查通过:授权提示与 /login 回执按 triggerUserAuth.tools / gitHost 精确展示,未启用或 tools 为空时整块不注入(fail-closed)。已独立验证构建、相关单测、变异测试及 CI;另补了 bytedcli-only 反向断言与定制目录占位符登记。按维护者确认合并。
|
🚀 Released in v3.38.0 |
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.
当 Bot 仅为
lark-cli启用发起人身份注入时,原会话提示仍宣称bytedcli和 git 使用发起人的授权;ByteCloud 登录完成回执也会给出同样的承诺。用户因此会将后续身份问题理解为授权未完成。现在会话提示读取完整
triggerUserAuth策略,按tools展示已启用的工具,并在 bytedcli 与gitHost同时配置时展示 git 鉴权范围。/login done和/login bytedcli done共用成功回复,分别说明授权已保存、当前 Bot 是否已启用身份注入,以及配置生效方式。现有 stderr 授权链接引导继续使用。影响范围覆盖 worker 启动参数、共用 CLI 提示构造、inline 提示与登录完成回执。回归覆盖未配置、关闭、lark-cli、bytedcli 及 gitHost 组合,以及 Claude、Genius、Grok 的参数传递。
验证:
node node_modules/vitest/vitest.mjs run --project unit test/credential-boundary-prompt.test.ts test/command-handler.test.ts test/turn-cli-identity.test.ts test/trigger-user-auth.test.ts test/cli-adapters.test.ts test/prompt-builder.test.ts --reporter=dot:1075 passed,1 skipped。bun run build:通过。git diff --check:通过。相关进程身份修复见 #1746。本 PR 的授权提示尚待运行时发布验收。