npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kortix/agent-tunnel

v0.13.29

Published

Tunnel relay between cloud AI agents and local machines — server relay, local agent, client SDK, JSON-RPC, HMAC signing

Readme

@kortix/agent-tunnel

@kortix/agent-tunnel connects a local computer to Kortix through an authenticated reverse tunnel.

Connect once

Run the command shown in a Computer Tunnel connector profile. Then approve the device code in your browser:

npx --yes @kortix/agent-tunnel@latest connect \
  --api-url https://api.kortix.com/v1/tunnel

After approval, the interactive flow asks whether it should install a persistent background service. The default answer is yes.

Run in the background

Install the operating-system background service during connection:

npx --yes @kortix/agent-tunnel@latest connect \
  --daemon \
  --api-url https://api.kortix.com/v1/tunnel

The service uses LaunchAgent on macOS, a user systemd service on Linux, and Task Scheduler on Windows. It starts at login and restarts after failures. It does not change the computer's sleep settings.

Manage the background service

npx --yes @kortix/agent-tunnel@latest service-status
npx --yes @kortix/agent-tunnel@latest logs
npx --yes @kortix/agent-tunnel@latest restart
npx --yes @kortix/agent-tunnel@latest stop
npx --yes @kortix/agent-tunnel@latest uninstall-service

Credentials are stored in ~/.agent-tunnel/config.json. Agent Tunnel requires the file to be regular, owned by the current user, and mode 0600 on POSIX. Protect the operating-system account because this setup token can authenticate the machine until you rotate or delete the connection.

Remote API URLs must use HTTPS. Plain HTTP is accepted only for localhost, 127.0.0.1, and ::1 development endpoints.

Permission boundaries

Kortix checks connector profile assignment, connector grants, connector tool policy, and the machine permission before relaying an operation. The local agent then checks the machine permission again.

The local config is the maximum boundary. A server grant cannot widen configured filesystem paths, blocked paths, shell commands, timeouts, file sizes, or desktop features. An empty permission scope is unrestricted inside those local ceilings. Use scoped permissions and short expiries for sensitive machines.

Computer Use driver

Agent Tunnel never downloads or executes a desktop driver. Install cua-driver locally before enabling Computer Use. The tunnel uses an existing binary from CUA_DRIVER_BIN, ~/.local/bin, /usr/local/bin, or /opt/homebrew/bin. Treat that binary as trusted local code. Agent Tunnel does not verify or update it.

Transfer a binary file without copying base64

Run the client where the source file exists. Set TUNNEL_API_URL, TUNNEL_TOKEN, and TUNNEL_ID for the target connection, then run:

agent-tunnel-cli fs_upload '{"source":"/tmp/report.xlsx","path":"/Users/me/Desktop/report.xlsx"}'

fs_upload reads bytes from source, computes SHA-256, and sends the bytes programmatically over the authenticated tunnel. It requires filesystem write permission. A pending approval returns success: false and exit code 1; retry only after approval. The command accepts regular files up to 3 MiB, which leaves room under the relay's 5 MiB message limit after base64 encoding.

The connected agent checks the supplied sha256 before modifying the destination. It reads the file after writing and returns its persisted sha256 and size. The CLI succeeds only when both match the source. An older agent without checksum support causes verification to fail; the file may already exist. Update the agent before retrying.

For raw fs.write, sha256 is optional for compatibility. Supply it for binary content. Never copy an opaque base64 payload from model context. Generate the file on the destination when a programmatic transfer is unavailable. A matching hash proves byte integrity, not format validity: validate XLSX/ZIP structure and workbook contents at the source. File size and magic bytes are insufficient. Do not use public file-host relays for this workflow.