refactor(agent-runner): tighten protocol v1 runtime boundaries

This commit is contained in:
huanghuoguoguo
2026-05-25 10:34:16 +08:00
parent 90dffa7cd8
commit 9330a684fe
26 changed files with 548 additions and 3291 deletions
@@ -37,6 +37,9 @@ class AgentEventEnvelope(pydantic.BaseModel):
source: str
"""Event source (platform, webui, api, scheduler, system)."""
source_event_type: str | None = None
"""Original source event type, when available."""
bot_id: str | None = None
"""Bot UUID handling this event."""
@@ -64,6 +67,9 @@ class AgentEventEnvelope(pydantic.BaseModel):
raw_ref: RawEventRef | None = None
"""Reference to raw event payload."""
data: dict[str, typing.Any] = pydantic.Field(default_factory=dict)
"""Small structured event payload. Large payloads should be referenced via raw_ref/artifacts."""
# Binding scope types
class BindingScope(pydantic.BaseModel):