Check whether this session already exists in storage.
(self)
| 466 | self._meta.pending_tokens = max(0, self._meta.pending_tokens) |
| 467 | |
| 468 | async def exists(self) -> bool: |
| 469 | """Check whether this session already exists in storage.""" |
| 470 | try: |
| 471 | await self._viking_fs.stat(self._session_uri, ctx=self.ctx) |
| 472 | return True |
| 473 | except Exception: |
| 474 | return False |
| 475 | |
| 476 | async def ensure_exists(self) -> None: |
| 477 | """Materialize session root and messages file if missing.""" |