a2ui-project / a2ui-project/a2ui
Versioning incompatibiltiy in agent SDK
- 主要語言
- TypeScript
- 星號
- 16.4k
- 分支
- 1.3k
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 134
描述
- `A2uiSchemaManager` supports multiple versions via the constructor parameter. This is used to create the system instructions.
- Validators like `A2uiMessageListWrapper` (and other files in `src/a2ui/core/schema/*.py`) are codegened from a *specific* version of a schema. This is defined in [`SPEC_VERSION`](https://github.com/a2ui-project/a2ui/blob/a3f50cde04f2e9e26d6cd5246b1dbb0b81bb9577/agent_sdks/python/a2ui_core/scripts/generate_schemas.py#L22-L23)
This is problematic because a client can call the former with a specific version of `A2uiSchemaManager` that is incompatible with the latter.
It's somewhat mitigated because the files in `src/a2ui/core/schema/*.py` are private(?). And there's a router in https://github.com/a2ui-project/a2ui/blob/a3f50cde04f2e9e26d6cd5246b1dbb0b81bb9577/agent_sdks/python/a2ui_agent/src/a2ui/schema/validator.py#L210-L228.
But this points towards us having two kinds of validation (with pydantic and also json schema).
貢獻指南
評估
這個 Issue 還沒有評估資料。