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

dataplane

v0.1.2

Published

Multi-agent git tracking system for coordinating AI agents on shared codebases

Downloads

285

Readme

Dataplane

A coordination layer for multiple AI agents working concurrently on a shared git repository.

Features

  • Stream-based Workflows - Logical work units that map 1:1 to git branches with full lifecycle management
  • Stable Identity Tracking - Change-Ids that survive git rebases, enabling logical change tracking across rewrites
  • Cascade Rebase - Automatic propagation of changes to dependent streams with configurable conflict strategies
  • Deferred Conflict Handling - Conflicts don't block the system; they're recorded and resolved when ready
  • Agent Isolation - Dedicated git worktrees per agent for concurrent work without filesystem contention
  • Stacked Review - Optional PR-like reviewable units for incremental code review workflows
  • Full Audit Trail - Operation logging enables rollback and crash recovery
  • Optimistic Concurrency - Guards detect concurrent modifications without blocking

Installation

npm install dataplane

Quick Start

import { MultiAgentRepoTracker } from 'dataplane';

// Initialize tracker
const tracker = new MultiAgentRepoTracker({
  repoPath: '/path/to/repo',
});

// Create a stream (work unit)
const streamId = tracker.createStream({
  name: 'feature-auth',
  agentId: 'agent-1',
});

// Create isolated worktree for the agent
const worktree = '/path/to/repo/.worktrees/agent-1';
tracker.createWorktree({
  agentId: 'agent-1',
  path: worktree,
  branch: `stream/${streamId}`,
});

// Make commits with automatic change tracking
tracker.commitChanges({
  streamId,
  agentId: 'agent-1',
  worktree,
  message: 'feat: add authentication module',
});

// Fork a child stream
const childStream = tracker.forkStream({
  parentStreamId: streamId,
  name: 'feature-oauth',
  agentId: 'agent-2',
});

// Sync child with parent updates
const result = tracker.syncWithParent(childStream, 'agent-2', childWorktree, 'ours');

// Merge when ready
tracker.mergeStream({
  sourceStream: streamId,
  targetStream: 'main-stream',
  agentId: 'agent-1',
  worktree,
});

// Cleanup
tracker.close();

Core Concepts

Streams

A stream is the primary unit of work, representing a logical branch of development:

const stream = tracker.createStream({
  name: 'feature-name',
  agentId: 'agent-1',
  enableStackedReview: true,  // Optional: enable PR-like review blocks
});

Streams have lifecycle states: activemerged | abandoned | conflicted

Changes

Changes maintain stable identity across git rebases using Change-Id trailers:

// Commits automatically get Change-Id trailers
tracker.commitChanges({
  streamId,
  message: 'feat: add feature',
  agentId: 'agent-1',
  worktree,
});

// Find a change by any of its historical commits
const change = tracker.getChangeByHistoricalCommit(oldCommitHash);

Conflict Resolution

Conflicts are deferred and can be resolved with different strategies:

// Sync with automatic resolution
const result = tracker.syncWithParent(streamId, agentId, worktree, 'ours');

// Strategies:
// - 'abort'  - Stop and mark stream conflicted (default)
// - 'ours'   - Keep current branch changes
// - 'theirs' - Accept incoming changes
// - 'agent'  - Call custom conflict handler

Cascade Rebase

Changes propagate automatically to dependent streams:

import * as cascade from 'dataplane/cascade';

cascade.cascadeRebase(db, repoPath, {
  rootStream: parentId,
  agentId: 'agent-1',
  strategy: 'skip_conflicting',  // Continue past conflicts
  worktree: {
    mode: 'callback',
    provider: (streamId) => getWorktreePath(streamId),
  },
});

API Overview

MultiAgentRepoTracker

| Method | Description | |--------|-------------| | createStream() | Create a new stream | | forkStream() | Fork a child stream | | mergeStream() | Merge stream into target | | syncWithParent() | Rebase onto parent stream | | commitChanges() | Commit with change tracking | | createWorktree() | Create agent worktree | | rollbackN() | Rollback N operations | | getStack() | Get review blocks | | healthCheck() | Check system health |

Low-Level APIs

import * as streams from 'dataplane/streams';
import * as changes from 'dataplane/changes';
import * as conflicts from 'dataplane/conflicts';
import * as cascade from 'dataplane/cascade';
import * as gc from 'dataplane/gc';
import * as recovery from 'dataplane/recovery';

Configuration

Garbage Collection

import * as gc from 'dataplane/gc';

gc.setGCConfig(db, {
  autoArchiveOnMerge: true,
  autoArchiveOnAbandon: true,
  archiveRetentionDays: 30,
  deleteGitBranches: true,
  runRecoveryOnStartup: true,
});

Tracker Options

const tracker = new MultiAgentRepoTracker({
  repoPath: '/path/to/repo',
  dbPath: '/path/to/tracker.db',  // Default: .dataplane/tracker.db
  tablePrefix: 'myapp_',          // Optional table prefix
  skipRecovery: false,            // Run recovery on startup
});

Documentation

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests (447 tests)
npm test

# Type check
npm run typecheck

Requirements

  • Node.js 18+
  • Git 2.20+

License

MIT