adk_adapter
目录定位
adk_adapter 是认知引擎四层架构中的 ADK 能力适配实现层。
它不是新的公共契约中心,而是公共契约中标准接口的具体实现包。
它当前通过 AdkWorkflowRunner 实现公共契约层中的 WorkflowRunner。
当前职责
adk_adapter 当前负责:
- 在内部调用
google-adk。 - 将 ADK Workflow、Runner、Event、Session 等原生对象映射为认知引擎标准对象。
- 对外输出
WorkflowResult、RuntimeEvent、InvocationRef、ArtifactDelta等公共事实。 - 隔离
google-adk依赖与版本变化。
adk_adapter 当前不负责:
- 不定义公共契约。
- 不替代
runtime_container。 - 不替代
contract_core。 - 不替代
observability_hub。 - 不做万能
ADKRuntime总接口。
对外边界
ADK Event、Runner、Workflow、Session 等原生对象仅在 adk_adapter 内部处理。
因此:
adk_adapter对外不输出 ADK 原生对象作为公共交互契约。- 其他模块应只依赖
WorkflowRunner、WorkflowResult、RuntimeEvent等公共契约。 runtime_container不应直接 importgoogle.adk原生对象。runtime_container不应直接依赖adk_adapter实现细节。
装配根或测试可以直接识别具体 adapter 实现,但普通模块之间不应直接耦合实现细节。
第一批实现范围
当前第一批范围收敛为:
AdkWorkflowRunner
AdkEventMapper
AdkInvocationMapper
AdkArtifactMapper
这些对象属于模块内部实现细节。
对应职责为:
AdkWorkflowRunner:实现公共契约中的WorkflowRunner。AdkEventMapper:把 ADK Event 映射为RuntimeEvent。AdkInvocationMapper:把 ADK invocation / session 事实映射为InvocationRef或 metadata。AdkArtifactMapper:处理 artifact delta 候选映射边界。
当前真实链路状态
截至 v0.5.0 当前阶段,以下事实已经成立:
adk_adapter已作为 ADK 能力实现层落地。runtime_container -> adk_adapter真实链路已通过测试验证。- 四层最小闭环已通过测试复验成立。
当前真实链路口径为:
contract_core
-> runtime_container
-> WorkflowRunner
-> adk_adapter.AdkWorkflowRunner
-> ADK Workflow / Runner
-> WorkflowResult / RuntimeEvent
当前限制
当前仍需保持以下保守表述:
- 不宣称
adk_adapter已产品化承接全部 ADK 能力面。 - 不宣称 artifact 真实链路已经完整。
- 不宣称正式 ADK-backed 装配入口已经产品化。
- 不把 ADK 专属细节上升为公共契约层。
第一批稳定运行样例当前采用自定义 BaseNode._run_impl 路线。
FunctionNode 暂不作为第一批稳定路径。
架构规则
adk_adapter 应遵守以下规则:
- 公共契约层是模块间交互的唯一稳定窗口。
- 实现模块不直接互相依赖实现细节。
- 模块内部模型可以存在,但不能被其他模块直接依赖。
- 模块内部模型一旦被两个以上模块稳定消费,必须评估是否上升为公共契约。
- 外部能力适配模块不必拥有独立公共契约层,只要实现公共契约中的标准接口,即可通过装配根被注入系统。
当前阶段说明
adk_adapter 当前口径应统一为:
ADK 能力适配实现层
= 实现公共契约中的 WorkflowRunner
= 内部处理 ADK 原生对象与 RuntimeEvent / WorkflowResult 映射
= ADK 专属细节不进入公共契约层
Metadata
Release files for cognition-engine-adk-adapter 0.5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cognition_engine_adk_adapter-0.5.4.tar.gz | 6.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cognition_engine_adk_adapter-0.5.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / cognition_engine_adk_adapter-0.5.4.tar.gz
| Download URL | cognition_engine_adk_adapter-0.5.4.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c1ca82ef296b527e3d0ac9ee4a82cdbe2e614c24c87d8f3c9d5c0136bf2134c
|
|
BLAKE2b-256 checksum How to use checksums |
28b3039ed0d95ed6c97453f42120c2485edf8f2fabb9af3729694695dc6b6a74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 5, 2026.
Transparency logRelease files / cognition_engine_adk_adapter-0.5.4-py3-none-any.whl
| Download URL | cognition_engine_adk_adapter-0.5.4-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7b2171ce7ff7740902587d83e068490fe3b73ca1926844e9baf332f2550a0e2
|
|
BLAKE2b-256 checksum How to use checksums |
209828bdd12a4d2cc102b5444645913e6bebb6f528a14ffede9840fb838d1423
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 5, 2026.
Transparency logSecurity for cognition-engine-adk-adapter 0.5.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cognition_engine_adk_adapter-0.5.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.