Files
AstrBot/astrbot/core/computer/olayer/shell.py
T
Soulter 6beca2144c revert: #5729
This reverts commit a9c16febf4.
2026-03-05 01:34:07 +08:00

22 lines
430 B
Python

"""
Shell component
"""
from typing import Any, Protocol
class ShellComponent(Protocol):
"""Shell operations component"""
async def exec(
self,
command: str,
cwd: str | None = None,
env: dict[str, str] | None = None,
timeout: int | None = 30,
shell: bool = True,
background: bool = False,
) -> dict[str, Any]:
"""Execute shell command"""
...