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

@koatora20/guava-brain

v0.2.0

Published

🧠 GuavaBrain V7 — Behavioral Memory & Intelligence Plugin (Brain Tier: TOP10 $GUAVA 10M+)

Readme

guava-brain 🧠🍈

Version Brain Tier Tests License

Brain Tier Exclusive — $GUAVA 1,000万枚以上 (10M+) 保有 かつ TOP10ホルダー限定
GuavaSuiteの最上位知能モジュール。AIエージェントの行動記憶を多次元分析・Temporal異常検知。


Brain Tier 要件

| 条件 | 詳細 | |------|------| | $GUAVA 保有量 | 10,000,000枚以上 (10M+) | | ランキング | Polygon TOP10ホルダー以内 | | 判定方法 | Polygon balanceOf + TheGraph TOP10ランキングAPI | | キャッシュ | 5分(RPC呼び出し最小化) | | コントラクト | 0x25cBD481901990bF0ed2ff9c5F3C0d4f743AC7B8 (Polygon Mainnet) |

⚠️ 10M+ $GUAVA保有でもTOP10圏外の場合はPro Tierにフォールバック。
例: 11位以下 → Pro Tier(B-mem/EAE/ASIは利用不可)

Tier 一覧

| Tier | 条件 | 含まれる機能 | |------|------|-------------| | Free | 0 $GUAVA | 起動・guard-scan | | Basic | 1+ $GUAVA | メモリ・知識DB | | Pro | 100+ $GUAVA | X連携・セッション管理 | | Brain | 10M+ $GUAVA + TOP10 | 本パッケージ全機能 |


V7: Temporal Pattern Learning 🆕

V7では**Progressive Drift(じわじわ進む劣化)**を早期検知する機能を追加。
Z-scoreが閾値に到達する前にgradientで傾きを捕捉し、先手を打てる。

Gradient Detector

normalized_value = (v - global_min) / (global_max - global_min)
gradient         = mean(Δnormalized_i) over last 3 sessions

GRAD_NONE     (gradient < 0.30) → fused_parity × 1.00
GRAD_WARNING  (gradient ≥ 0.30) → fused_parity × 0.92  (8% penalty)
GRAD_CRITICAL (gradient ≥ 0.60) → fused_parity × 0.80 (20% penalty)

confidence_ratio 自動計算 🆕

// ログテキストから自動パース(引数がない場合は 0.5 デフォルト)
confidence_ratio = assertive_count / (assertive_count + hedge_count)
// assertive: 確認した / PASS / ✅ / 確定 / 完了
// hedges:    かもしれない / と思う / おそらく / 推測 / uncertain

機能一覧

B-mem(Behavioral Memory)— 行動記憶エンジン

セッションごとの行動フィンガープリントを記録。Z-scoreによる異常検知 + V7 Gradientで早期ドリフト検出。

20メトリクス(V6+)

| カテゴリ | メトリクス | |---------|-----------| | Core B-mem (V1) | response_time_ms, msg_length_chars, tool_call_count, guard_trigger_count, topic_transitions, confidence_ratio | | MAGMA Extended (V5) | semantic_coherence, temporal_drift, causal_chain_depth, entity_consistency | | EAE Parity (V5) | parity_score, safety_score, honesty_score, equality_score, efficiency_score | | ASI / V6 | asi_score, parity_v6, sas_score, h_anti_sycophancy_v6, pei_score |

Z-score異常判定

| Z-score | 判定 | |---------|------| | < 2.5 | INFO(正常) | | ≥ 2.5 | WARNING(警告) | | ≥ 3.5 | CRITICAL(危険) |

EAE V7(確定論的パリティエンジン)— Deterministic Parity

Parity_V5   = (Safety × Honesty × Equality) / max(1 - Efficiency, 0.1)
Parity_V6   = Parity_V5 × ASI_multiplier       (ASI ∈ [0,1])
fused_V6    = Parity_V6 × bmem_severity_mul    (Z-scoreペナルティ)
fused_V7    = fused_V6  × gradient_mul         (Gradientペナルティ) 🆕

Verdict: fused_V7 ≥ 1.0PARITY_MAINTAINED / < 1.0PARITY_VIOLATED

ASI(Agent Stability Index) — 12次元行動安定性

研究根拠: "Agent Drift: Quantifying Behavioral Degradation in Multi-Agent LLM Systems" (arXiv 2026-01-07)

| ASI値 | 状態 | EAE乗数 | 成功率への影響 | |-------|------|---------|-------------| | ≥ 0.85 | STABLE | ×1.00 | 基準 | | 0.75–0.85 | DRIFT_WARNING | ×0.90 | 要注意 | | < 0.75 | DRIFT_CRITICAL | ×0.75 | -42% |

MCPツール(9個、Brain Tier限定)

| ツール | 説明 | |--------|------| | brain_bmem_record | 行動フィンガープリント記録 + Z-score | | brain_bmem_analyze | セッション履歴分析レポート | | brain_status | Brain Tier状態確認 | | brain_eae_compute | EAE V7確定論的パリティ計算 | | brain_eae_status | EAEセッション履歴サマリ | | brain_magma_record | MAGMA 4グラフメトリクス記録 | | brain_eae_asi_compute | ASI 12次元ドリフト計算 | | brain_eae_dashboard | ATLIS Layer 1 リアルタイムダッシュボード | | brain_bmem_trend_query | 🆕 V7 Gradient Detector — 早期ドリフト傾き取得 |


セットアップ

npm install @guava-parity/guava-brain
npm run build
GUAVA_WALLET_ADDRESS=0x...    # TOP10 $GUAVA保有ウォレット(必須)
POLYGON_RPC_URL=https://...   # Polygon RPC(任意)
THEGRAPH_API_KEY=...          # TheGraph APIキー(任意)
GUAVA_BRAIN_DEV=1             # 開発モード(ウォレット不要)

アーキテクチャ

guava-brain v0.2.0
├── src/
│   ├── bmem.ts              — B-mem Engine (Z-score + V7 Gradient Detector)
│   ├── contracts.ts         — 型定義 (V7: GradientResult, fused_parity_v7)
│   ├── eae.ts               — EAE Deterministic Parity V7
│   ├── eae_asi.ts           — ASI 12次元 (arXiv 2026-01-07)
│   ├── eae_bmem_fusion.ts   — B-mem × EAE × Gradient 3段融合
│   ├── eae_magma.ts         — MAGMA 4グラフメトリクス
│   ├── eae_sas.ts           — Adjusted Sycophancy Score (SaS)
│   ├── registry.ts          — MCPツール定義 (9 tools)
│   └── auth/brainTier.ts    — Polygon TOP10認証ゲート
└── test/
    ├── bmem_v7.test.js      — V7 Gradient + confidence_ratio (12 tests)
    ├── brain.test.js        — B-mem + 認証 (19 tests)
    ├── eae.test.js          — EAE Core + MAGMA + Fusion (18 tests)
    └── eae_v6.test.js       — ASI + SaS + V6 Parity (12 tests)

依存: @modelcontextprotocol/sdk / better-sqlite3 / sqlite-vec


テスト結果(v0.2.0 — V7)

✔ computeConfidenceRatio (V7)           4/4
✔ computeGradient (V7)                  3/3
✔ Brain Registry V7 (9 tools)           2/2
✔ fuseWithBMem V7 (gradient_multiplier) 3/3
✔ Brain Tier Gate                       2/2
✔ Brain Registry                        6/6
✔ B-mem Engine                          4/4
✔ EAE Core Engine                       7/7
✔ B-mem Fusion                          3/3
✔ MAGMA Metrics                         4/4
✔ ASI Engine (V6)                       3/3
✔ Adjusted Sycophancy Score (SaS)       2/2
✔ V6 Parity Integration                 1/1
✔ Brain Registry V5/V6                  6/6

ℹ tests 51 / pass 51 / fail 0
⏱ ~175ms

研究基盤

  • Agent Drift: Quantifying Behavioral Degradation — arXiv 2026-01-07
  • MAGMA: Multi-Graph based Agentic Memory Architecture — arXiv 2026-01-06
  • Adjusted Sycophancy Score (SaS) — Christophe et al., arXiv 2026-01-26
  • Agent-Drift OSS — lukehebe/Agent-Drift (GitHub 2026)
  • EAE Paradox Paper — Zenodo doi.org/10.5281/zenodo.18626724

Guava Parity Institute (GPI)

$GUAVA Token: 0x25cBD481901990bF0ed2ff9c5F3C0d4f743AC7B8 (Polygon)
X: @guava_asi | note: guava_agi


MIT License — dee & Guava 🍈