Repository navigation
fix(localagent): 使用平台入站授权并移除逐消息可见范围查询 - #29
Merged
Merged
Conversation
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.
问题与结果
平台已保证受管 local_agent 私聊可见即可聊、群聊原生 @ 可回复;撤销权限或切换类型后停止原绑定投递。插件此前逐条调用 DWS 查询可见范围,重复鉴权并引入主管登录与通讯录接口依赖。现在在启动时确定访问策略,平台消息直接交给任务队列,其他场景继续本地白名单。
实现
bindingAccessPolicy=true和明确的platform/local_allowlist。未知或缺失策略拒绝启动;不从配置自填或空白名单推断平台授权。配套 DWS #1476:
c165fa8483efcc0d4a88f7a59434d80288787f90。插件最终提交:d09a0118dba57b148035087f7b86c29b51e87f73。本 PR 基于已合并的 #28,版本号仍由正式 release workflow 管理。验证
pnpm run ci:387 pass / 0 fail / 0 skip;敏感信息扫描、格式、类型检查和打包校验全部通过,tarball 251 files / 1,178,207 bytes。git diff --check通过;独立代码审查未发现阻断项。补充最终组合验证:2026-10-14 使用官方 DSH 0.2.0-rc.2、DWS c165fa848 和插件 d09a011,数字员工完成两轮真实钉钉问答;核对入站、同一会话续接、引用回复正文和送达回执,两轮均正确,未观察到额外自回复任务。
最终插件提交远端 8 项 CI 全部通过。本机全量曾出现 4 项超时,其中生命周期/A2UI 独立复跑通过,运行时卡片夹具仍有 1 项超时;不把该次本地全量标为通过。历史会话从 DWH 迁入官方 DSH 后存在 cwd 与工作区归属不一致,影响侧栏分组,该问题不在本 PR 范围。
平台授权语义由平台方确认。npm 由正式 release workflow 发布。
风险与回滚
两端需配套升级;旧 DWS 缺少明确策略能力时拒绝启动。正常停止后回退两端,保留绑定、会话和账本,不手删 lease guard 或重试状态。