config_contexts
目录定位
config_contexts/ 是认知引擎的配置上下文契约包,属于 contract_core 背后的公共契约支撑面之一。
它与 behavior_contracts/、schemas/ 平行:
behavior_contracts = 行为契约
schemas = 数据契约
config_contexts = 配置上下文契约
本包负责定义模块最终消费的配置上下文契约与 Config View,使 runtime、workflow、composition、observability、adapter 等模块只依赖被注入的配置消费视图,而不是直接读取配置事实或理解配置装配过程。
本包不是配置事实层,也不是配置装配层:
config/ = 配置事实来源
config_assembly/ = 配置装配与环境覆盖
config_contexts/ = 配置上下文契约与消费视图
职责边界
本包负责:
- 定义模块消费级 Config View。
- 定义配置上下文契约对象。
- 表达配置消费语义、策略、护栏与不变式。
- 为 runtime、workflow、composition、observability、adapter 等模块提供稳定配置消费边界。
- 作为
contract_core公共契约支撑面的一部分,被上层通过契约窗口理解和复用。
本包不负责:
- 不负责直接读取
config/。 - 不负责配置文件加载。
- 不负责环境覆盖装配。
- 不负责运行时系统装配。
- 不负责业务执行。
- 不负责外部 SDK 调用。
- 不作为普通业务数据模型仓库替代
schemas/。
与其他层的关系
与 contract_core 的关系
contract_core/是公共契约入口。config_contexts/是contract_core背后的正式契约支撑面之一。- 后续对外表达时,应把
config_contexts/归入公共契约支撑面,而不是归入配置实现层。
与 behavior_contracts 的关系
behavior_contracts/定义行为能力契约。config_contexts/定义行为实现、运行组织与装配过程所需的配置消费契约。- 二者同属公共契约支撑面,分别回答“能做什么”和“在什么配置上下文中做”。
与 schemas 的关系
schemas/负责普通跨模块数据契约。config_contexts/负责配置消费上下文契约与 Config View。- 配置上下文对象默认归属
config_contexts/,不应混入普通业务数据契约。
与 config_assembly 的关系
config_assembly/负责把配置事实与环境覆盖装配为标准配置载荷。config_contexts/基于标准配置载荷定义模块可消费的契约化配置视图。config_contexts/不直接读取config/,也不承担装配职责。
与 config/ 的关系
config/是配置事实来源。config_contexts/不直接读取config/。- 配置事实必须先经过装配,再形成配置上下文契约视图供模块消费。
标准链路
config/ → config_assembly → config_contexts → composition/runtime/workflow/observability/adapter
这条链路的含义是:
配置事实
→ 配置装配
→ 配置上下文契约 / Config View
→ 模块消费
硬性规则
config_contexts/必须被视为配置上下文契约包,而不是配置实现层。config_contexts/不得直接读取根目录config/。config_contexts/不得执行配置文件加载与环境覆盖装配。config_contexts/不得承接业务执行逻辑。- 配置上下文对象必须表达清楚消费方、策略语义、护栏与不变式。
- 新增 Config View 时,必须说明其配置事实来源、装配链路、消费模块与注入位置。
- 修改 Config View 时,必须同步评估 behavior_contracts、schemas、contract_core、composition、runtime 与相关 adapter 的影响。
发布面口径
在 v0.5.0 单一发布面表达中,config_contexts/ 应归入:
v0.5.0 正式支撑面 / 公共契约支撑面
不应归入:
历史遗留资产
配置实现层
独立主入口
一句话收口
config_contexts/ 是认知引擎的配置上下文契约包,用于把装配后的配置载荷表达为模块可消费的契约化 Config View,使模块依赖稳定配置上下文,而不是直接依赖配置事实或配置装配过程。
Metadata
Release files for cognition-engine-config-contexts 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_config_contexts-0.5.4.tar.gz | 4.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cognition_engine_config_contexts-0.5.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / cognition_engine_config_contexts-0.5.4.tar.gz
| Download URL | cognition_engine_config_contexts-0.5.4.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a7cd126fb6e19c1430c6013c136709e69006016d7770c5288413283dbc3698b
|
|
BLAKE2b-256 checksum How to use checksums |
ccba72274087498f37f35a033ade658127f5435ea94d8dc78b35d8a782f80f2f
|
| 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_config_contexts-0.5.4-py3-none-any.whl
| Download URL | cognition_engine_config_contexts-0.5.4-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07c6828088f873a055f772108d470cf9504a5a57e68c0dd1be25f2b1911299c0
|
|
BLAKE2b-256 checksum How to use checksums |
3281303912c5a786b31e27653e60ec499334b49664c96f77e0fceee7803a1031
|
| 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-config-contexts 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_config_contexts-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.