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

@fiber-pay/agent

v0.1.0

Published

AI agent orchestration layer for Fiber Network with MCP tools

Downloads

677

Readme

@fiber-pay/agent

AI-agent orchestration layer for Fiber Network (targeting Fiber v0.7.1).

This package provides:

  • FiberPay: high-level, agent-friendly API on top of @fiber-pay/sdk + @fiber-pay/node
  • MCP_TOOLS: MCP tool schema definitions for model/tool integration

What this package is (and is not)

@fiber-pay/agent is an orchestration layer, not a separate protocol implementation. It composes existing SDK and node lifecycle capabilities into one API designed for autonomous agents.

It currently exports MCP tool definitions/schemas; host-side tool execution wiring is still your responsibility.

Install

pnpm add @fiber-pay/agent

Quick start

import { createFiberPay } from '@fiber-pay/agent';

const fiber = createFiberPay({
  dataDir: `${process.env.HOME}/.fiber-pay`,
  network: 'testnet',
});

const init = await fiber.initialize();
if (!init.success) throw new Error(init.error?.message ?? 'init failed');

const balance = await fiber.getBalance();
console.log(balance.data);

await fiber.shutdown();

Runtime job orchestration

By default, FiberPay enables runtime-backed job orchestration for:

  • pay()
  • createInvoice()
  • createHoldInvoice()
  • settleInvoice()
  • openChannel()
  • closeChannel()

This uses an internal SQLite job store and waits for terminal job states before returning.

Config knobs:

  • useRuntimeJobs (default: true)
  • runtimeJobsDbPath (default: ${dataDir}/runtime-jobs.db)

Disable orchestration to force direct RPC calls:

const fiber = createFiberPay({
  dataDir: `${process.env.HOME}/.fiber-pay`,
  useRuntimeJobs: false,
});

API surface summary

Lifecycle

  • initialize()
  • shutdown()

Payments and invoices

  • pay()
  • createInvoice()
  • getPaymentStatus()
  • getInvoiceStatus()
  • createHoldInvoice()
  • settleInvoice()
  • waitForPayment()

Channels and node state

  • listChannels()
  • openChannel()
  • closeChannel()
  • waitForChannelReady()
  • getNodeInfo()
  • getBalance()

Safety, verification, and observability

  • validateInvoice()
  • analyzeLiquidity()
  • canSend()
  • getPaymentProof()
  • getPaymentProofSummary()
  • getPaymentAuditReport()
  • getSpendingAllowance()
  • getAuditLog()

All async operations return AgentResult<T>:

type AgentResult<T> = {
  success: boolean;
  data?: T;
  error?: {
    code: string;
    message: string;
    recoverable: boolean;
    suggestion?: string;
  };
  metadata?: {
    timestamp: number;
  };
};

MCP integration

import { MCP_TOOLS } from '@fiber-pay/agent/mcp';

for (const tool of Object.values(MCP_TOOLS)) {
  // register with your MCP host runtime
  // mcpServer.registerTool(tool)
}

See src/mcp-tools.ts for complete tool names and JSON schemas.

Compatibility

  • Node.js: >=20
  • Fiber RPC semantics: aligned with Fiber v0.7.1

Known gaps

  • No dedicated @fiber-pay/agent test suite yet
  • MCP runtime execution adapter is not bundled in this package