Shuts down the session and persists its final state. Awaits any deferred sessionEnd hooks before resolving so user-supplied hook scripts complete before the runtime tears down.\n\nArgs:\n params: Parameters for shutting down the session\n\n.. warning:: This API is experimental and may change or b
(self, params: ShutdownRequest, *, timeout: float | None = None)
| 26794 | return AbortResult.from_dict(await self._client.request("session.abort", params_dict, **_timeout_kwargs(timeout))) |
| 26795 | |
| 26796 | async def shutdown(self, params: ShutdownRequest, *, timeout: float | None = None) -> None: |
| 26797 | "Shuts down the session and persists its final state. Awaits any deferred sessionEnd hooks before resolving so user-supplied hook scripts complete before the runtime tears down.\n\nArgs:\n params: Parameters for shutting down the session\n\n.. warning:: This API is experimental and may change or be removed in future versions." |
| 26798 | params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} |
| 26799 | params_dict["sessionId"] = self._session_id |
| 26800 | await self._client.request("session.shutdown", params_dict, **_timeout_kwargs(timeout)) |
| 26801 | |
| 26802 | async def log(self, params: LogRequest, *, timeout: float | None = None) -> LogResult: |
| 26803 | "Emits a user-visible session log event.\n\nArgs:\n params: Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip.\n\nReturns:\n Identifier of the session event that was emitted for the log message.\n\n.. warning:: This API is experimental and may change or be removed in future versions." |