Skip to main content

adk_adapter

目录定位

adk_adapter 是认知引擎四层架构中的 ADK 能力适配实现层。

它不是新的公共契约中心,而是公共契约中标准接口的具体实现包。

它当前通过 AdkWorkflowRunner 实现公共契约层中的 WorkflowRunner。

当前职责

adk_adapter 当前负责:

  1. 在内部调用 google-adk。
  2. 将 ADK Workflow、Runner、Event、Session 等原生对象映射为认知引擎标准对象。
  3. 对外输出 WorkflowResult、RuntimeEvent、InvocationRef、ArtifactDelta 等公共事实。
  4. 隔离 google-adk 依赖与版本变化。

adk_adapter 当前不负责:

  1. 不定义公共契约。
  2. 不替代 runtime_container。
  3. 不替代 contract_core。
  4. 不替代 observability_hub。
  5. 不做万能 ADKRuntime 总接口。

对外边界

ADK Event、Runner、Workflow、Session 等原生对象仅在 adk_adapter 内部处理。

因此:

  1. adk_adapter 对外不输出 ADK 原生对象作为公共交互契约。
  2. 其他模块应只依赖 WorkflowRunner、WorkflowResult、RuntimeEvent 等公共契约。
  3. runtime_container 不应直接 import google.adk 原生对象。
  4. runtime_container 不应直接依赖 adk_adapter 实现细节。

装配根或测试可以直接识别具体 adapter 实现,但普通模块之间不应直接耦合实现细节。

第一批实现范围

当前第一批范围收敛为:

AdkWorkflowRunner
AdkEventMapper
AdkInvocationMapper
AdkArtifactMapper

这些对象属于模块内部实现细节。

对应职责为:

  1. AdkWorkflowRunner:实现公共契约中的 WorkflowRunner。
  2. AdkEventMapper:把 ADK Event 映射为 RuntimeEvent。
  3. AdkInvocationMapper:把 ADK invocation / session 事实映射为 InvocationRef 或 metadata。
  4. AdkArtifactMapper:处理 artifact delta 候选映射边界。

当前真实链路状态

截至 v0.5.0 当前阶段,以下事实已经成立:

  1. adk_adapter 已作为 ADK 能力实现层落地。
  2. runtime_container -> adk_adapter 真实链路已通过测试验证。
  3. 四层最小闭环已通过测试复验成立。

当前真实链路口径为:

contract_core
-> runtime_container
-> WorkflowRunner
-> adk_adapter.AdkWorkflowRunner
-> ADK Workflow / Runner
-> WorkflowResult / RuntimeEvent

当前限制

当前仍需保持以下保守表述:

  1. 不宣称 adk_adapter 已产品化承接全部 ADK 能力面。
  2. 不宣称 artifact 真实链路已经完整。
  3. 不宣称正式 ADK-backed 装配入口已经产品化。
  4. 不把 ADK 专属细节上升为公共契约层。

第一批稳定运行样例当前采用自定义 BaseNode._run_impl 路线。

FunctionNode 暂不作为第一批稳定路径。

架构规则

adk_adapter 应遵守以下规则:

  1. 公共契约层是模块间交互的唯一稳定窗口。
  2. 实现模块不直接互相依赖实现细节。
  3. 模块内部模型可以存在,但不能被其他模块直接依赖。
  4. 模块内部模型一旦被两个以上模块稳定消费,必须评估是否上升为公共契约。
  5. 外部能力适配模块不必拥有独立公共契约层,只要实现公共契约中的标准接口,即可通过装配根被注入系统。

当前阶段说明

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)

Source distribution for cognition-engine-adk-adapter 0.5.4
File Size Uploaded Provenance
cognition_engine_adk_adapter-0.5.4.tar.gz 6.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cognition-engine-adk-adapter 0.5.4
File Interpreter ABI Platform
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page