agent-temporary
v0.7.3
Published
Unprivileged setup layer for the agent-temporary system release
Downloads
356
Readme
agent-temporary
agent-temporary 0.7.3 — small utility for explicitly bounded temporary root access on Linux or macOS.
Contract
sudo agent-temporary install --user <target-user>
sudo agent-temporary on
sudo agent-temporary on --ttl 30m
sudo agent-temporary on --ttl 2h --persist-reboot
sudo agent-temporary off
agent-temporary status
agent-temporary --versionThe npm distribution installs only an unprivileged setup command:
npm install -g agent-temporary
agent-temporary-setup install
agent-temporary status
agent-temporary-setup uninstall
npm uninstall -g agent-temporarynpm install and npm uninstall affect only the npm package. The explicit setup
commands invoke the existing system installer or uninstaller and request administrator
privileges; they do not activate temporary access. To update the setup package, use
npm install -g agent-temporary@latest and then run agent-temporary-setup install.
Removing the npm package with npm uninstall does not remove the system installation;
use agent-temporary-setup uninstall for that explicit privileged operation.
Users without npm may use the version-pinned shell bootstrap:
curl -fsSL https://raw.githubusercontent.com/synrest/agent-temporary/main/bootstrap/install.sh | sh
curl -fsSL https://raw.githubusercontent.com/synrest/agent-temporary/main/bootstrap/install.sh -o agent-temporary-install.sh
sh agent-temporary-install.shThe bootstrap resolves the latest GitHub Release to a concrete semantic version,
downloads that exact release ZIP and its checksum, verifies the ZIP before
delegating system changes to the existing install.sh. It does not activate
temporary access. Inspect the downloaded script before running it when using the
inspect-first form.
Activation defaults to a 5-minute TTL. The allowed range is 5 minutes through 8 hours;
accepted forms are integer minutes or hours such as 30m, 1h, and 4h.
On macOS, --persist-reboot explicitly preserves the same grant across reboot
until its original expiry. On Linux, the existing behavior remains unchanged.
Without persistence, boot revocation removes
temporary privilege.
While active, the configured user has unrestricted NOPASSWD: ALL sudo access.
The privilege is bounded by a local expiry supervisor and is revoked on boot.
It does not use SSH keys or authorized_keys, and does not require Netbot or a
remote controller to revoke access.
status reports state from local state/rule inspection and an exact harmless
sudo -n /usr/bin/true execution probe; sudo policy listing alone is not treated
as effective authority. The stable key/value fields are intended for machine-readable
integration. On macOS, inspecting protected active state requires
sudo agent-temporary status; inactive status can be checked without privilege.
State is stored root-owned under
/var/lib/agent-temporary/.
Platform
Supported: Linux with an active systemd or OpenRC runtime and sudo/visudo, or
macOS with launchd and sudo/visudo. OpenRC is detected through its native runtime
state and service tools, including their standard /sbin locations.
Unsupported: Linux with another/unknown init system and unsupported platforms; they fail closed and are not given a synthetic systemd setup.
Release
Build a release artifact with:
./release.shThe resulting directory contains the executable, systemd/OpenRC/launchd service definitions, VERSION,
SHA256SUMS, and a deterministic install.sh. It also creates
dist/agent-temporary-X.Y.Z.zip and its SHA-256 sidecar. The archive contains no Git metadata,
runtime state, logs, or private material; after extraction, run
sudo ./install.sh --user <target-user> and the extracted source directory may be removed.
