fix(sdk): harden host integration contracts
This commit is contained in:
@@ -58,8 +58,8 @@ class AgentTurnHookContext:
|
||||
message_id: str | None = None
|
||||
session_key: str | None = None
|
||||
metadata: dict[str, Any] = field(default_factory=dict)
|
||||
attributes: dict[str, Any] = field(default_factory=dict)
|
||||
ephemeral: bool = False
|
||||
attributes: dict[str, Any] = field(default_factory=dict)
|
||||
|
||||
|
||||
class AgentHook:
|
||||
|
||||
@@ -26,10 +26,10 @@ class RequestContext:
|
||||
original_user_text: str | None = None
|
||||
runtime: LLMRuntime | None = None
|
||||
metadata: dict[str, Any] = field(default_factory=dict)
|
||||
attributes: dict[str, Any] = field(default_factory=dict)
|
||||
sender_id: str | None = None
|
||||
turn_id: str | None = None
|
||||
workspace: Path | None = None
|
||||
attributes: dict[str, Any] = field(default_factory=dict)
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
|
||||
@@ -29,7 +29,6 @@ class AgentTurnHookSpec:
|
||||
chat_id: str = "direct"
|
||||
message_id: str | None = None
|
||||
metadata: dict[str, Any] | None = None
|
||||
attributes: dict[str, Any] | None = None
|
||||
session_key: str | None = None
|
||||
workspace: Path | None = None
|
||||
tool_hint_max_length: int = 40
|
||||
@@ -40,6 +39,7 @@ class AgentTurnHookSpec:
|
||||
turn_hooks: list[AgentHook] = field(default_factory=list)
|
||||
ephemeral: bool = False
|
||||
run_extra_hooks_for_ephemeral: bool = False
|
||||
attributes: dict[str, Any] | None = None
|
||||
|
||||
|
||||
def build_agent_turn_hook(spec: AgentTurnHookSpec) -> AgentHook:
|
||||
|
||||
Reference in New Issue
Block a user