M2a:镜树域后端核心——树/节点/引文/归真/移栽全量 API 与 Kernel 完成回调(芽体固化/残答封存),8 用例钉死 PRD 场景 1/2/3/5/6/7/8
This commit is contained in:
1 parent
1cd0069d65
commit
e6a3b7121f
16 files changed
+2002
-74
No files matched your search
@@ -71,24 +71,15 @@ async def emit_seat_event(
|
||||
requester: str | None = None,
|
||||
) -> None:
|
||||
"""事务外发射命台事件(一炁,visibility=internal)。"""
|
||||
from app.modules.runtime.events import Event
|
||||
from app.services.event_store import DbEventStore
|
||||
from app.domains import one_qi
|
||||
|
||||
from app.domains.jingsheng import service as jingsheng_service
|
||||
|
||||
store: DbEventStore | None = jingsheng_service._event_store # noqa: SLF001
|
||||
if store is None:
|
||||
return
|
||||
payload: dict = {"holder": holder, "epoch": epoch}
|
||||
if requester is not None:
|
||||
payload["requester"] = requester
|
||||
await store.append(
|
||||
Event(
|
||||
type=event_type,
|
||||
source="jingsheng",
|
||||
payload=payload,
|
||||
visibility="internal",
|
||||
run_id=None,
|
||||
character_id=character_id,
|
||||
)
|
||||
await one_qi.emit(
|
||||
event_type,
|
||||
character_id=character_id,
|
||||
payload=payload,
|
||||
visibility="internal",
|
||||
source="jingsheng",
|
||||
)
|
||||
Reference in new issue
Block a user