refactor: own shutdown lifecycle boundaries

This commit is contained in:
jxxghp
2026-08-23 20:20:26 +08:00
parent 59f020f226
commit 7f09927c47
59 changed files with 6393 additions and 958 deletions
+5 -2
View File
@@ -3,12 +3,15 @@
from __future__ import annotations
from collections.abc import Callable
from typing import Any, Protocol
from typing import Any, ContextManager, Protocol
class PluginRuntime(Protocol):
"""声明入口层消费的插件宿主能力。"""
def mutation(self, operation: str) -> ContextManager[None]:
"""为完整插件可变事务取得停机准入 lease。"""
...
def __getattr__(self, name: str) -> Any:
"""允许兼容门面按既有 V3 方法名访问插件宿主能力。"""