feat: add pty monitoring for claude code
This commit is contained in:
@@ -226,6 +226,18 @@ class ClaudeCodeBackendAdapter:
|
||||
def live_session_count(self) -> int:
|
||||
return self._backend.live_session_count
|
||||
|
||||
@property
|
||||
def live_sessions(self) -> dict[str, Any]:
|
||||
"""Live PTY processes keyed by claude session_id.
|
||||
|
||||
Pass-through to the underlying ``ClaudeCodeBackend``. The value
|
||||
type is the claude-code-api ``PtyClaudeProcess``; admin code
|
||||
consumes ``captured_output()`` / ``add_output_listener`` /
|
||||
``write`` from it. Typed as ``Any`` to avoid leaking the lower
|
||||
layer's type into the gateway's public surface.
|
||||
"""
|
||||
return self._backend.live_sessions
|
||||
|
||||
async def __aenter__(self) -> Self:
|
||||
await self._backend.__aenter__()
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user