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

@thenajs/flow

v0.6.0

Published

Visualizador ao vivo da execução de agentes ThenaJS — grafo em tempo real no navegador.

Readme

@thenajs/flow

Visualizador ao vivo da execução dos seus agentes. Sobe um site local que desenha, em tempo real, a árvore do que está rodando — workflow, loops, agentes, chamadas ao modelo e tools — com o prompt e a resposta de cada passo.

npm install @thenajs/flow
import { bootstrapWorkflow } from "@thenajs/core";
import { thenaFlow } from "@thenajs/flow";
import { MeuWorkflow } from "./workflows/meu.workflow.js";

const app = await bootstrapWorkflow(MeuWorkflow, { log: true });
await app.use(thenaFlow());

await app.run({ input: { message: "Olá" } });

Abra http://127.0.0.1:4100. Os nós aparecem conforme acontecem; clique em um para ver o prompt enviado, a resposta, a entrada e a saída da tool, os tokens e o erro, se houve.

O que ele mostra

| Ícone | Passo | O que é | | ----- | ---------- | ---------------------------------------------- | | | workflow | a execução inteira | | | loop | um bloco loop({ ... }) | | | parallel | um bloco parallel([ ... ]) | | | agent | um passo de agente | | | chat | uma chamada ao modelo | | | tool | uma tool executada |

A borda esquerda dá o estado: azul pulsando enquanto roda, verde no fim, vermelho quando falha. A lista lateral guarda as execuções anteriores da sessão — o Flow acompanha a mais recente sozinho, a menos que você clique numa antiga.

Opções

await app.use(
  thenaFlow({
    port: 4100,        // porta do site
    host: "127.0.0.1", // interface de escuta — local, de propósito
    maxRuns: 20,       // execuções mantidas em memória
    log: true,         // imprime a URL ao subir
  }),
);

O que saber antes

Nada é persistido. O histórico vive na memória do processo. Fechou, acabou. Para um arquivo que sobrevive à execução, use o report — os dois funcionam juntos.

O processo fica aberto depois do run. É o que dá tempo de olhar o resultado. Encerre com Ctrl+C, ou chame await app.dispose() quando quiser que o script termine sozinho.

Ele não toma o lugar do seu log. O log do ThenaConfig continua funcionando junto; vários plugins também coexistem.

Escuta só em 127.0.0.1. O prompt e a resposta de cada passo passam por ali, e isso costuma incluir dado sensível. Mudar o host expõe tudo isso na rede — faça só se souber por quê.

Escrever o seu próprio plugin

thenaFlow() é só um ThenaPlugin. O mesmo stream está aberto para qualquer destino — um Datadog, um arquivo, um webhook:

import type { ThenaPlugin } from "@thenajs/core";

export function meuPlugin(): ThenaPlugin {
  return {
    name: "meu-plugin",
    setup: () => conectar(),
    onEvent: (evento) => enviar(evento),
    dispose: () => fechar(),
  };
}

Licença

MIT