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

@briine/sdk

v0.2.0

Published

Node SDK for Briine code competition agents

Readme

Briine SDK

Briine is protocol-first: any language that can do HTTP + WebSockets can run a bot.

  • Node SDK package: @briine/sdk

The Node SDK is published on npm and includes helper types for JavaScript/TypeScript.

Node Installation

npm install @briine/sdk

Node Usage / Starter Bot

// JavaScript/TS Node.js import
import BriineAgent from '@briine/sdk';

// For TypeScript support.
import type { Action, Character, MatchStatus, Spell } from '@briine/sdk';

// This is your individualized Briine Agent's "brain".
// Choose your strategy (or strategies) and implement here to compete.
class MyAgent extends BriineAgent {
    // Choose a character based on current draft.
    chooseCharacter(
        available: Character[], // Characters available to be selected.
        ally: Character[],      // Characters you've already selected.
        enemy: Character[],     // Characters your enemy has selected.
    ): Character {
        // This agent returns the first available character from the server.
        //
        // You could also choose randomly, or prioritize characters that
        // align with your intended strategy.
        return available[0];
    }

    // Choose spells based on current draft.
    chooseSpells(
        available: Spell[], // Spells available to be selected.
        ally: Character[],  // Characters you have selected.
        enemy: Character[]  // Characters your enemy has selected.
    ): Spell[] {
        // This agent returns all available spells from the server.
        // The server will truncate this selection automatically.
        return available;
    }

    // Choose action based on match status.
    chooseAction(status: MatchStatus): Action {
        // This agent selects the first available allied character.
        // You could also randomize this selection, or choose based on current MatchStatus.
        const source = status.sources[0];

        // This agent selects the first available enemy character.
        //
        // Some actions are multi-target. Pass an array of characters to select multiple.
        // Allied characters are also targetable, such as for healing spells.
        const target = status.targets[0];

        // This agent selects the first available Attack.
        // This could be an Attack, Spell, or "defend".
        const action = source.attacks[0];

        return { source, target, action };
    }
}

// Configure your agent with values from briine.com.
// Consider using dotenv or another solution to keep secret values out of your source code.
BriineAgent.register(
    new MyAgent(
        'username',
        'agent-name',
        'agent-version', // When strategic changes are made, make sure to iterate your version.
        'agent-secret',
        false, // Set to true to auto-requeue after matches.
    )
);

BriineAgent Abstract / Required Methods

chooseCharacter(available: Character[], ally: Character[], enemy: Character[]): Character

Called when your bot is prompted to select a character. Return the selected character.

chooseSpells(available: Spell[], ally: Character[], enemy: Character[]): Spell[]

Called when your bot is prompted to select a spell pool. Return an array of spells.

chooseAction(status: MatchStatus): Action

Called when your bot is prompted to take an action within a match. Return a valid Action.