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

openfox-reflection-analyzer

v0.1.0

Published

Extractor, cognitive pattern detector, and interactive visualizer for OpenFox thought exchanges in SQLite

Readme

🦊 OpenFox Reflection & Pattern Analyzer

Outil d'extraction, d'analyse cognitive et de visualisation interactive des chaînes de réflexion (<think> / Chain of Thought) et des schémas d'action enregistrés dans la base SQLite d'OpenFox.


🌟 Fonctionnalités Clés

  1. Extraction de la pensée & Délibération :

    • Extrait les pensées brutes (thinkingContent), les deltas de streaming (message.thinking) et les snapshots complets (turn.snapshot).
    • Calcule les métriques de tokens de pensée, la vitesse, le ratio délibératif (Thinking Tokens vs Response Tokens).
  2. Détection Automatique des Schémas Cognitifs (Patterns) :

    • 💡 Auto-Corrections (Self-Corrections) : Détecte quand l'agent identifie une erreur dans sa propre réflexion ou s'adapte suite à un retour d'outil négatif.
    • ⚠️ Boucles & Piétinements (Loop Detection) : Identifie les répétitions d'actions identiques sans progrès.
    • 📚 Overthinking : Détecte les délibérations anormalement volumineuses (> 1.2k tokens) par rapport à la complexité de l'action.
    • 🔬 Vérifications Critiques : Isole les étapes d'audit du code (sous-agents verifier et code_reviewer).
    • 🧪 Validations d'Hypothèses : Trace les cycles Hypothèse ➔ Action Outil ➔ Constat.
  3. Graphe de Flux Décisionnel (Decision Flow DAG) :

    • Représentation graphique sous forme de chaîne de décision SVG :
      [Demande Utilisateur] ➔ [Réflexion / Hypothèse] ➔ [Exécution Outil] ➔ [Résultat Outil] ➔ [Ajustement / Correction] ➔ [Réponse Finale]
  4. Deux Modes d'Utilisation :

    • Interface Web Interactive (Dashboard) : Application web moderne (Dark mode, glassmorphism, visualiseur de tours, recherche instantanée).
    • Ligne de commande (CLI) : Résumés rapides dans le terminal et exports de rapports en Markdown / JSON.

🚀 Démarrage Rapide

1. Installation

git clone https://github.com/TheCause/openfox-reflection-analyzer.git
cd openfox-reflection-analyzer
npm install

2. Lancer le Dashboard Web

npm run serve

Le dashboard est accessible sur http://localhost:8090.

3. Utilisation en Ligne de Commande (CLI)

# Afficher le résumé analytique global
npm run analyze

# Afficher les schémas cognitifs et auto-corrections détectés
npm run patterns

# Inspecter une session spécifique tour par tour
npx tsx src/cli/index.ts session <session_id>

# Exporter un rapport Markdown ou JSON
npx tsx src/cli/index.ts export --format md --out rapport.md
npx tsx src/cli/index.ts export --format json --out rapport.json

🗄️ Connexion à SQLite

L'analyseur découvre automatiquement votre base de données OpenFox dans cet ordre :

  1. Variable d'environnement OPENFOX_DB_PATH ou paramètre --db <path>
  2. macOS : ~/Library/Application Support/openfox/sessions.db
  3. Linux : ~/.local/share/openfox/sessions.db
  4. Base de développement : ~/.local/share/openfox-dev/sessions.db
  5. Dossier local : ./openfox.db

La connexion est ouverte en mode lecture seule (readonly: true), garantissant qu'OpenFox peut continuer à fonctionner en parallèle sans aucun risque de verrouillage ou de corruption de données.


🌐 Endpoints de l'API REST

| Méthode | Endpoint | Description | | :--- | :--- | :--- | | GET | /api/summary | Métriques globales, ratio pensée/réponse, répartition des modèles et schémas | | GET | /api/projects | Liste des projets enregistrés | | GET | /api/sessions?q=... | Liste des sessions avec recherche et filtrage | | GET | /api/sessions/:id | Analyse détaillée d'une session, tours, pensées et graphe décisionnel | | GET | /api/patterns | Registre complet de tous les schémas et auto-corrections détectés | | GET | /api/export?format=md\|json | Téléchargement direct de rapports exportables |


🧪 Tests Unitaires

npm test

🤝 Positionnement & Transparence

  • Outil communautaire indépendant, non affilié au projet OpenFox. Il se branche en lecture seule sur la base sessions.db et ne modifie jamais rien.
  • Développé avec assistance IA (Antigravity / Gemini 3.7 Flash pour le code initial, Claude pour la revue et la mise en forme du paquet), relu et testé par un humain.

📄 Licence

MIT — voir LICENSE.