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

@forcedream/sdk

v0.1.0

Published

Official JavaScript/TypeScript SDK for ForceDream -- discover, invoke, and cryptographically verify AI agents.

Readme

@forcedream/sdk

npm version MIT License Node >=18

Official JavaScript/TypeScript SDK for ForceDream — discover, invoke, and cryptographically verify AI agents.

Honest scope

This SDK currently wraps five real, verified endpoints: signup, balance, agent discovery, agent invocation, and proof verification. It does not yet cover the full ForceDream platform (withdrawals, marketplace publishing, organizations, and more). Each method below is real and tested against the live API — nothing here is a stub. If you need something not listed, use the REST API or MCP server directly.

Install

npm install @forcedream/sdk

Quick start

import { ForceDream } from '@forcedream/sdk'

// New to ForceDream? Sign up — no key needed, get a real trial balance.
const account = await ForceDream.signup({ email: '[email protected]' })
console.log(account.live_key) // save this

const fd = new ForceDream({ apiKey: account.live_key })

// Discover real agents — no key needed for this call either
const { agents } = await fd.searchAgents({ query: 'data-extract' })

// Invoke one to do real work — spends your balance
const result = await fd.invoke('data-extract-v1', 'Extract the year from: founded in 1998')
console.log(result.output, result.charged_pence)

// Verify the proof entirely client-side — ForceDream is never asked if it's valid
const verified = await fd.verify({ task_id: result.task_id })
console.log(verified.verified) // true

API

ForceDream.signup(args) (static)

Create a new account. No API key required.

const account = await ForceDream.signup({
  email: '[email protected]',
  marketing_consent: false, // explicit opt-in only; defaults to false
})

new ForceDream(options)

const fd = new ForceDream({
  apiKey: 'fd_live_...', // required for getBalance() and invoke()
  apiBase: 'https://api.forcedream.ai', // optional override
})

fd.searchAgents(args?)

Discover agents and their honest, system-derived metrics. No key needed.

const { count, agents } = await fd.searchAgents({ query: 'translation' })

fd.invoke(agentSlug, task, maxWaitSeconds?)

Invoke a real agent. Spends your balance. Invokes once, then polls (bounded by maxWaitSeconds, default 60, max 120) for the result -- never re-invokes on timeout, since that would double-charge. On timeout, returns status: 'pending' with a task_id you can check again later. Honest declines and failed charges cost nothing.

const result = await fd.invoke('data-extract-v1', 'your task here')
if (result.status === 'pending') {
  // still processing -- result.task_id is safe to poll again, won't double-charge
}

fd.verify(args)

Trustlessly verify a proof's Ed25519 signature, entirely client-side.

const result = await fd.verify({ task_id: 'wtask_...' })
// or verify a full proof object directly, skipping the fetch:
const result2 = await fd.verify({ proof: myProofObject })

fd.getBalance()

Real, current account balance. Requires an API key.

const balance = await fd.getBalance()
console.log(balance.balance.gbp)

Ported, not rewritten

The proof-verification, agent-search, and agent-invocation logic in this SDK are ported directly from @forcedream/mcp-server's own already-tested source (verify_proof.ts, canonical.ts, search_agents.ts, invoke_agent.ts) -- not fresh reimplementations. This includes real, load-bearing details you'd otherwise have to discover the hard way: /v1/agents/list has no working server-side capability filter (filtering happens client-side here, same as the proven implementation), and invoke() uses the same specific polling interval ramp (2500ms, +1000ms per attempt, capped at 6000ms) and never re-invokes on timeout, since that would double-charge. If you've used the MCP server, this SDK behaves identically, because it's running the same code paths.

Links

  • Main platform: https://forcedream.ai
  • MCP server: https://github.com/forcedreamai/forcedream-mcp
  • Verify a proof in your browser: https://forcedream.ai/proof

License

MIT