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

@buildify-cli/cursor-agent

v0.1.1

Published

Buildify Cursor Agent runner — connects to Buildify Cursor Broker and executes Cursor SDK tasks locally

Downloads

27

Readme

@buildify/cursor-agent

Node.js client runner for the Buildify Cursor Broker bundle. It connects to CursorBrokerTriggerNode, receives submitted tasks over SSE/HTTP, and executes them locally with @cursor/sdk.

Architecture

Buildify Workflow
  └── CursorBrokerTriggerNode (Java Netty HTTP server)
        └── CursorSubmitTaskNode (submit task)
        └── CursorCancelTaskNode (cancel task)
              ↕ HTTP + SSE
        @buildify/cursor-agent (this package)
              └── @cursor/sdk Agent.create() + agent.send()

Requirements

  • Node.js 18+
  • macOS (for install-service; foreground/daemon mode works on any OS)
  • Buildify workflow with CursorBrokerTriggerNode running and reachable

Install

From this repository:

cd buildify-cursor-agent
npm install
npm run build
npm link

Or after publishing:

npm install -g @buildify/cursor-agent

Configuration

Initialize defaults:

buildify-cursor-agent config init

Edit ~/.buildify/cursor-agent.json:

{
  "server": "http://localhost:8080",
  "clientId": "my-macbook",
  "defaultCwd": "/Users/you/projects",
  "maxConcurrent": 2,
  "token": "",
  "logLevel": "info",
  "streamLogs": false,
  "requestTimeoutMs": 30000,
  "reconnectMinDelayMs": 1000,
  "reconnectMaxDelayMs": 30000
}

Or set values via CLI:

buildify-cursor-agent config set \
  server=http://192.168.1.10:9001 \
  clientId=my-macbook \
  defaultCwd=/Users/you/projects \
  token=broker_server_key

| Key | Description | |-----|-------------| | server | Base URL of the Java Cursor Broker (from CursorBrokerTriggerNode status) | | clientId | Unique agent identifier; must match CursorSubmitTaskNode.clientId | | defaultCwd | Default working directory when a task has no cwd | | maxConcurrent | Max parallel Cursor SDK runs (reported at connect) | | token | Bearer token when Buildify auth is enabled (Authorization: Bearer <serverKey>) | | logLevel | error, warn, info, or debug | | streamLogs | Print Cursor SDK stream messages to stdout for debugging | | requestTimeoutMs | HTTP timeout for broker calls | | reconnectMinDelayMs | Minimum reconnect backoff | | reconnectMaxDelayMs | Maximum reconnect backoff |

Show current config (secrets masked):

buildify-cursor-agent config show

Usage

Foreground

buildify-cursor-agent start

Press Ctrl+C to disconnect cleanly (DELETE /disconnect).

Debug logs

buildify-cursor-agent start --log-level debug --stream-logs

--stream-logs prints Cursor SDK stream events such as status, assistant text, thinking, and tool calls. The runner also reports task progress events back to CursorBrokerTriggerNode.

When a task provides cwd, the runner resolves it on the agent machine and creates the directory recursively if it does not already exist. If the path exists but is not a directory, the task fails.

Background daemon

buildify-cursor-agent start --daemon
buildify-cursor-agent status
buildify-cursor-agent stop

PID file: ~/.buildify/cursor-agent.pid

macOS launchd service (like Docker Desktop auto-start)

Install a user LaunchAgent that starts on login and restarts on failure:

buildify-cursor-agent install-service
buildify-cursor-agent status

Logs:

  • ~/.buildify/cursor-agent.log
  • ~/.buildify/cursor-agent.log.err

Uninstall:

buildify-cursor-agent uninstall-service

Protocol

Implements the client side of the Cursor Broker HTTP API:

| Method | Path | Purpose | |--------|------|---------| | POST | /connect | Register client, get sessionId | | GET | /events | SSE stream (newTask and cancelled events) | | GET | /tasks/next | Pull next queued task | | POST | /tasks/{taskId}/events | Report received / progress / completed / failed / cancelled | | POST | /heartbeat | Keep-alive with runningCount | | DELETE | /disconnect | Clean shutdown |

Headers:

  • Agent-Client-Id — agent identifier
  • Agent-Session-Id — session from /connect

Model discovery:

  • The runner sends its cached model list in /connect and /heartbeat.
  • The model cache is refreshed from Cursor with the task-scoped cursorApiKey when a task starts.
  • CursorSubmitTaskNode.model loads options from the selected clientId; if the agent has not reported models yet, it falls back to composer-2.5.

Buildify workflow setup

  1. Add Cursor Broker Trigger node; note the listening port in node status.
  2. Enable auth if needed and configure Cursor Broker Credential (serverKey).
  3. Set token in client config to the same serverKey.
  4. Add Submit Cursor Task node with matching clientId and task-scoped cursorApiKey.
  5. Optionally add Cancel Cursor Task node and pass taskId to cancel queued or running tasks.
  6. Start this runner on the target machine.

Development

npm install
npm run dev -- config show
npm run dev -- start
npm run build

License

MIT