diff --git a/README.md b/README.md index dedb375..1c9d355 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Any other input is sent to the agent. /install status /install upgrade scheduler-service -Six install targets exist side by side: `binary` (`~/.local/bin/tai.py`), `bash-hook` (a guarded `command_not_found_handle` block in `~/.bashrc`, backed up once to `~/.bashrc.bak-tai`, so unknown shell commands are answered by the agent), `venv` (`~/.tai/venv`, created whenever the venv module exists), `scheduler-service` and `telegram-service` (systemd user units that prefer the venv python), and `container` (the sandbox, whose image carries its own `/box/venv`). `/install status` (or the `install` tool) reports exactly which of these exist, with versions and service states. `install` adds missing pieces, `upgrade` refreshes in place, `reinstall` rebuilds artifacts from scratch, `uninstall` removes them; service changes restart or start units immediately. Data handling is explicit: no action ever touches the vault (`memory.db`, secrets, schedules, records, backups). +Six install targets exist side by side: `binary` (`~/.local/bin/tai.py`), `bash-hook` (a guarded block in `~/.bashrc`, backed up once to `~/.bashrc.bak-tai`, adding both an `alias tai="$HOME/.local/bin/tai.py"` so the bare `tai` command resolves to the REPL instead of falling through, and a `command_not_found_handle` so any other unknown shell command is answered by the agent), `venv` (`~/.tai/venv`, created whenever the venv module exists), `scheduler-service` and `telegram-service` (systemd user units that prefer the venv python), and `container` (the sandbox, whose image carries its own `/box/venv`). `/install status` (or the `install` tool) reports exactly which of these exist, with versions and service states. `install` adds missing pieces, `upgrade` refreshes in place, `reinstall` rebuilds artifacts from scratch, `uninstall` removes them; service changes restart or start units immediately. Data handling is explicit: no action ever touches the vault (`memory.db`, secrets, schedules, records, backups). ## Backends diff --git a/tai.py b/tai.py index 92c4361..59d72e5 100755 --- a/tai.py +++ b/tai.py @@ -170,7 +170,14 @@ TELEGRAM_FILE_API = "https://api.telegram.org/file/bot" SKILL_NAME_RE = re.compile(r"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$") BASHRC_MARK_BEGIN = "# tai command-not-found hook - start" BASHRC_MARK_END = "# tai command-not-found hook - end" -BASHRC_BLOCK = BASHRC_MARK_BEGIN + "\ncommand_not_found_handle() {\n \"$HOME/.local/bin/tai.py\" \"$@\"\n return $?\n}\n" + BASHRC_MARK_END + "\n" +BASHRC_BLOCK = ( + BASHRC_MARK_BEGIN + "\n" + "alias tai=\"$HOME/.local/bin/tai.py\"\n" + "command_not_found_handle() {\n" + " \"$HOME/.local/bin/tai.py\" \"$@\"\n" + " return $?\n" + "}\n" + BASHRC_MARK_END + "\n" +) BOX_CONTAINERFILE = """FROM python:3.12-slim ENV DEBIAN_FRONTEND=noninteractive PIP_NO_CACHE_DIR=1 RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg espeak-ng python3-venv && rm -rf /var/lib/apt/lists/*