oc_chat
Loading...
Searching...
No Matches
shell.py File Reference

Go to the source code of this file.

Classes

class  oc_chat.tools.shell.HumanBudget

Namespaces

namespace  oc_chat
namespace  oc_chat.tools
namespace  oc_chat.tools.shell

Functions

str oc_chat.tools.shell._classify (str command)
bool oc_chat.tools.shell._is_allowed (str command)
Iterator[None] oc_chat.tools.shell.human_confirmed_command (str command)
Iterator[None] oc_chat.tools.shell.human_budget ("int | None" seconds, *, "Callable[[], int | None] | None" on_expired=None)
dict oc_chat.tools.shell.deny_unconfirmed_tier2 (dict result, *, str note="")
"tuple[str, str]" oc_chat.tools.shell._first_value_option (str token)
int oc_chat.tools.shell._python_m_pip_at (list[str] argv)
int oc_chat.tools.shell._pip_subcommand_at (list[str] argv, str program)
"tuple[list[str] | None, str]" oc_chat.tools.shell._pip_index_pin (list[str] argv, str program)
CommandResult|ConfirmationRequired|ToolError oc_chat.tools.shell.run_command (str command, int timeout=30, bool confirmed=False)
dict oc_chat.tools.shell.text_search (str pattern, str search_dir=".", *, str|None file_path=None, bool case_sensitive=False, int max_results=100)

Variables

contextvars oc_chat.tools.shell._human_approved_command
frozenset oc_chat.tools.shell._PYTHON_PROGRAMS = frozenset({"python", "python3", "py"})
frozenset oc_chat.tools.shell._PY_SHORT_VALUE_OPTIONS = frozenset({"c", "m", "W", "X"})
frozenset oc_chat.tools.shell._PY_SHORT_FLAG_OPTIONS = frozenset("bdhiqstuvxBEIOPRSV?")
str oc_chat.tools.shell._PY_UNKNOWN_OPTION = "\0"
dict oc_chat.tools.shell.TOOLS
list oc_chat.tools.shell.SCHEMAS