
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@herbcaudill/beads-sdk
Advanced tools
Typed TypeScript SDK for the beads issue tracker. Zero runtime dependencies.
Connects directly to the beads daemon via Unix socket for fast operations (<20ms), with JSONL file fallback for read-only/offline scenarios.
pnpm add @herbcaudill/beads-sdk
import { BeadsClient } from "@herbcaudill/beads-sdk"
const client = new BeadsClient()
await client.connect("/path/to/repo")
// List open issues
const issues = await client.list({ status: "open" })
// Create an issue (requires daemon)
const issue = await client.create({
title: "Fix login bug",
priority: 1,
issue_type: "bug",
})
// Update an issue
await client.update(issue.id, { status: "in_progress" })
// Close an issue
await client.close(issue.id)
// Delete an issue
await client.delete(issue.id)
// Clean up
await client.disconnect()
// Filter by status, priority, type, assignee, or labels
const bugs = await client.list({ issue_type: "bug", status: "open" })
const labeled = await client.list({ labels: ["frontend", "urgent"] }) // all required
const any = await client.list({ labels_any: ["frontend", "backend"] }) // any match
// Text search across title and description
const results = await client.list({ query: "login" })
// Get only ready issues (open and unblocked)
const ready = await client.ready({ assignee: "herb", limit: 5 })
// Get blocked issues
const blocked = await client.blocked()
// Get database statistics
const stats = await client.stats()
// Show details for multiple issues (bounded concurrency)
const issues = await client.showMany(["abc", "def", "ghi"])
// Update multiple issues at once
await client.updateMany(["abc", "def"], { status: "in_progress" })
// Delete multiple issues
await client.deleteMany(["abc", "def"])
// Add a comment
await client.addComment(issueId, "Looks good to me", "herb")
// Get all comments for an issue
const comments = await client.getComments(issueId)
// Get labels for an issue
const labels = await client.getLabels(issueId)
// Add/remove labels
await client.addLabel(issueId, "frontend")
await client.removeLabel(issueId, "backend")
// List all labels in the database
const allLabels = await client.listAllLabels()
// Add a dependency with explicit type
await client.addDependency(childId, parentId, "blocks")
// Convenience methods for blocking dependencies
await client.addBlocker(blockedId, blockerId)
await client.removeBlocker(blockedId, blockerId)
// Check connection status
client.isConnected()
// Ping the daemon
const pong = await client.ping()
// Get daemon health info
const health = await client.health()
// Get database info
const info = await client.info()
The SDK polls the daemon for changes and can notify you when data updates:
const unsub = client.onChange(() => {
console.log("Data changed, refetch!")
})
// Later, stop watching
unsub()
For detailed mutation events (create, update, delete, status changes):
import { watchMutations } from "@herbcaudill/beads-sdk"
const stop = watchMutations(event => console.log(event.Type, event.IssueID), {
workspacePath: "/path/to/repo",
interval: 1000,
})
// Later, stop watching
stop()
Discover available beads workspaces from the global registry:
import { getAliveWorkspaces } from "@herbcaudill/beads-sdk"
// Get workspaces with live daemon processes
const workspaces = getAliveWorkspaces("/current/repo")
const client = new BeadsClient({
requestTimeout: 5000, // Daemon RPC timeout in ms (default: 5000)
actor: "my-app", // Actor name sent with requests (default: "sdk")
pollInterval: 2000, // Change polling interval in ms (default: 2000)
})
For direct transport usage:
import { DaemonTransport, JsonlTransport } from "@herbcaudill/beads-sdk"
// Direct daemon communication
const daemon = new DaemonTransport("/path/to/repo")
const issues = await daemon.send("list", { status: "open" })
daemon.close()
// JSONL file access (read-only)
const jsonl = new JsonlTransport("/path/to/repo")
jsonl.load()
const ready = await jsonl.send("ready", {})
jsonl.close()
BeadsClient
|-- DaemonTransport (Unix socket -> .beads/bd.sock)
|-- JsonlTransport (fallback: parse .beads/issues.jsonl)
|-- ChangePoller (polls stats for change detection)
|-- MutationPoller (polls get_mutations for detailed events)
.beads/issues.jsonl into memory. Watches the file for changes via fs.watch().stats endpoint and emits change events when data changes.get_mutations endpoint and emits detailed mutation events with type, issue ID, and status changes.MIT
FAQs
Typed TypeScript SDK for the beads issue tracker
We found that @herbcaudill/beads-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.