Skip to content

taba v0.2.4

Choose a tag to compare

@Buchi-dev-dzn Buchi-dev-dzn released this 25 Nov 15:00
8be9d53

taba v0.2.4

A backward-compatible patch on v0.2.3 with two fixes: a stricter agent hook
guard and gentler cleanup. Existing commands, flags, exit codes, JSON fields
and state are unchanged. There is one new optional config key, and one
events.jsonl event gains a new field.

  • The agent hook recognises more ways of writing a stop command
    (#28). Before, the
    PreToolUse hook for Claude Code and Codex checked only a few exact
    spellings, so equivalent commands that targeted another scope's service
    could pass without a decision. Now kill, pkill, killall, fuser -k,
    kill-port and lsof … | xargs kill get the same ownership check, and the
    same denial, in these forms:

    • run through common wrappers such as sudo, env, command, nohup
      and timeout, or after VAR=value prefixes;
    • with redirections such as 2>/dev/null;
    • with signal options;
    • with xargs options;
    • with the lsof port forms -i :PORT, tcp:PORT and -iTCP:PORT,
      comma lists, and -sTCP:LISTEN;
    • with process IDs taken from $(lsof -t …) or $(pgrep …).

    A taba command that changes services or leases and would run as a
    different agent than the session's own now asks for confirmation, as
    --force already does. That means --agent, or TABA_AGENT set, changed
    or cleared within the same command line. On Codex, which has no
    confirmation prompt, it is denied and sent to a human. Read-only commands
    (whoami, ps, logs) and the session's own identity are unaffected.

  • Cleanup no longer forces a slow service down after one second
    (#30). A new optional
    config.toml key sets how long gc waits after its graceful stop request
    before forcing a service:

    stop_timeout = "5s"

    The default is 5s, like taba stop. Explicit taba gc waits up to that
    long. The automatic cleanup inside run and whoami still waits at most
    1 s per service, so those commands are not slowed down. A service that
    needs longer is left running and is forced only by a later cleanup, once
    stop_timeout has passed since the request. The gc_drop event now
    records which signal stopped the service: TERM, KILL, or null if it
    had already exited.

Limitations of the hook

The hook is a best-effort check for common Bash commands, not a security
boundary.

  • Commands it can't resolve: commands it can't fully parse or resolve
    are not blocked. They fall back to the harness's normal permissions and
    are recorded as hook_unchecked in events.jsonl. This covers shell
    variables, scripts, eval, sh -c, and process IDs read from files or
    other commands.
  • Native Windows commands: PowerShell stop commands such as
    Stop-Process and taskkill are not inspected.