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

@jgalego/teamapi-chat

v0.3.2

Published

Chat as a team or a member of a Team API as Code org — a provider-neutral tool-use loop over the resolved org graph, for Anthropic or any OpenAI-compatible endpoint

Readme

@jgalego/teamapi-chat

npm CI Node License: MIT

Chat as a team or a specific team member from a Team API as Code org — backed by a live tool-use loop over the same 13 org-graph operations @jgalego/teamapi-mcp-server exposes, so the persona can answer questions about any team in the org.

Normally used via teamapi chat --team <id> [--member <id>] [--ask <question>].

Providers

The package includes two adapters:

| provider | endpoint | key | | ----------- | ---------------------------------- | ----------------------------- | | anthropic | the Anthropic Messages API | ANTHROPIC_API_KEY, required | | openai | any OpenAI Chat Completions server | OPENAI_API_KEY, optional |

The openai adapter calls a configurable base URL with fetch. The shared wire format reaches Azure OpenAI, Ollama, vLLM, llama.cpp, Together, Groq, Fireworks, OpenRouter, and most self-hosted gateways without a vendor SDK. Authentication is optional because local models usually do not require it.

Install

npm install @jgalego/teamapi-chat

Usage

import { buildChatPersona, buildChatTools, createChatSession } from "@jgalego/teamapi-chat";

const persona = buildChatPersona(graph, { teamId: "stream-checkout", memberId: "diego-alves" });

const session = createChatSession({
  provider: "openai",
  baseUrl: "http://localhost:11434/v1", // or omit for api.openai.com
  model: "llama3.1",
  system: persona.systemPrompt,
  tools: buildChatTools(graph),
});

const answer = await session.ask("is payments overloaded right now?");
console.log(answer.text);
if (answer.stoppedBecause) console.warn(`incomplete: ${answer.stoppedBecause}`);

ask never pretends a turn finished when it didn't: stoppedBecause is tool-limit, refusal or truncated when the model stopped for a reason other than completing its answer.

Adding a provider

A tool is a name, a description, a zod schema and a function — ChatTool, in tool.ts, with no vendor content in it. An adapter converts that list to the provider's shape and drives the call-observe-call loop, which is about a hundred lines. runToolByName handles the parts every adapter needs identically: validating arguments against the schema, and turning an unknown tool or a thrown error into a message the model can read and recover from rather than an exception that ends the turn.

Full docs and a sample transcript: https://github.com/JGalego/TeamAPI

The TeamAPI toolchain

Seven packages expose the same org graph. Install the ones you need:

| Package | What it does | | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- | | @jgalego/teamapi | The CLI — validate, diagram, check, import, reconcile, serve and chat with your org | | @jgalego/teamapi-core | The engine: $ref resolution, the org graph, scoring, checks, diagrams, generators | | @jgalego/teamapi-schema | Zod schemas and TypeScript types for the extended spec | | @jgalego/teamapi-rest-api | REST API, live dashboard, Swagger UI, Prometheus metrics | | @jgalego/teamapi-mcp-server | The org graph as MCP tools for LLM assistants | | @jgalego/teamapi-chat (this package) | Chat as a team or member — Anthropic or any OpenAI-compatible endpoint | | @jgalego/teamapi-backstage | Live Backstage catalog entity provider |

Docs, examples and the extended spec: teamapi.dev · github.com/JGalego/TeamAPI

License

MIT