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

aia-tool

v1.1.0

Published

Motor determinístico de ejecución para automatizaciones AIA (JSON + tools)

Readme

aia-tool

Motor determinístico para ejecutar automatizaciones definidas en JSON (formato AIA): recorre acciones en orden, resuelve variables {{nombre}} contra un contexto y delega en funciones que vos registrás (tools). No usa modelos de lenguaje en la ejecución.

Inicio con plantillas (agente / MCP)

Sin ruido en npm install. Cuando quieras, generá en tu proyecto AGENTS.md, ejemplos de config, tools, MCP y un runner:

npx --yes aia-tool init

Si el comando no resuelve el bin, usá explícitamente:

npx --yes --package=aia-tool aia init

Con el paquete ya en devDependencies / dependencies:

npx aia init

Opcional: npx aia init --dir ./mi-proyecto --force.

Luego abrí y seguí AGENTS.md (idealmente junto con tu agente de IA en Cursor, Claude Code, etc.) para implementar tools reales y, si aplica, el MCP del producto.

Instalación

npm install aia-tool

Uso rápido

import { executeAIA } from "aia-tool";

const config = {
  aia_version: "1.0",
  actions: [
    {
      type: "send_email",
      params: {
        to: "{{user_email}}",
        subject: "Hola {{user_name}}",
      },
    },
  ],
};

const tools = {
  send_email: async ({ to, subject }) => {
    // integración real (API, cola, etc.)
    return { ok: true, to, subject };
  },
};

const context = {
  user_email: "[email protected]",
  user_name: "Ana",
};

const results = await executeAIA(config, tools, context);
// results: un elemento por acción ejecutada

Reglas

  • Variables en strings: {{variable}} (espacios alrededor del nombre permitidos).
  • Si falta una clave en context al resolver, se lanza error.
  • Si tools[type] no existe o no es función, se lanza error.
  • Las acciones se ejecutan en orden, en serie (await por acción).

API exportada

| Export | Descripción | |--------|-------------| | executeAIA(config, tools, context?) | Ejecuta todas las acciones. | | resolveParams(value, context) | Sustituye {{}} en strings y estructuras anidadas. | | validateAIAConfig(config) | Valida forma mínima del config (sin ejecutar). | | listMissingToolTypes(config, tools) | Lista type de acciones sin función en tools. | | mockTools / mockToolNames | Registry mock (p. ej. send_email sin efectos reales). |

Ejemplo en el repo del paquete

Tras clonar o en desarrollo local:

npm install
node test.js
npm run example:pilot

El piloto examples/pilot-barberia/ simula el envío de un correo tras un turno.

MCP (Model Context Protocol)

Incluye un servidor stdio para clientes como Cursor, útil para validar configs, resolver placeholders, comprobar tools y ejecutar con registry mock.

Binario: aia-mcp

Cursor (ejemplo)

"aia-tool": {
  "command": "npx",
  "args": ["--yes", "--package=aia-tool", "aia-mcp"]
}

Herramientas expuestas:

  • aia_validate_config
  • aia_resolve_params
  • aia_list_missing_tools
  • aia_execute_mock (solo tools mock; hoy incluye send_email simulado)

Requisitos

  • Node.js 18+
  • Proyecto con "type": "module" (o bundler que entienda ESM) al importar el paquete.

Licencia

MIT