#!/bin/sh # parse agent from this scripts filename (format 'aicage-.*') name=${0##*/} agent=${name#aicage-} agent=${agent%%.*} # Extra args for sandbox # Codex uses bubblewrap as sandbox on Linux with '--sandbox' and/or some network settings. # For simplicity use of bubblewrap is assumed here, which requires docker run args: # - '--privileged' or # - '--cap-add SYS_ADMIN --security-opt seccomp=unconfined --security-opt apparmor=unconfined' # run agent in aicage container (with extra args) while passing arguments # '--' before the agent is needed for aicage to parse extra args for docker-run exec aicage \ --cap-add SYS_ADMIN \ --security-opt seccomp=unconfined \ --security-opt apparmor=unconfined \ -- "$agent" "$@"