Cotal TypeScript packages
    Preparing search index...

    Function privateLaunch

    • Wrap a secret-bearing command body (e.g. an isolatedCommand env -i KEY='val' … cmd) in a private launcher script and return a bash invocation of it. tmux runs the command we hand it as a process argument — visible to any local ps/tmux list-panes — so passing the rendered env inline would leak the agent's creds + control token (and any model-provider key). Instead the body lives in a fresh 0o700 temp dir as a 0o600 (owner-only) script; tmux only ever sees bash <path>, and the secrets are read from the file, never the command line. The script removes its directory before it execs, so the secrets stay on disk only until bash opens it, and exits instead of running the agent when the removal fails; a caller whose tmux command fails removes dir itself, since nothing will run the script.

      Parameters

      • commandBody: string

      Returns { command: string; dir: string }