refactor(config): remove remaining thin wrappers and type aliases#298
Merged
liujuanjuan1984 merged 1 commit intomainfrom Mar 23, 2026
Merged
refactor(config): remove remaining thin wrappers and type aliases#298liujuanjuan1984 merged 1 commit intomainfrom
liujuanjuan1984 merged 1 commit intomainfrom
Conversation
Collaborator
Author
|
本轮审查结论:
非阻塞风险:
|
Collaborator
Author
|
更苛刻一轮 reviewer 审查结论:
除此之外,这轮没有发现新的阻塞问题。 |
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.
变更概述
pydantic-settings迁移。#275在当前代码形态下仍然合理的一步收敛:清理无额外语义价值的薄别名 / 薄包装,并进一步对齐a2a-sdk已提供的核心协议类型。模块变更
src/opencode_a2a/config.pySettings.from_env()这层单纯转发的包装方法。Settings作为唯一配置模型入口。src/opencode_a2a/server/application.pySettings.from_env()。Settings,并通过BaseSettings类型适配保持静态类型检查通过。src/opencode_a2a/client/client.pyA2AClientEventalias 的依赖。send_message()/send()的返回类型注解改为直接使用真实a2a-sdk事件类型组合。src/opencode_a2a/client/__init__.pyA2AClientEvent/A2AClientEventStream/A2AClientMetadata的对外导出。src/opencode_a2a/client/types.pytests/server/test_app_behaviors.pySettings,避免继续依赖已删除包装层。提交记录
a840fd5refactor(config): remove remaining thin wrappers and type aliases (#275)验证
uv run pre-commit run --all-filesuv run pytest345 passedcoverage: 91.03%Closes #275