feat(kernel): 状态机改进

This commit is contained in:
2026-01-03 05:05:41 +08:00
parent f2d91b0164
commit 32cd44b8e7
19 changed files with 428 additions and 140 deletions

View File

@@ -1,9 +1,5 @@
import json
import pathlib
import typing
from typing import TypedDict
import toml
from heurams.services.logger import get_logger
@@ -22,6 +18,7 @@ class AtomRegister_runtime(TypedDict):
class AtomRegister(TypedDict):
nucleon: Nucleon
electron: Electron
orbital: dict
runtime: AtomRegister_runtime
@@ -99,3 +96,8 @@ class Atom:
if key == "ident":
raise AttributeError("应为只读")
self.registry[key] = value
def __repr__(self):
from pprint import pformat
s = pformat(self.registry, indent=4)
return s