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

@adapttable/ai

v0.2.3

Published

Provider-neutral adaptive table capability discovery — catalog, describe and execute against a live AdaptTable without shipping a model SDK.

Readme

@adapttable/ai

AdaptTable AI — ask the table to filter, group, and aggregate

Provider-neutral context and execution for a live AdaptTable. Expose what this table can do right now, then execute the agent's commands against that contract. catalog and describe support discovery when more guidance is needed; they are not mandatory extra model calls before every action. No model SDK is bundled. @adapttable/core, the adapter roots and @adapttable/server do not import this package.

npm install @adapttable/ai
import { createAgentSession } from "@adapttable/ai";
import { tableAgent } from "@adapttable/ai-react";

For React, install @adapttable/ai-react and compose tableAgent({ tableId, bridge, writePolicy, approval, commit, columns }). Use the kit's agentApproval() surface or supply your own approval handler. approval defaults to "writes"; commit defaults to "stage". The root import stays React-free so a backend worker can speak the same three calls.

Requires Node.js 22.12.0 or newer; packed releases are tested on Node 22.12 and Node 24.

Integration levels

  1. Custom bridge — map any agent action onto session.execute(key, args, expectedRevision, idempotencyKey). Bind the revision to the view the agent received, not a fresh revision read when its command arrives. Keep the same identity when retrying the same action.
  2. AgentEnvelope — carry the versioned envelope on your transport, then parseEnvelope / executeEnvelope.
  3. JSON / OpenAI / MCP helpers — from your own runtime. LangChain may consume JSON tools. It is not an AdaptTable dependency.

Execution never requires another model call. Returning ExecuteResult to a model is an application choice. No prescribed chat-response wrapper or assistant widget is required.

buildAgentContext on /context offers compact and full context profiles. Provide the enabled input guidance up front for ordinary actions; load further descriptions only when needed. The same executor serves the ready assistant and an existing agent or custom interface.

import { toJsonTools, executeEnvelope } from "@adapttable/ai/json";
import { toOpenAITools } from "@adapttable/ai/openai";
import { toMcpTools, toMcpResources, mcpListChanged } from "@adapttable/ai/mcp";
  • @adapttable/ai/json — plain JSON function tools + AgentEnvelope
  • @adapttable/ai/openai — strict function tools with OpenAI-safe names (view_setPage); { deferred: true } is the portable trio
  • @adapttable/ai/mcp — tools in catalog order with derived annotations, per-key guide resources, list-changed
  • @adapttable/ai/mcp-apps — the table as a view an MCP host embeds
  • @adapttable/ai/http — optional endpoint client and agentSystemPrompt; connect a backend
  • @adapttable/ai/context — the permitted context contract, and bounded column sampling
  • @adapttable/ai/assistant — the conversation lifecycle, with no framework
  • @adapttable/ai/voice — dictation, in the browser or through a backend
  • @adapttable/ai/webmcp — the table as browser tools for an agent in the page
  • @adapttable/ai/ag-ui — the table as an AG-UI run's frontend tools
  • @adapttable/ai/ai-sdk — the table as AI SDK client tools

tableAgent and useTableAssistant are @adapttable/ai-react. Everything above is React-free.

The catalog lists only enabled features, permissions, source support and host callbacks. A filtering + pagination table does not advertise editing, grouping or pivoting.

See it work

Ask the live table — the assistant runs the same capabilities the page already wired.

Filter, sort, and page size — active people, salary high first, then 10 rows a page

filter-sort

Group and aggregate — group by team, average then min salary, then only active

group-average

Date range — only rows that started between 2020 and 2022

date-range

Column management — hide Person, show it again, Status first, then pin it

column-management

Try the interactive playground (no credentials). Guide: agent integrations.

Docs: capability contract · reference.