Working perfect with alias

This commit is contained in:
2026-10-10 08:27:40 +02:00
parent c46000d7e5
commit 7add51fd02
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -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
+8 -1
View File
@@ -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/*