Skip to content

Commit e5ae3f4

Browse files
authored
Release AIKernel.Control v0.1.2 execution control plane (#3)
## Summary This PR releases AIKernel.Control v0.1.2 as the physical execution and governance control plane. ## Changes - Aligns Control packages with AIKernel.NET and AIKernel.Core v0.1.2. - Stabilizes Control Core, CPU, GPU boundary, Emulator, Diagnostics, and policy adapter surfaces. - Keeps CTG/Gate logic delegated to Core and preserves Control as orchestration. - Prepares the renamed community-facing package family for official release. ## Validation - dotnet restore - dotnet build - dotnet test ## Release This PR prepares AIKernel.Control v0.1.2 package publication and GitHub release.
1 parent aba6f92 commit e5ae3f4

98 files changed

Lines changed: 5847 additions & 288 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/publish-pypi.yml‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Publish Python package to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
- "py-aikernel-governance-*"
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
name: Build aikernel-governance
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
working-directory: python
20+
steps:
21+
- name: Check out repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
29+
- name: Install build tooling
30+
run: python -m pip install --upgrade build twine
31+
32+
- name: Build distributions
33+
run: python -m build --sdist --wheel --outdir dist
34+
35+
- name: Check distributions
36+
run: python -m twine check dist/*
37+
38+
- name: Upload distributions
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: pypi-dist-aikernel-governance
42+
path: python/dist/*
43+
if-no-files-found: error
44+
45+
publish:
46+
name: Publish aikernel-governance
47+
runs-on: ubuntu-latest
48+
needs: build
49+
environment:
50+
name: pypi
51+
permissions:
52+
contents: read
53+
id-token: write
54+
steps:
55+
- name: Download distributions
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: pypi-dist-aikernel-governance
59+
path: dist
60+
61+
- name: Show trusted publisher claims
62+
run: |
63+
echo "PyPI project: aikernel-governance"
64+
echo "Expected owner: AIKernel-NET"
65+
echo "Expected repository: AIKernel.Control"
66+
echo "Expected workflow: publish-pypi.yml"
67+
echo "Expected environment: pypi"
68+
echo "Actual repository: ${GITHUB_REPOSITORY}"
69+
echo "Actual workflow ref: ${GITHUB_WORKFLOW_REF}"
70+
echo "Actual ref: ${GITHUB_REF}"
71+
- name: Publish distributions to PyPI
72+
uses: pypa/gh-action-pypi-publish@release/v1

‎AIKernel.Control.slnx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<Solution>
2+
<Project Path="src/AIKernel.Control/AIKernel.Control.csproj" />
23
<Project Path="src/AIKernel.Control.Core/AIKernel.Control.Core.csproj" />
34
<Project Path="src/AIKernel.Control.CPU/AIKernel.Control.CPU.csproj" />
45
<Project Path="src/AIKernel.Control.Diagnostics/AIKernel.Control.Diagnostics.csproj" />

‎Directory.Build.props‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
<Nullable>enable</Nullable>
55
<ImplicitUsings>enable</ImplicitUsings>
66

7-
<Version>0.1.1</Version>
8-
<PackageVersion>0.1.1</PackageVersion>
9-
<AssemblyVersion>0.1.1.0</AssemblyVersion>
10-
<FileVersion>0.1.1.0</FileVersion>
11-
<InformationalVersion>0.1.1</InformationalVersion>
7+
<StablePackageVersion>0.1.2</StablePackageVersion>
8+
<LocalPackageVersionPrefix>0.1.2</LocalPackageVersionPrefix>
9+
<LocalPackageBuildNumber Condition="'$(LocalPackageBuildNumber)' == ''">0</LocalPackageBuildNumber>
10+
<UseLocalPackageVersion Condition="'$(UseLocalPackageVersion)' == ''">false</UseLocalPackageVersion>
11+
<PackageVersion Condition="'$(UseLocalPackageVersion)' == 'true'">$(LocalPackageVersionPrefix)-dev$(LocalPackageBuildNumber)</PackageVersion>
12+
<PackageVersion Condition="'$(UseLocalPackageVersion)' != 'true'">$(StablePackageVersion)</PackageVersion>
13+
<Version>$(PackageVersion)</Version>
14+
<AssemblyVersion>$(StablePackageVersion)</AssemblyVersion>
15+
<FileVersion>$(StablePackageVersion)</FileVersion>
16+
<InformationalVersion>$(PackageVersion)</InformationalVersion>
1217
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1318

1419
<Authors>Takuya Sogawa</Authors>
@@ -20,12 +25,14 @@
2025
<PackageTags>aikernel;control-plane;governance;semantic-runtime;execution-engine;bonsai;emulator;cpu;gpu;diagnostics;replay;pythonnet</PackageTags>
2126
<PackageReadmeFile>README.md</PackageReadmeFile>
2227
<PackageIcon>aikernel-logo128x128.png</PackageIcon>
23-
<Description>AIKernel.Control package family v0.1.1. Provides the physical execution and governance layer for AIKernel semantic execution graphs, including Control Core, CPU, Emulator, GPU boundary, Diagnostics, and Python governance wrapper support.</Description>
28+
<Description>AIKernel.Control package family v0.1.2. Provides the physical execution and governance layer for AIKernel semantic execution graphs, including Control Core, CPU, Emulator, GPU boundary, Diagnostics, and synchronized Python wrapper support.</Description>
2429
<PackageReleaseNotes>
25-
AIKernel.Control package family v0.1.1 - Release aligned with official AIKernel.NET and AIKernel.Core 0.1.1 packages. Provides ControlExecutionRequest/Result/Snapshot contract usage, Bonsai built-in provider boundary, deterministic ControlEmulator, Q1_0 CPU kernel, GPU delegate contract, diagnostics replay records, documentation, and the aikernel-governance Python wrapper with bundled managed assemblies.
30+
AIKernel.Control package family v0.1.2 - Release build aligned with official AIKernel.NET contract packages v0.1.2, AIKernel.Core v0.1.2, synchronized Python wrapper package aikernel-governance v0.1.2, and local development package outputs using 0.1.2-dev{build-number}.
2631
</PackageReleaseNotes>
2732

28-
<AIKernelPackageVersion>[0.1.1]</AIKernelPackageVersion>
33+
<AIKernelContractPackageVersion Condition="'$(AIKernelContractPackageVersion)' == ''">[$(StablePackageVersion)]</AIKernelContractPackageVersion>
34+
<AIKernelCorePackageVersion Condition="'$(AIKernelCorePackageVersion)' == ''">[0.1.2]</AIKernelCorePackageVersion>
35+
<AIKernelPackageVersion Condition="'$(AIKernelPackageVersion)' == ''">$(AIKernelContractPackageVersion)</AIKernelPackageVersion>
2936
</PropertyGroup>
3037

3138
<ItemGroup>

‎NuGet.config‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
6+
</packageSources>
7+
</configuration>

‎README-ja.md‎

Lines changed: 58 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Runtime 依存になることを防ぎます。
3636
Control は AIKernel.Demo に依存しません。Demo は Control を利用する側であり、
3737
Control は独立した Runtime Surface として動作します。
3838

39-
AIKernel.Control は、2026-06-10 に予定している 0.1.1 Release Validation
40-
Phase に参加します。AIKernel の Semantic Graph を物理実行エンジンへつなぐ
41-
経路を検証しつつ、その責務を AIKernel.Demo へ移さないことを保証します。
39+
AIKernel.Control 0.1.2 は AIKernel.Core 0.1.2 と同じ開発方針に従います。
40+
NuGet package と同期した Python wrapper を公開し、local development package には
41+
`0.1.2-dev{build-number}` を使います。
4242

4343
## クイックスタート
4444

@@ -47,9 +47,15 @@ GPU や model asset を bind する前に、deterministic な Emulator と CPU p
4747
経由で mount します。
4848

4949
```bash
50-
dotnet add package AIKernel.Control.Core --version 0.1.1
51-
dotnet add package AIKernel.Control.CPU --version 0.1.1
52-
dotnet add package AIKernel.Control.Emulator --version 0.1.1
50+
dotnet add package AIKernel.Control --version 0.1.2
51+
```
52+
53+
host の依存面を小さくしたい場合のみ、split package を直接導入します。
54+
55+
```bash
56+
dotnet add package AIKernel.Control.Core --version 0.1.2
57+
dotnet add package AIKernel.Control.CPU --version 0.1.2
58+
dotnet add package AIKernel.Control.Emulator --version 0.1.2
5359
```
5460

5561
repository surface を検証します。
@@ -75,18 +81,42 @@ var engine = new ControlEmulatorEngine(
7581
これは Control の最小入口です。deterministic scheduling と明示的な policy boundary を
7682
確認してから、CPU、diagnostics、GPU package へ進んでください。
7783

84+
## CTG Control Governance
85+
86+
AIKernel.Control は `Apply Policy` pipeline stage で Canonical Triadic Governance を
87+
opt-in 接続できます。Control は CTG gate rule を所有しません。provider vote material を
88+
`CouncilVote` / `CouncilDecision` へ正規化し、vote-only の `GateInput` を抽出し、
89+
`IDecisionGate` / `ITrajectoryGate` 経由で AIKernel.Core へ評価を委譲します。
90+
91+
CTG Control surface は意図的に狭く保ちます。
92+
93+
- `GateInput` は `Logos`、`Ethos`、`Pathos` の 3 vote のみを保持します。
94+
- Control、Diagnostics、Emulator は approve count、veto 条件、trajectory halt
95+
aggregation を計算しません。
96+
- confidence、risk、score のような continuous provider carrier は Control CTG
97+
vote-output surface では受け取りません。
98+
- Provider registry fallback は明示的です。provider が見つからない場合は `Unknown`
99+
vote、複数一致は deterministic error、fallback routing は opt-in のみに限定します。
100+
101+
[CTG Control integration](docs/development/control-ctg-ja.md) も参照してください。
102+
78103
## プロジェクト構成
79104

105+
- `AIKernel.Control` - Control Core、CPU、Emulator、Diagnostics、GPU boundary を
106+
導入する dependency-only の入口 package です。
80107
- `AIKernel.Control.Core` - Control Plane の Runtime Entry Package です。
81108
共有契約は `AIKernel.Abstractions.Control` と `AIKernel.Dtos.Control` にあり、
82109
このプロジェクトはそれらを参照します。CPU / GPU / Emulator 実装が
83110
Interface や DTO を重複定義しないための境界です。
84111
Capability manifest は Control 固有の descriptor DTO ではなく、
85-
`AIKernel.Dtos.Capabilities.CapabilityModuleDescriptor` を使用します。
112+
`AIKernel.Dtos.Capabilities.CapabilityModuleDescriptor` を使用します。CTG の
113+
provider vote adapter、coordinator、opt-in policy adapter、DI extension も
114+
提供します。
86115
- `AIKernel.Control.Emulator` - ControlEmulator です。AIKernel `ExecutionGraph`
87116
を CPU-only Runtime で決定論的に実行します。Bonsai そのものを模倣する
88117
Emulator ではありません。step-by-step 実行、breakpoint、watch、trace、
89-
deterministic replay を扱います。
118+
deterministic replay を扱います。Core evaluator の結果と比較する CTG dry-run
119+
scenario も含みますが、gate logic は複製しません。
90120
- `AIKernel.Control.CPU` - Bonsai Node を CPU Operator へマッピングする
91121
CPU 実行エンジンです。SIMD / AVX 最適化、ThreadPool / TaskGraph 実行を
92122
担当します。
@@ -95,12 +125,15 @@ var engine = new ControlEmulatorEngine(
95125
stream / event orchestration、graph execution を担当します。
96126
- `AIKernel.Control.Diagnostics` - Observability レイヤーです。
97127
Graph visualization、node timing、CPU / GPU load inspection、ReplayLog
98-
integration を担当します。
128+
integration、CTG trace / replay metadata formatting を担当します。
99129

100-
## Python Package
130+
## Python Wrapper 参照
101131

102132
`aikernel-governance` は、AIKernel.Control の public governance surface を
103-
Python から扱うための wrapper package です。
133+
Python から扱うために予約している wrapper 名です。
134+
135+
0.1.2 development line では 同期 Python wrapper を公開します。既存の
136+
Python 関連資料は、参考および将来明示的に予定される Python release のために残します。
104137

105138
C# package の境界を、単一の Python API として公開します。
106139

@@ -111,9 +144,9 @@ C# package の境界を、単一の Python API として公開します。
111144
- CPU kernel と diagnostics wrapper
112145
- managed assembly discovery と pythonnet loading
113146

114-
Python package は Control internals、scheduler logic、provider execution、
115-
CPU / GPU kernel を Python で再実装しません。C# assembly を同梱し、公開
116-
managed contract を呼び出す薄い wrapper layer として機能します。
147+
Python wrapper design は Control internals、scheduler logic、provider execution、
148+
CPU / GPU kernel を Python で再実装しません。公開 managed contract の上に置く
149+
薄い wrapper layer として扱います。
117150

118151
## Built-in Bonsai Model
119152

@@ -126,7 +159,7 @@ managed contract を呼び出す薄い wrapper layer として機能します。
126159
バインドします。
127160

128161
初期化と実行の状態は `IControlStateObserver` を通じて、以下のような
129-
決定論的 Phase Snapshot として通知されます。
162+
決定論的な execution state snapshot として通知されます。
130163

131164
- `ModelDownload`
132165
- `Initializing`
@@ -166,6 +199,7 @@ Control はモデル重みやローカルモデルファイルを所有しませ
166199
- [Execution engine](docs/execution-engine/index-ja.md)
167200
- [Q1_0 CPU execution kernel](docs/execution-engine/q1-0-cpu-kernel-ja.md)
168201
- [Control pipelines](docs/pipelines/index-ja.md)
202+
- [CTG Control integration](docs/development/control-ctg-ja.md)
169203
- [Licensing](docs/licensing/index-ja.md)
170204

171205
## 設計方針
@@ -208,33 +242,24 @@ dotnet build AIKernel.Control.slnx
208242

209243
## パッケージインストール
210244

211-
.NET host では NuGet package を使用します。
245+
.NET host では標準 Control surface の入口 package を使用します。
212246

213247
```bash
214-
dotnet add package AIKernel.Control.Core --version 0.1.1
215-
dotnet add package AIKernel.Control.CPU --version 0.1.1
216-
dotnet add package AIKernel.Control.Emulator --version 0.1.1
217-
dotnet add package AIKernel.Control.Diagnostics --version 0.1.1
218-
dotnet add package AIKernel.Control.GPU --version 0.1.1
248+
dotnet add package AIKernel.Control --version 0.1.2
219249
```
220250

221-
Python host では PyPI package を使用します。
251+
依存面を小さくしたい host だけが split package を直接導入します。
222252

223253
```bash
224-
pip install aikernel-governance
225-
```
226-
227-
Python module は `aikernel_governance` として import します。
228-
229-
```python
230-
from aikernel_governance import ExecutionRequest, GovernanceClient
254+
dotnet add package AIKernel.Control.Core --version 0.1.2
255+
dotnet add package AIKernel.Control.CPU --version 0.1.2
256+
dotnet add package AIKernel.Control.Emulator --version 0.1.2
231257
```
232258

233-
wheel は managed AIKernel.Control assemblies を `aikernel_governance/native`
234-
に同梱します。これは public C# contract surface への wrapper であり、
235-
governance semantics を Python で別実装するものではありません。
259+
Python wrapper は 0.1.2 public package line に同期した
260+
`aikernel-governance` として公開します。
236261

237-
package scope、assembly loading、publication guidance は
262+
0.1.2 の package scope と validation flow は
238263
[Python governance wrapper](docs/python/index-ja.md) を参照してください。
239264

240265
## コントリビュータ向けガイドライン

0 commit comments

Comments
 (0)