aikernel-governance is the Python distribution for the public AIKernel.Control
governance surface in the v0.1.2 canonical series.
The wrapper sits over the C# packages; it is not a Python reimplementation of Control or CTG. It exposes a single import surface:
from aikernel_governance import (
ExecutionRequest,
ExecutionResult,
Snapshot,
ProviderContract,
GovernanceClient,
)Stable install, after publication opens:
pip install aikernel-governance==0.1.2Local validation uses 0.1.2.dev{buildNumber} wheels. Do not create stable
0.1.2 artifacts until the release task explicitly requests them.
The package exposes public Control contracts and public wrapper types:
ExecutionRequestExecutionResultSnapshotSnapshotMetadataProviderContractGovernanceClient- Bonsai provider, model, tokenizer, and model-state wrappers
- Emulator graph, node, scheduler, policy, and engine wrappers
- CPU kernel wrapper
- Diagnostics replay approval wrapper
- GPU delegate contract loader
- generated managed API catalog helpers
It does not expose internal governance engine helpers, transport-specific code, OS-specific implementations, private runtime internals, or CTG Gate rules.
The wheel bundles or resolves the Control and contract assemblies under
aikernel_governance/native:
AIKernel.Abstractions.dllAIKernel.Dtos.dllAIKernel.Enums.dllAIKernel.Control.Core.dllAIKernel.Control.CPU.dllAIKernel.Control.Diagnostics.dllAIKernel.Control.Emulator.dllAIKernel.Control.GPU.dll
governance_assemblies() resolves bundled assemblies first, then paths from
AIKERNEL_GOVERNANCE_ASSEMBLY_PATH, then matching NuGet packages from the
global packages cache.
load_governance_runtime() loads the resolved assemblies through pythonnet.
The v0.1.2 package exposes the generated managed API catalog through
managed_api_catalog(), managed_api_summary(), managed_type_names(), and
find_managed_type(full_name).
py -m compileall python\src python\tests
py -m pytest python\tests
py -m build --wheelPyPI publication uses GitHub Actions Trusted Publishing and the pypi
environment.
The PyPI Trusted Publisher for the aikernel-governance project must match the GitHub OIDC claims emitted by this repository:
| Field | Value |
|---|---|
| PyPI project | aikernel-governance |
| Owner | AIKernel-NET |
| Repository | AIKernel.Control |
| Workflow | publish-pypi.yml |
| Environment | pypi |
If PyPI reports invalid-publisher, do not change the workflow to token credentials. Fix the PyPI project Trusted Publisher entry so it matches the table above, then rerun the failed publish job.