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

@cotal-ai/tmux

v0.192.0

Published

Cotal tmux integration: a tmux Runtime provider for spawning agents into tmux windows.

Readme

@cotal-ai/tmux

The tmux integration: a thin driver over the tmux CLI (open/close a window, send keys) plus a self-registering tmux Runtime provider. Importing it registers the runtime with the core Registry, so the manager can spawn agents into tmux windows without depending on this package.

Tier: extensions/. Peer-depends @cotal-ai/core; self-registers on import.

What it does

  • Runtime (tmux): each agent gets its own window in a shared per-space tmux session (cotal-<space>). A spawn that creates the session closes the shell window tmux opened it with, so the session ends with its last seat. Spawned unfocused; switch to session:name to watch it. Env is isolated (env -i) so the tmux server's environment doesn't reach agents. That env is written to an owner-only launch script, which keeps it off tmux's command line, and the script removes its directory before it starts the agent. When it cannot remove the directory, the agent does not start. Graceful stop types /exit then closes the seat's pane; hard stop closes that pane immediately. Stop and interrupt follow the pane when it moves between windows. Their tmux commands check the opening server's identity, including the delayed graceful close, so a replacement server cannot receive an old handle's input or close. Status and exit waits bind the pane to that server too. Native attach guidance selects the seat's current window and pane by its stable pane ID, so moving the pane or renaming its window does not redirect the operator to another seat. A dead server proves exit; an unreachable recorded server that still runs remains unknown. Exit waits honor tmux's pane_dead state, including remain-on-exit; provider errors fail the wait closed. Direct window closes still accept only tmux's own gone-window/session reports. Each handle carries a reference to its tmux server, window and pane, so a later manager can reap the seat after the one that spawned it is gone. The reap closes the window while the session still holds it, even when the agent's pane already exited. It refuses a pane that has moved out of that window, whether it still runs or has exited, and a window that has moved out of the session, including one that moves while the reap runs.

Session-name, pane-capture, session-creation, window-selection and text/key delivery failures name the operation, include tmux's error text and retain the failed call as cause. A failed capture returns no screen only when the pane's exit is confirmed. A failed exit probe still throws. Runtime spawn refusals also carry the session-creation reason.

The package tests include native write controls on a fresh private socket when tmux is installed. They check failure diagnostics, successful delivery and the server-identity fence without using operator sessions.

Usage

cotal ext add @cotal-ai/tmux
cotal supervise --runtime tmux

Library composition roots can instead import it explicitly:

import "@cotal-ai/tmux"; // self-registers; no other setup needed

Differences from @cotal-ai/cmux

cmux opens a per-agent workspace (tab) in the cmux app; this package opens a per-agent window in a tmux session. Both are native-watch (no PTY streaming). No cli.ts helper is included: the driver runs the tmux on PATH and needs no bundled binary path.

See docs/architecture.mdx (Manager supervision) and the root AGENTS.md for the tier rules.

The launcher contract checks in package.smoke.ts are POSIX-only. On Windows they use the shared skipSuite helper to report a skip with zero passing cells.