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

@guyghost/swarm-dao-herdr-adapter

v0.5.3

Published

Swarm DAO herdr host — each deliberation agent runs as a real coding agent in a herdr workspace

Readme

Swarm DAO herdr Adapter

Run each Swarm DAO deliberation agent as a real coding agent inside a herdr workspace — "the runtime your coding agents live on". herdr owns the agent's terminal and tracks its lifecycle (working / idle / blocked / done); the operator can attach to any agent pane live with herdr and watch it think.

herdr workspace: swarm-dao-p1-strategist   ← real pi/claude/codex/grok… agent
herdr workspace: swarm-dao-p1-critic       ← another agent, another workspace

How it works

For every agent, the adapter:

  1. Creates an isolated herdr workspace (one root pane, --no-focus — it never touches your existing layout).
  2. Starts the agent: herdr agent start <name> --kind <kind> — blocks until herdr detects the agent is ready for input. A freshly created pane may not be at its shell prompt yet (slower shell init under load); herdr then reports agent_pane_busy and the adapter retries on the same pane until the readiness budget (startTimeoutMs) is spent.
  3. Submits the deliberation prompt: herdr agent prompt <name> '<prompt>' --wait — settles on idle, done, or blocked. A stalled prompt (herdr enforces a 5 s observed-state-change window) is recovered: the adapter grace-polls the agent state and, if the prompt took effect, waits for settle; only a swallowed submission is re-prompted, exactly once.
  4. Harvests the ANSI-stripped terminal transcript: herdr agent read <name> --source recent-unwrapped.
  5. Closes the workspace (unless keepPanes).

A blocked agent (approval/question UI) surfaces as an error output, never as a vote. Outputs feed the same deterministic tally as every other host — no AI authority, no proposal-state mutation.

Prerequisites

  • herdr installed (brew install herdr) and the server running (run herdr once in any terminal)
  • The chosen kind's executable installed and authenticated (pi, claude, codex, gemini, cursor, grok, opencode, …)

Usage

import { createHerdrHostAdapter } from "@guyghost/swarm-dao-herdr-adapter";
import { loadConfig, handleDaoDeliberate } from "@guyghost/swarm-dao-core";

const adapter = createHerdrHostAdapter({
  workDir: process.cwd(),
  kind: "pi", // or "claude", "codex", "grok", …
  // agentArgs: ["-m", "gpt-5.4"],       // passed to the agent executable
  // timeoutMs: 300_000,                 // per-agent prompt timeout
  // keepPanes: true,                    // keep workspaces for inspection
});

const result = await handleDaoDeliberate(
  { adapter, workDir: process.cwd(), deliberationMode: "auto", controlToolName: "dao_check" },
  1,
);

Boundary

Deliberation is read-only analysis: agents share the repository checkout for context (each workspace's cwd is the repo root). Execution-side isolation stays with the delivery layer's GitWorkspace (execution.isolation).

Testing

bun test packages/herdr-adapter          # unit (fake runner) + real-server error path
HERDR_IT=1 bun test packages/herdr-adapter   # + full round-trip with a real agent
                                            # (HERDR_KIND, HERDR_KEEP to tune)