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

@makaio/adapter-claude-code-tmux

v1.0.0-dev-1779051654000

Published

Claude Code tmux adapter for the Makaio framework.

Readme

@makaio/adapter-claude-code-tmux

Claude Code tmux adapter for the Makaio framework. It launches claude as a long-lived interactive tmux session and uses Claude Code hooks for lifecycle correlation.

Architecture

The adapter follows the framework adapter stack:

| Layer | Class | Responsibility | |-------|-------|----------------| | Domain | ClaudeCodeTmuxAdapter | Handles adapter lifecycle and agent creation | | Agent | ClaudeCodeTmuxAgent | Bridges connector events into framework agent events | | Connector | ClaudeCodeTmuxConnector | Owns the tmux process, hook subscription, MCP registration, and turn queue |

The connector generates the Claude Code session ID before launch, uses it as the adapter session ID, and passes the same value to Claude Code with --session-id. Hook events are subscribed through the bus with a payload.session_id filter so only events for that expected Claude session reach the connector.

Runtime observation is emitted by the agent layer with client.runtime.observe after the connector has a confirmed adapter session ID. That keeps the connector on the scoped adapter bus while still making the runtime-observation side effect explicit for clients-core.

The connector subscribes to hook events immediately after TmuxBackend.spawn() returns and before awaiting SessionStart. There is no earlier subscription point because the TmuxSession wrapper needs the spawned PTY handle, but the Claude session ID is generated before spawn so the hook filter is already fixed.

In-turn interruption is supported: immediate replacement sends Escape to the live tmux pane, waits for Stop or the interrupt settling window, clears any draft input, and then submits the replacement prompt.

Hook wiring is session-isolated. client.sessionConfig.create must be handled; the returned session config directory is passed to Claude Code wiring with user scope so hooks are written to that directory instead of project .claude/settings.json.

Provider support is limited to Claude Code-authenticated Anthropic providers: anthropic and anthropic-oauth.

MCP

The adapter registers a pinned session with McpSubjects.session.register and writes a session-scoped makaio-<short-id> HTTP server entry into the project .mcp.json before spawning Claude Code. On close it removes that generated entry and unregisters the pinned MCP session.

File Index

| File | Purpose | |------|---------| | src/adapter.ts | Adapter factory and framework adapter lifecycle | | src/agent.ts | Agent layer that translates connector events | | src/connector.ts | tmux process, MCP, hook, and queue orchestration | | src/session.ts | PTY wrapper and hook bus subscription | | src/turn.ts | Hook-driven turn state machine | | src/utils/hook-event-router.ts | Raw Claude hook dispatcher | | src/utils/mcp-settings.ts | .mcp.json bus request helpers | | src/package.ts | Extension package descriptor | | src/server.ts | Server entrypoint for package discovery |