aikernel-tools 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aikernel_tools-0.1.2/PKG-INFO +88 -0
- aikernel_tools-0.1.2/README.md +65 -0
- aikernel_tools-0.1.2/pyproject.toml +64 -0
- aikernel_tools-0.1.2/setup.cfg +4 -0
- aikernel_tools-0.1.2/src/aikernel_tools/__init__.py +61 -0
- aikernel_tools-0.1.2/src/aikernel_tools/api_catalog.py +635 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Abstractions.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Common.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Core.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Dtos.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Enums.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Tools.Capability.RomStorage.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Tools.Inspectors.ChatHistoryScraper.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Tools.Inspectors.KernelClock.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Tools.Inspectors.Vfs.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/AIKernel.Tools.Instrumentation.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/ChatHistoryProvider.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Configuration.Abstractions.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Configuration.Binder.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Configuration.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.DependencyInjection.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Diagnostics.Abstractions.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Diagnostics.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Http.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Logging.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Options.ConfigurationExtensions.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Options.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/Microsoft.Extensions.Primitives.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/YamlDotNet.dll +0 -0
- aikernel_tools-0.1.2/src/aikernel_tools/native/__init__.py +179 -0
- aikernel_tools-0.1.2/src/aikernel_tools/tools/__init__.py +46 -0
- aikernel_tools-0.1.2/src/aikernel_tools/tools/capabilities.py +148 -0
- aikernel_tools-0.1.2/src/aikernel_tools/tools/formatter.py +260 -0
- aikernel_tools-0.1.2/src/aikernel_tools/tools/inspector.py +136 -0
- aikernel_tools-0.1.2/src/aikernel_tools/tools/managed.py +116 -0
- aikernel_tools-0.1.2/src/aikernel_tools/tools/replay.py +80 -0
- aikernel_tools-0.1.2/src/aikernel_tools/tools/session.py +36 -0
- aikernel_tools-0.1.2/src/aikernel_tools.egg-info/PKG-INFO +88 -0
- aikernel_tools-0.1.2/src/aikernel_tools.egg-info/SOURCES.txt +43 -0
- aikernel_tools-0.1.2/src/aikernel_tools.egg-info/dependency_links.txt +1 -0
- aikernel_tools-0.1.2/src/aikernel_tools.egg-info/requires.txt +4 -0
- aikernel_tools-0.1.2/src/aikernel_tools.egg-info/top_level.txt +1 -0
- aikernel_tools-0.1.2/tests/test_tools_contract.py +154 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aikernel-tools
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Python wrapper for AIKernel.Tools v0.1.2 instrumentation contracts with bundled managed assemblies and pythonnet loading.
|
|
5
|
+
Author: Takuya Sogawa
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/AIKernel-NET/AIKernel.Tools
|
|
8
|
+
Project-URL: Repository, https://github.com/AIKernel-NET/AIKernel.Tools
|
|
9
|
+
Project-URL: Documentation, https://aikernel.net/reference/
|
|
10
|
+
Project-URL: Issues, https://github.com/AIKernel-NET/AIKernel.Tools/issues
|
|
11
|
+
Project-URL: Releases, https://github.com/AIKernel-NET/AIKernel.Tools/releases
|
|
12
|
+
Keywords: aikernel,tools,instrumentation,deterministic-debugging,capability,inspector,canonical-formatting,pythonnet
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
Requires-Dist: pythonnet>=3.0.3
|
|
21
|
+
Provides-Extra: test
|
|
22
|
+
Requires-Dist: pytest>=9.0; extra == "test"
|
|
23
|
+
|
|
24
|
+
# aikernel-tools
|
|
25
|
+
|
|
26
|
+
[日本語](README-ja.md)
|
|
27
|
+
|
|
28
|
+
Python wrapper for the public instrumentation surface of AIKernel.Tools.
|
|
29
|
+
|
|
30
|
+
The package bundles the AIKernel.Tools managed assemblies and loads them through
|
|
31
|
+
pythonnet. Python code receives a single API surface for replay facades,
|
|
32
|
+
inspection facades, canonical chat-history formatting, and public capability
|
|
33
|
+
contract descriptors without re-implementing the internal C# semantics.
|
|
34
|
+
|
|
35
|
+
The v0.1.2 package also exposes the generated managed API catalog through
|
|
36
|
+
`managed_api_catalog()`, `managed_api_summary()`, `managed_type_names()`, and
|
|
37
|
+
`find_managed_type(full_name)`.
|
|
38
|
+
|
|
39
|
+
See [Python Tools Wrapper](../docs/python/index.md) for package scope, managed
|
|
40
|
+
assembly bundle requirements, Linux CoreCLR loading, and validation guidance.
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install aikernel-tools
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from aikernel_tools import (
|
|
52
|
+
CanonicalFormatter,
|
|
53
|
+
ChatHistoryRecord,
|
|
54
|
+
InfoCommand,
|
|
55
|
+
MdExporter,
|
|
56
|
+
NowCommand,
|
|
57
|
+
RomExporter,
|
|
58
|
+
RomStorageCapability,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
capability = RomStorageCapability("tools.rom")
|
|
62
|
+
contract = capability.to_contract()
|
|
63
|
+
|
|
64
|
+
formatter = CanonicalFormatter()
|
|
65
|
+
rom = formatter.serialize([
|
|
66
|
+
ChatHistoryRecord("user", "hello", "2026-06-09T00:00:00+00:00")
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
markdown = MdExporter.to_markdown([
|
|
70
|
+
ChatHistoryRecord("assistant", "world", "2026-06-09T00:00:01+00:00")
|
|
71
|
+
])
|
|
72
|
+
history_rom = RomExporter.to_rom(
|
|
73
|
+
[ChatHistoryRecord("assistant", "world", "2026-06-09T00:00:01+00:00")],
|
|
74
|
+
namespace="python",
|
|
75
|
+
name="history",
|
|
76
|
+
)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`ReplayEngine`, `Inspector`, and `CanonicalFormatter` can also delegate to an
|
|
80
|
+
explicit backend object that exposes the same method names. `MdExporter`,
|
|
81
|
+
`RomExporter`, `ChatHistoryScraper`, and the inspector command facades such as
|
|
82
|
+
`NowCommand` / `InfoCommand` mirror the public C# names so Python callers can
|
|
83
|
+
address the same contract surface. This keeps Python as a contract boundary
|
|
84
|
+
while the implementation stays in the configured tooling runtime.
|
|
85
|
+
|
|
86
|
+
The wheel bundles `AIKernel.Tools.Instrumentation.dll`,
|
|
87
|
+
`AIKernel.Tools.Capability.RomStorage.dll`, inspector assemblies, AIKernel.NET
|
|
88
|
+
contract assemblies, AIKernel.Core dependencies, and `ChatHistoryProvider.dll`.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# aikernel-tools
|
|
2
|
+
|
|
3
|
+
[日本語](README-ja.md)
|
|
4
|
+
|
|
5
|
+
Python wrapper for the public instrumentation surface of AIKernel.Tools.
|
|
6
|
+
|
|
7
|
+
The package bundles the AIKernel.Tools managed assemblies and loads them through
|
|
8
|
+
pythonnet. Python code receives a single API surface for replay facades,
|
|
9
|
+
inspection facades, canonical chat-history formatting, and public capability
|
|
10
|
+
contract descriptors without re-implementing the internal C# semantics.
|
|
11
|
+
|
|
12
|
+
The v0.1.2 package also exposes the generated managed API catalog through
|
|
13
|
+
`managed_api_catalog()`, `managed_api_summary()`, `managed_type_names()`, and
|
|
14
|
+
`find_managed_type(full_name)`.
|
|
15
|
+
|
|
16
|
+
See [Python Tools Wrapper](../docs/python/index.md) for package scope, managed
|
|
17
|
+
assembly bundle requirements, Linux CoreCLR loading, and validation guidance.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install aikernel-tools
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
from aikernel_tools import (
|
|
29
|
+
CanonicalFormatter,
|
|
30
|
+
ChatHistoryRecord,
|
|
31
|
+
InfoCommand,
|
|
32
|
+
MdExporter,
|
|
33
|
+
NowCommand,
|
|
34
|
+
RomExporter,
|
|
35
|
+
RomStorageCapability,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
capability = RomStorageCapability("tools.rom")
|
|
39
|
+
contract = capability.to_contract()
|
|
40
|
+
|
|
41
|
+
formatter = CanonicalFormatter()
|
|
42
|
+
rom = formatter.serialize([
|
|
43
|
+
ChatHistoryRecord("user", "hello", "2026-06-09T00:00:00+00:00")
|
|
44
|
+
])
|
|
45
|
+
|
|
46
|
+
markdown = MdExporter.to_markdown([
|
|
47
|
+
ChatHistoryRecord("assistant", "world", "2026-06-09T00:00:01+00:00")
|
|
48
|
+
])
|
|
49
|
+
history_rom = RomExporter.to_rom(
|
|
50
|
+
[ChatHistoryRecord("assistant", "world", "2026-06-09T00:00:01+00:00")],
|
|
51
|
+
namespace="python",
|
|
52
|
+
name="history",
|
|
53
|
+
)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`ReplayEngine`, `Inspector`, and `CanonicalFormatter` can also delegate to an
|
|
57
|
+
explicit backend object that exposes the same method names. `MdExporter`,
|
|
58
|
+
`RomExporter`, `ChatHistoryScraper`, and the inspector command facades such as
|
|
59
|
+
`NowCommand` / `InfoCommand` mirror the public C# names so Python callers can
|
|
60
|
+
address the same contract surface. This keeps Python as a contract boundary
|
|
61
|
+
while the implementation stays in the configured tooling runtime.
|
|
62
|
+
|
|
63
|
+
The wheel bundles `AIKernel.Tools.Instrumentation.dll`,
|
|
64
|
+
`AIKernel.Tools.Capability.RomStorage.dll`, inspector assemblies, AIKernel.NET
|
|
65
|
+
contract assemblies, AIKernel.Core dependencies, and `ChatHistoryProvider.dll`.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "aikernel-tools"
|
|
7
|
+
version = "0.1.2"
|
|
8
|
+
description = "Python wrapper for AIKernel.Tools v0.1.2 instrumentation contracts with bundled managed assemblies and pythonnet loading."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Takuya Sogawa" }
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"aikernel",
|
|
17
|
+
"tools",
|
|
18
|
+
"instrumentation",
|
|
19
|
+
"deterministic-debugging",
|
|
20
|
+
"capability",
|
|
21
|
+
"inspector",
|
|
22
|
+
"canonical-formatting",
|
|
23
|
+
"pythonnet"
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 3 - Alpha",
|
|
27
|
+
"Intended Audience :: Developers",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
30
|
+
"Topic :: Software Development :: Libraries"
|
|
31
|
+
]
|
|
32
|
+
dependencies = [
|
|
33
|
+
"pythonnet>=3.0.3"
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.optional-dependencies]
|
|
37
|
+
test = [
|
|
38
|
+
"pytest>=9.0"
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://github.com/AIKernel-NET/AIKernel.Tools"
|
|
43
|
+
Repository = "https://github.com/AIKernel-NET/AIKernel.Tools"
|
|
44
|
+
Documentation = "https://aikernel.net/reference/"
|
|
45
|
+
Issues = "https://github.com/AIKernel-NET/AIKernel.Tools/issues"
|
|
46
|
+
Releases = "https://github.com/AIKernel-NET/AIKernel.Tools/releases"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools]
|
|
49
|
+
package-dir = { "" = "src" }
|
|
50
|
+
|
|
51
|
+
[tool.setuptools.packages.find]
|
|
52
|
+
where = ["src"]
|
|
53
|
+
|
|
54
|
+
[tool.setuptools.package-data]
|
|
55
|
+
aikernel_tools = [
|
|
56
|
+
"native/*.dll",
|
|
57
|
+
"native/*.so",
|
|
58
|
+
"native/*.dylib",
|
|
59
|
+
"native/*.deps.json"
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
[tool.pytest.ini_options]
|
|
63
|
+
pythonpath = ["src"]
|
|
64
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""[EN]
|
|
2
|
+
Unified Python API for AIKernel.Tools instrumentation contracts.
|
|
3
|
+
|
|
4
|
+
[JA]
|
|
5
|
+
AIKernel.Tools instrumentation 契約を扱う統一 Python API です。
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .api_catalog import (
|
|
9
|
+
ManagedMemberDescriptor,
|
|
10
|
+
ManagedTypeDescriptor,
|
|
11
|
+
find_managed_type,
|
|
12
|
+
managed_api_catalog,
|
|
13
|
+
managed_api_summary,
|
|
14
|
+
managed_type_names,
|
|
15
|
+
)
|
|
16
|
+
from .native import tools_assemblies, load_tools_runtime
|
|
17
|
+
from .tools import (
|
|
18
|
+
CanonicalFormatter,
|
|
19
|
+
CanonicalSerializer,
|
|
20
|
+
CapabilityContract,
|
|
21
|
+
ChatHistoryRecord,
|
|
22
|
+
ChatHistoryScraper,
|
|
23
|
+
InfoCommand,
|
|
24
|
+
Inspector,
|
|
25
|
+
MdExporter,
|
|
26
|
+
NowCommand,
|
|
27
|
+
ReplayEngine,
|
|
28
|
+
ReplaySession,
|
|
29
|
+
RomExporter,
|
|
30
|
+
RomStorageCapability,
|
|
31
|
+
TimelineCommand,
|
|
32
|
+
TreeCommand,
|
|
33
|
+
VfsGitCapability,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"ManagedMemberDescriptor",
|
|
38
|
+
"ManagedTypeDescriptor",
|
|
39
|
+
"find_managed_type",
|
|
40
|
+
"managed_api_catalog",
|
|
41
|
+
"managed_api_summary",
|
|
42
|
+
"managed_type_names",
|
|
43
|
+
"CanonicalFormatter",
|
|
44
|
+
"CanonicalSerializer",
|
|
45
|
+
"CapabilityContract",
|
|
46
|
+
"ChatHistoryRecord",
|
|
47
|
+
"ChatHistoryScraper",
|
|
48
|
+
"InfoCommand",
|
|
49
|
+
"Inspector",
|
|
50
|
+
"MdExporter",
|
|
51
|
+
"NowCommand",
|
|
52
|
+
"ReplayEngine",
|
|
53
|
+
"ReplaySession",
|
|
54
|
+
"RomExporter",
|
|
55
|
+
"RomStorageCapability",
|
|
56
|
+
"TimelineCommand",
|
|
57
|
+
"TreeCommand",
|
|
58
|
+
"VfsGitCapability",
|
|
59
|
+
"load_tools_runtime",
|
|
60
|
+
"tools_assemblies",
|
|
61
|
+
]
|