Support and test the shared JSON configuration contract in the Python SDK
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 42/100
调研方向
Start with load_configuration_from_env, ConnectionManager, and AgentAuthConfiguration to understand the existing configuration flow, then review the shared contract in microsoft/Agents#738. Use eng/configuration_contract_adapter.py and the suggested fixture command as the integration entry point. Done means shared fixtures pass through real Python consumers, environment aliases and coercions remain compatible, diagnostics are secret-safe, and pytest and the reusable workflow stay green.
由索引模型根据 Issue 内容生成。
描述
Summary
Implement Python SDK support and conformance testing for the shared Agents JSON configuration contract defined by microsoft/Agents#738.
This issue covers adding a JSON-document normalization/validation boundary compatible with Python's existing environment configuration, declaring Python capabilities, and executing the central fixture suite through the real Python configuration and authorization classes.
Parent specification
- microsoft/Agents#738
Existing Python behavior
The Python SDK currently builds nested configuration primarily through load_configuration_from_env, preserves many raw string values until later coercion, and passes dictionaries into ConnectionManager, AgentAuthConfiguration, authorization, and application construction.
Python does not need to replace this model or adopt Pydantic to participate. It needs a narrow canonical document boundary and an adapter that proves how existing environment and JSON inputs normalize into runtime behavior.
Scope
JSON configuration support
Add a supported way to load or normalize a JSON configuration document into the same effective shape used by existing Python configuration consumers. The implementation should:
- accept the portable shared document shape;
- preserve existing environment-variable behavior and aliases;
- define deterministic source precedence when JSON and environment settings are both provided;
- retain raw-value coercion behavior where required for backward compatibility;
- provide field-path diagnostics without exposing secrets;
- avoid introducing a new public model framework solely for schema support.
Capability inventory
Contribute and maintain the Python capability manifest in the central contract, including:
- connection and route support;
- authentication types and accepted spellings;
- current environment aliases and casing behavior;
- certificate/PFX or other Python-specific representations;
- effective defaults and coercions;
- currently unsupported shared fields;
- fields passed through provider settings;
- constructor-only features that should remain outside the JSON contract.
Repository adapter
Add a repository-internal configuration-contract adapter that:
- accepts a central fixture document and metadata;
- loads or normalizes it through the supported Python JSON path;
- optionally exercises equivalent environment-variable input for alias fixtures;
- passes normalized data through
ConnectionManager,AgentAuthConfiguration, and applicable application configuration; - returns a stable machine-readable result with validity, normalized values, warnings, and safe paths;
- never returns secret values.
Suggested command:
python eng/configuration_contract_adapter.py <fixture-directory>
Fixture conformance
Run shared fixtures through:
- the shared schema and Python manifest;
- the new JSON normalization boundary;
load_configuration_from_envfor environment-equivalence fixtures;- real connection and authorization classes;
- existing coercion utilities.
Add Python-specific fixture expectations for:
- upper-case and legacy environment aliases;
- raw string-to-boolean/integer/list coercion;
- required
SERVICE_CONNECTIONcompatibility and canonical connection names; - Python authentication type spellings;
- provider-settings pass-through behavior;
- supported certificate representation;
- recognized but unsupported shared fields;
- secret-safe diagnostics.
Build integration
Invoke the central reusable workflow for relevant PRs and run the adapter before pytest. Start in warning mode for pre-existing differences; fail newly introduced disagreement between the Python manifest, shared fixtures, and runtime behavior.
Do not copy the central schema, manifests, or fixtures into this repository.
Compatibility requirements
- Preserve existing environment-variable loading and aliases.
- Define JSON/environment precedence explicitly and test it.
- Avoid adding Pydantic or replacing existing public configuration classes solely for this work.
- Do not introduce network access into runtime configuration loading.
- Do not expose secrets through adapter output or validation errors.
- Generated Python profile schemas, if used, remain derived artifacts.
Acceptance criteria
- A supported Python JSON configuration normalization/loading path is implemented and documented.
- The Python capability manifest accurately classifies the initial shared field inventory.
- A repository-internal fixture adapter is implemented.
- Shared valid, invalid, and runtime-specific fixtures execute through real Python configuration consumers.
- JSON and equivalent environment configurations normalize consistently where promised.
- Source precedence, aliases, coercion, defaults, and provider settings are covered.
- Unsupported fields produce stable warning/error identifiers and safe paths.
- The central reusable workflow runs for relevant Python PRs.
- Existing package builds, pytest suites, and samples remain green.
- Any generated Python schema is reproducible from the shared schema plus manifest.
- 主要语言
- Python
- 星标
- 211
- 派生
- 90
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 16
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/Agents-for-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
microsoft/Agents-for-python#595 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 38/100
microsoft/Agents-for-python#601 ·
维护者通常 1 天内回复
-
Feedback-Loop buttons and Generated-by-AI label not showing when ending a streaming可能已有人在做 @ceciliaavila 于 8 天前认领。 未关闭
microsoft/Agents-for-python#587 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Port: Extend IStorage interface to support new operations可能重新可做 @sw-joelmut 于 32 天前认领,目前没有进行中的 PR。 未关闭
microsoft/Agents-for-python#559 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Create `AttachmentDownloader` and `M365AttachmentDownloader` implementing `InputFileDownloader` abstract class可能已有人在做 @rodrigobr-msft 于 11 天前认领。 未关闭
microsoft/Agents-for-python#550 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 microsoft/Agents-for-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
gradio-app/gradio#13895 ·
维护者通常 1 天内回复
-
build-error
难度 2/5 1-3 小时 新手友好度 76/100
spack/spack-packages#6713 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
ActivityWatch/activitywatch#1464 · 1 个 reaction ·
维护者通常 1 天内回复
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search results未关闭
难度 2/5 1-3 小时 新手友好度 78/100
bytedance/trae-agent#483 ·
维护者通常 1 天内回复