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

@craftlead/sdk

v0.4.31

Published

[![npm version](https://img.shields.io/npm/v/@craftlead/sdk)](https://www.npmjs.com/package/@craftlead/sdk)

Readme

@craftlead/sdk

npm version

Agent runtime SDK for CraftLead — orchestrate autonomous AI agent swarms with 0G Storage persistence and Uniswap settlement.

Installation

npm install @craftlead/sdk
# or
pnpm add @craftlead/sdk
# or
yarn add @craftlead/sdk

Overview

@craftlead/sdk provides the core runtime for CraftLead's 4-agent autonomous swarm:

  • Planner — Decomposes missions into research tasks
  • Researcher — Analyzes job data with iterative refinement
  • Critic — Quality review with feedback loop
  • Executor — Compiles final structured reports

All agent outputs are persisted to 0G Storage (File + KV layers) for verifiable memory.

Architecture

All exports are available through the barrel import @craftlead/sdk:

flowchart LR
    subgraph SDK["@craftlead/sdk"]
        subgraph Modules["Modules"]
            Orch[orchestrator]
            JS[job-sources]
            OG[og]
            Uniswap[uniswap]
            Supabase[supabase]
            AXL[axl]
            Gensyn[gensyn]
            Verify[verify]
        end
    end

    MCP["@craftlead/mcp"] --> SDK

    style MCP fill:#ec4899

Module Structure

| Module | Purpose | |--------|---------| | orchestrator | Agent swarm coordination, mission runner | | job-sources | HTTP fetchers for 4 job sources, 5-signal matching | | og | 0G Storage client, memory store, iNFT minting | | supabase | Database queries, user operations | | uniswap | Uniswap Trading API integration, settlement | | verify | Report verification from 0G Storage | | axl | AXL P2P mesh (optional, for distributed execution) | | gensyn | Gensyn Delphi client (optional, for markets) |

Quick Start

import {
  runMission,
  runPlanner,
  runResearcher,
  runCritic,
  runExecutor,
} from '@craftlead/sdk'

// Run full mission (fire-and-forget)
runMission(missionId, title, description)

// Or run individual agents
const tasks = await runPlanner(title, description)
const observations = await runResearcher(tasks, jobData)
const review = await runCritic(observations)
const report = await runExecutor(review.verifiedObservations, title)

API Reference

Agent Swarm

import {
  runMission,          // Full pipeline (Planner → Researcher ↔ Critic → Executor)
  runPlanner,          // Decompose mission into 3-5 tasks
  runResearcher,       // Analyze job data per task
  runCritic,           // Review observations for quality
  runExecutor,         // Compile final structured report
} from '@craftlead/sdk'

Job Sources

import {
  syncAllJobs,         // Sync from all 4 sources
  syncSource,          // Sync from specific source
  matchAllJobs,        // Match jobs to active users
} from '@craftlead/sdk'

NFT / 0G

import {
  mintAgentNFTWithArt, // Mint single agent iNFT
  mintSwarmNFTs,       // Mint all 4 agent iNFTs
  getAgentNFTInfo,     // Get iNFT metadata
  verifyReport,        // Retrieve report from 0G Storage
  runInference,        // AI inference via 0G Compute
} from '@craftlead/sdk'

Uniswap

import {
  getQuote,                     // Get Uniswap quote
  executeSwap,                  // Execute swap
  settleAgentReward,            // Settle agent rewards on-chain
  calculateAgentFeeDistribution, // Calculate fee split
} from '@craftlead/sdk'

Mission Status

import {
  getMissionById,    // Get mission details
  getAgentLogs,      // Get agent logs for a mission
  getAgentEarnings,  // Get earnings for an agent role
} from '@craftlead/sdk'

MCP Server

The SDK is consumed by @craftlead/mcp, which exposes all SDK functions as MCP tools via stdio. This allows any MCP-compatible client (Claude Desktop, OpenClaw, etc.) to use the full agent swarm.

# Test MCP server locally
npx @modelcontextprotocol/inspector npx -y @craftlead/mcp

Agent Rewards

Default reward distribution per mission:

| Agent | Share | |-------|-------| | Planner | 15% | | Researcher | 30% | | Critic | 20% | | Executor | 35% |

Peer Dependencies

{
  "@0gfoundation/0g-ts-sdk": ">=0.1.0",
  "@gensyn-ai/gensyn-delphi-sdk": ">=1.0.0",
  "ethers": ">=6.0.0",
  "openai": ">=4.0.0",
  "zod": ">=3.22.0"
}

All peer dependencies are optional — only install the ones your use case requires.

Development

pnpm install
pnpm build      # Build to dist/
pnpm dev        # Watch mode

Learn More