@parcha/agentrun-cli
v0.1.1
Published
Verified, persistent launcher for the AgentRun Python CLI
Readme
AgentRun npm launcher
@parcha/agentrun-cli is a dependency-free Node.js launcher for the AgentRun Python CLI. It requires Node.js 20 or newer. The release manifest must explicitly verify the current Linux architecture; releases marked libc: "glibc" require glibc. macOS and Windows are not supported by this launcher release.
npx --yes --package https://github.com/Parcha-ai/agentrun/releases/download/cli-v0.1.10/parcha-agentrun-cli-0.1.1.tgz agentrun connect
npx --yes --package https://github.com/Parcha-ai/agentrun/releases/download/cli-v0.1.10/parcha-agentrun-cli-0.1.1.tgz agentrun statusLauncher 0.1.1 defaults to CLI 0.1.10 from the public Parcha-ai/agentrun GitHub release tagged cli-v0.1.10. This default is pinned: it does not follow GitHub's latest release. --cli-version <version> selects the matching cli-v<version> tag. A completed default or explicitly pinned installation works offline without contacting the release server.
Use --source https://YOUR-CONSOLE/agentrun-cli or AGENTRUN_CLI_SOURCE to override GitHub with an explicit release directory. Put launcher options before the CLI command; all arguments from the first CLI argument onward are forwarded unchanged. A leading -- ends launcher option parsing. The Python CLI inherits stdin, stdout, stderr, and the current working directory, including terminal interaction.
Installation and reuse
In default GitHub mode, the launcher downloads release.json and its named artifacts from https://github.com/Parcha-ai/agentrun/releases/download/cli-v<version>/. Each direct release-asset request may follow one redirect to exactly https://release-assets.githubusercontent.com/, with no credentials or explicit port. Other destinations and further redirects are refused.
Explicit sources retain their own directory layout: release.json without a CLI version, or releases/<version>.json with --cli-version. All artifact filenames resolve in the selected source directory. Explicit sources refuse every redirect, including when the supplied source happens to be on GitHub.
The launcher verifies the SHA-256 of the named CLI wheel, requirements file, and compressed uv bootstrap before executing the bootstrap. It also verifies the expanded bootstrap hash. Release artifacts must be plain filenames. HTTPS is required, and downloads have size and time limits. HTTP is accepted only for loopback addresses used in local verification.
The verified uv executable provisions Python 3.12, synchronizes dependencies with --require-hashes --only-binary :all:, and installs the verified local CLI wheel without resolving additional dependencies. Initial installation therefore also requires access to the managed Python distribution and dependency index. Dependency consistency, CLI module import, and installed-version checks must pass before the installation is marked ready.
Runtime files live under ~/.local/share/agentrun, or the absolute directory named by AGENTRUN_INSTALL_DIR. This root must belong to the current user, have no group or other permissions, and must not be a symlink. Python distributions, dependency cache, and complete CLI environments remain outside the npm cache. Removing the npm cache does not remove the runtime used by the CLI or its background processes.
Each source, platform, architecture, and manifest has a separate stable environment. The environment stays at its final path throughout installation. Concurrent installs of the same release are serialized. Completed installations are reused; old installations and their background processes are retained. The launcher runs Python with -I and clears Python path overrides and inherited installer configuration.
Explicit-source invocations without --cli-version fetch the current manifest each time. Default GitHub invocations and explicitly pinned versions reuse their completed cached installation without a release-server connection. When using npx, npm may separately need network access to obtain the launcher package itself.
Recovery
A failed installation removes only the directory created by that attempt, so the next invocation can retry. Hard termination can leave an incomplete environment or installation lock. The launcher reports its path and leaves it untouched. After confirming that no installation uses it, inspect and move the incomplete directory aside or remove the abandoned lock, then retry. The launcher does not kill other processes or automatically remove old environments.
The launcher does not enable adapters, startup behavior, or other CLI consent choices. Existing CLI commands own those actions.
Local verification
npm test
npm pack --dry-runThe subprocess tests serve release fixtures over local HTTP and HTTPS servers and use a fixture executable at the external uv boundary. The HTTPS cases route sockets to loopback through a test-only Node agent preload while preserving the requested URLs, hostnames, SNI, and certificate verification. The test certificate and key are public fixture material, trusted only by those child processes; fixtures are excluded from the npm package. Tests cover GitHub pinning and redirect boundaries, checksums, source overrides, path validation, private roots, concurrent installation, failed-install retry, persistent and offline reuse, argument and stream forwarding, signals, and readiness checks. A real bootstrap/Python installation is a separate release acceptance check.
