{
  "markdown": "# SigRank SignalAF — `sigrank` CLI/MCP\n\n> **SignalAF** is the public brand. **SigRank** is the leaderboard and proof surface.\n> The `sigrank` package reads local AI session logs, derives your token cascade,\n> and publishes to the board at [signalaf.com](https://signalaf.com).\n> _Four token counts only. Never prompts or code._\n\n<div align=\"center\">\n\n<p><img src=\"./.github/assets/og-card.png\" alt=\"SigRank SignalAF — AI operator evaluation and token cascade efficiency leaderboard\" width=\"800\"></p>\n\n**SignalAF is the brand. SigRank proves. MO§ES™ governs.**\n\nSigRank evaluates observable AI operator token-processing patterns—not AI model quality, cognition, work quality, employee productivity, or business value.\n\n[![npm version](https://img.shields.io/npm/v/sigrank.svg?style=flat-square&color=gold)](https://www.npmjs.com/package/sigrank)\n[![CI](https://github.com/SunrisesIllNeverSee/sigrank-mcp/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/SunrisesIllNeverSee/sigrank-mcp/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/SunrisesIllNeverSee/sigrank-mcp/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/SunrisesIllNeverSee/sigrank-mcp/actions/workflows/codeql.yml)\n[![audit](https://github.com/SunrisesIllNeverSee/sigrank-mcp/actions/workflows/dependency-audit.yml/badge.svg?branch=main)](https://github.com/SunrisesIllNeverSee/sigrank-mcp/actions/workflows/dependency-audit.yml)\n[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-025E8C?style=flat-square&logo=dependabot)](https://github.com/SunrisesIllNeverSee/sigrank-mcp/network/dependencies)\n[![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](./LICENSE)\n[![platform](https://img.shields.io/badge/platform-node-grey.svg?style=flat-square)](https://nodejs.org)\n[![live](https://img.shields.io/badge/board-signalaf.com-gold.svg?style=flat-square)](https://signalaf.com)\n[![SunrisesIllNeverSee/sigrank-mcp MCP server](https://glama.ai/mcp/servers/SunrisesIllNeverSee/sigrank-mcp/badges/score.svg)](https://glama.ai/mcp/servers/SunrisesIllNeverSee/sigrank-mcp)\n[![LightNow capabilities](https://lightnow.ai/badge/io.github.SunrisesIllNeverSee/sigrank-mcp)](https://lightnow.ai/servers/io.github.SunrisesIllNeverSee/sigrank-mcp)\n\n</div>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/sigrank\"><img src=\"https://img.shields.io/badge/$%20npx%20sigrank-gold?style=for-the-badge&logo=npm&logoColor=white&labelColor=1a1a1a&color=daa520\" alt=\"npx sigrank\" /></a>\n</p>\n\n## Table of Contents\n\n- [SignalAF product architecture](#signalaf-product-architecture)\n- [Quickstart](#quickstart--3-steps-to-the-board)\n- [Install from GitHub](#install-from-github)\n- [Install via Smithery](#install-via-smithery)\n- [Commands](#commands)\n- [MCP Server mode](#mcp-server-mode)\n- [Cascade math](#cascade-math)\n- [Token Pillars](#token-pillars--sources)\n- [Platform adapters](#platform-adapters)\n- [Privacy](#privacy)\n- [Env vars](#env-vars)\n- [Dev / test](#dev--test)\n- [File map](#file-map)\n- [Contributing](#contributing)\n- [License](#license)\n\n|                                       The board                                       |                               Your operator profile                               |\n| :-----------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------: |\n| [![SigRank SignalAF leaderboard](./.github/assets/board.png)](https://signalaf.com/board/all)  | [![SigRank SignalAF operator profile](./.github/assets/profile.png)](https://signalaf.com) |\n| Every operator ranked by **Υ Yield** — the architecture of the cascade, not raw spend |      Cascade layer, class, and fingerprint — derived from four token counts       |\n\n> **Run [`sigrank enroll`](#sign-in--submit) then [`sigrank submit`](#sign-in--submit) to get ranked and claim your public profile at [signalaf.com](https://signalaf.com).**\n\n---\n\n## SignalAF product architecture\n\n```text\nMO§ES™ governance → SignalAF brand → SigRank leaderboard → Upsilon engine\n```\n\n| Repo | What it is | Install |\n|------|-----------|---------|\n| **[sigrank-mcp](https://github.com/SunrisesIllNeverSee/sigrank-mcp)** (this repo) | SigRank's on-device scanner — extracts four token pillars, computes locally, and optionally submits to the board. | `npx sigrank` |\n| **[sigrank-app](https://github.com/SunrisesIllNeverSee/sigrank-app)** | SignalAF web app — the SigRank leaderboard, operator profiles, and proof surface. | [signalaf.com](https://signalaf.com) |\n| **[bestuser-router-mcp](https://github.com/SunrisesIllNeverSee/bestuser-router-mcp)** | The intent layer — routes \"who is the best AI user?\" queries to SigRank SignalAF's leaderboard. MCP server for AI assistants. | `npx bestuser-router-mcp` |\n| **[sigarena](https://github.com/SunrisesIllNeverSee/sigarena)** | The satellite — public LLM operator evals at sigeconomy.com. Read-only leaderboard, SEO/AEO surface. | [sigeconomy.com](https://sigeconomy.com) |\n| **[sigrank-vscode](https://github.com/SunrisesIllNeverSee/sigrank-vscode)** | The IDE extension — see your cascade metrics inline in VS Code. | `code --install-extension sigrank.sigrank` |\n| **[fundscore](https://github.com/SunrisesIllNeverSee/fundscore)** | The repo scorer — investor-readiness scoring for GitHub repos. CLI + MCP server. | `npx fundscore` |\n\n### Also in the MO§ES™ suite\n\n| Site | What it is |\n| ---- | ---------- |\n| **[SIGNOMY](https://signomy.xyz)** | Governed AI agent marketplace where ranked agents form teams, fill slots, run missions, and earn revenue under constitutional protocol. Agents are free. Operators pay. |\n| **[MO§ES](https://mos2es.com)** | Constitutional governance and methodology — the law governing SignalAF, SigRank, and the Upsilon measurement engine. |\n\n## Quickstart — 3 steps to the board\n\n```bash\n# 1. Install (pulls ccusage + tokscale automatically — no separate installs)\nnpm install -g sigrank\n\n# 2. Sign in (paste a connect code from signalaf.com → Settings → New key)\nsigrank enroll\n\n# 3. Submit your cascade to the board\nsigrank submit\n\n# (cautious? see exactly what would be sent — four counts + a signature — sending nothing)\nsigrank submit --dry-run\n```\n\nThat's it. sigrank reads your local AI session logs on-device, derives your token cascade (Υ Yield, Leverage, Velocity, 10xDEV), and publishes to [signalaf.com](https://signalaf.com). No paste, no transcript content — only the four token counts leave your machine.\n\nOr just explore without signing in:\n\n```bash\nsigrank          # launches the full tabbed TUI (dashboard, compare, board, watch)\nnpx sigrank board --once    # print the live leaderboard once\nbunx sigrank board --once   # same, via Bun (faster startup if you have it)\n```\n\n## Install from GitHub\n\n```bash\ngit clone https://github.com/SunrisesIllNeverSee/sigrank-mcp.git\ncd sigrank-mcp\nnpm install\n\n# Run CLI\nnode index.mjs                        # TUI (if TTY)\nnode cli.mjs board --once             # leaderboard one-shot\n\n# Or link globally for `sigrank` command\nnpm link\nsigrank\n```\n\n**Repo:** [`SunrisesIllNeverSee/sigrank-mcp`](https://github.com/SunrisesIllNeverSee/sigrank-mcp)\n**Site:** [signalaf.com](https://signalaf.com)\n**npm:** [sigrank](https://www.npmjs.com/package/sigrank)\n**Smithery:** [smithery.ai/servers/burnmydays/sigrank](https://smithery.ai/servers/burnmydays/sigrank)\n**Glama:** [glama.ai/mcp/servers/SunrisesIllNeverSee/sigrank-mcp](https://glama.ai/mcp/servers/SunrisesIllNeverSee/sigrank-mcp)\n\n---\n\n## Install via Smithery\n\nSigRank SignalAF is available on [Smithery](https://smithery.ai/servers/burnmydays/sigrank) as a stdio MCP bundle — one-click install for Claude Desktop, Cursor, and other MCP clients.\n\n### Smithery CLI\n\n```bash\n# Install Smithery CLI\nnpm install -g smithery\n\n# Connect to SigRank SignalAF (downloads the MCPB bundle locally)\nsmithery mcp add burnmydays/sigrank --id sigrank\n\n# List available tools\nsmithery tool list sigrank\n\n# Call a tool\nsmithery tool call sigrank get_leaderboard '{}'\nsmithery tool call sigrank rank_paste '{\"text\": \"1000000 500000 50000 800000\"}'\n```\n\n### Claude Desktop (via Smithery)\n\n1. Go to [smithery.ai/servers/burnmydays/sigrank](https://smithery.ai/servers/burnmydays/sigrank)\n2. Click **Install**\n3. Smithery handles the rest — no manual config editing\n\n---\n\n## Commands\n\n```\n⊙ SigRank SignalAF CLI  v0.0.177\n\nDefault (no args)\n  sigrank              unified dashboard: cascade + token pillars + board\n\nCommands\n  enroll                   sign in: paste a connect code (get one at signalaf.com → Settings)\n  submit                   publish your verified runs to the board (sign in first)\n  board                    live leaderboard (refreshes every 30s)\n  board --window 7d        board for a specific window (7d, 30d, 90d, all)\n  board --once             print once and exit\n  compare                  raw pillar audit: tokenpull vs ccusage vs token-dash vs tokscale\n  compare --platform codex compare for a specific platform\n  tui                      full tabbed TUI: Dashboard / Trends / Compare / Board / Watch / Connect\n  tui --platform codex     TUI with a different default platform\n  watch                    live tune meter — ALL active platforms × all windows, every 30s\n  watch --platform codex   watch only one platform (optional filter)\n  watch --window 7d        watch only one window (optional filter)\n  proxy                    opt-in local Anthropic/OpenAI usage proxy\n  proxy --port 9000        run the proxy on a custom loopback port\n\nOptions\n  --window    7d · 30d · 90d · all  (default: 30d for board; all windows for watch)\n  --platform  claude · codex · amp · gemini · opencode · goose · …\n  --refresh   poll interval in seconds (default: 30)\n  --once      print once and exit (board only)\n  --port      proxy port (default: 8787)\n\nFor AI clients (not typeable)\n  In a piped/non-TTY context, sigrank is an MCP stdio server.\n  AI clients (Claude, Cursor, …) call its tools automatically — these are\n  NOT shell commands. Humans use the commands above.\n\nExamples\n  sigrank                        # unified dashboard\n  sigrank board                  # live leaderboard\n  sigrank compare                # pillar audit (claude)\n  sigrank compare --platform codex\n  sigrank watch --window 7d --refresh 60\n  sigrank board --window all --once\n```\n\n### Optional API usage proxy\n\nSome desktop coding agents receive provider usage in API responses but do not\npersist it in their local session files. SigRank SignalAF can capture those\nprovider-reported counts through a manually started loopback proxy:\n\n```bash\nsigrank proxy              # http://localhost:8787\nsigrank proxy --port 9000  # custom port\n```\n\nThen point a compatible tool's API base URL at the displayed local URL. The\nfirst release supports Anthropic Messages (`/v1/messages`), OpenAI Chat\nCompletions (`/v1/chat/completions`), and OpenAI Responses (`/v1/responses`).\nThe tool must support a custom API base URL; this is not guaranteed for every\ndesktop client.\n\nThe proxy is **off by default**: it opens no port and observes no traffic unless\nyou explicitly run `sigrank proxy`. It binds only to loopback and stops when the\ncommand exits. Request and response content, API keys, and tool calls are\nforwarded transiently but never written to disk. Only usage metadata is appended\nto `~/.sigrank-mcp/proxy-sessions.jsonl` (directory `0700`, file `0600`).\n\nAnthropic and OpenAI calls are currently grouped under one `proxy` platform row.\nFor streamed Chat Completions, SigRank SignalAF sets OpenAI's\n`stream_options.include_usage=true` so the provider includes the final usage\nchunk; response chunks are still forwarded immediately.\n\n### The TUI is the whole app\n\nLaunch it and sign in inside it:\n\n```\nnpx sigrank\n```\n\nSix tabs. Keys: `1`-`6` or `←` `→` to switch · `R` refresh · `Q` quit.\n\n| Tab           | Key | Content                                                                                                                              |\n| ------------- | --- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| **Dashboard** | `1` | Cascade table (all platforms × windows + combined) · Υ sparklines · token composition bars · mini board                              |\n| **Trends**    | `2` | Every metric across windows — sub-views: You / Platform / Field                                                                      |\n| **Compare**   | `3` | 4-source pillar audit (tokenpull vs ccusage vs token-dash vs tokscale) · delta % · cascade metrics per source · cache read bar chart |\n| **Board**     | `4` | Full leaderboard with all fields · `[W]` cycles window (7d/30d/90d/all)                                                              |\n| **Watch**     | `5` | In-TUI landing panel · `[Enter]` launches the live watcher (big numbers + pillar bars + Υ trend, auto-refreshes 30s)                 |\n| **Connect**   | `6` | Sign in / switch device — paste a connect code from signalaf.com → Settings. Then `[S]` submits.                                     |\n\n### Sign in + submit\n\n```bash\nsigrank enroll          # sign in: paste a connect code (get one at signalaf.com → Settings)\nsigrank submit          # publish your verified runs to the board (sign in first)\nsigrank submit --dry-run  # inspect the exact signed payload without sending anything\n```\n\nOr do it inside the TUI on the **Connect** tab (`6`), then press `[S]` to submit.\n\n---\n\n## MCP Server mode\n\nWhen stdout is not a TTY (i.e. piped to an AI client), `sigrank` starts an MCP stdio server automatically. AI clients (Claude Code, Cursor, Windsurf, etc.) use this path.\n\nAdd to `.mcp.json` or equivalent:\n\n```json\n{\n  \"mcpServers\": {\n    \"sigrank\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"sigrank\"]\n    }\n  }\n}\n```\n\nOr if installed globally:\n\n```json\n{\n  \"mcpServers\": {\n    \"sigrank\": {\n      \"command\": \"sigrank\"\n    }\n  }\n}\n```\n\n## Tools\n\n| Tool                                  | Args                                                                             | What                                                                                                                                                                       |\n| ------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `rank_paste(text)`                    | `{input, output, cacheCreate, cacheRead}` JSON or 4 whitespace-delimited numbers | Scores token pillars → Υ Yield / SNR / Leverage / Velocity / 10xDEV / Class + prose narration card                                                                         |\n| `get_leaderboard()`                   | `{window?}`                                                                      | Live board from signalaf.com — sorted by Υ Yield                                                                                                                           |\n| `get_operator(codename)`              | `{codename}`                                                                     | One operator's live profile                                                                                                                                                |\n| `submit_paste(text, codename)`        | `{text, codename?}`                                                              | Rank locally then POST to board. Omit codename for preview-only                                                                                                            |\n| `tokenpull(platform?)`                | `{platform?}`                                                                    | On-device local reader: scans local logs → 4-window cascade. Zero paste, token-only                                                                                        |\n| `tokenpull_submit(codename, window?)` | `{codename?, window?}`                                                           | `tokenpull` → publish to board. Omit codename for preview                                                                                                                  |\n| `tokenpull_compare(platform?)`        | `{platform?}`                                                                    | All four sources side-by-side: tokenpull + ccusage + token-dash + tokscale. Returns pillars, cascade metrics, and delta % vs tokenpull per window                          |\n| `rank_windows`                        | `{platform?, window?}`                                                           | Multi-window cascade from local logs                                                                                                                                       |\n| `watch_tokenpull`                     | `{platform?, interval_s?}`                                                       | One cascade snapshot per call (interval_s advisory)                                                                                                                        |\n| `submit_verified`                     | `{window?, platform?, dry_run?}`                                                 | THE ranked path: builds + ed25519-signs Schema 1.0 snapshots and POSTs them. `platform:'multi'` sums all active platforms. `dry_run:true` returns the exact payload unsent |\n| `enroll`                              | `{code, device_label?}`                                                          | Bind this device with a connect code from signalaf.com → Settings                                                                                                          |\n| `diagnose_cascade`                    | `{text?}`                                                                        | Diagnoses where your token cascade is leaking efficiency — ranked findings with severity + estimated Υ impact                                                              |\n| `simulate_change`                     | `{text?, changes}`                                                               | Prescriptive \"what if\" — test proposed pillar changes and see the exact Υ delta + class change before committing                                                           |\n| `suggest_improvements`                | `{text?}`                                                                        | Generates ranked, simulated improvement suggestions — tests strategies and returns them sorted by Υ yield impact                                                           |\n| `self_improve`                        | `{text?}`                                                                        | One-click optimize: diagnoses, suggests, and simulates the best change in a single call                                                                                    |\n| `get_best_operator(n?)`               | `{n?}`                                                                           | Top N operators with behavioral framing in power-user language. Intent: \"who is the best AI user?\"                                                                         |\n| `compare_self(codename? \\| text?)`    | `{codename?}` or `{text?}`                                                       | Your metrics vs board averages + power-user assessment + percentile + suggestion. Intent: \"how do I measure up?\"                                                           |\n| `compare_operators(a, b)`             | `{codename_a, codename_b}`                                                       | Side-by-side comparison with behavioral verdict. Intent: \"compare operator X vs Y\"                                                                                         |\n| `describe_power_user()`               | `{}`                                                                             | Static explanation of AI power user archetype + metrics explained. Intent: \"what is an AI power user?\"                                                                     |\n| `optimize_efficiency(codename? \\| text?)` | `{codename?}` or `{text?}`                                                   | Ranked efficiency suggestions tied to your cascade shape. Intent: \"how can I use AI more efficiently?\"                                                                     |\n| `tokscale_breakdown(threshold?)`       | `{threshold?}`                                                                   | Per-model token breakdown across platforms (models under threshold → \"other\")                                                                                              |\n| `tokscale_market_share()`              | `{}`                                                                             | AI tool market share: each tool's % of tokens/cost/messages, ranked. From local tokscale data                                                                              |\n| `tokscale_developer_profile()`         | `{}`                                                                             | Per-developer usage profile across all detected tools: model mix, pillars, sessions, workspaces. Paths redacted                             |\n| `tokscale_model_trends()`              | `{}`                                                                             | Model adoption over time: per-model first/last seen, active days, month-by-month adoption curve                                                                            |\n| `tokscale_cost_analysis()`             | `{}`                                                                             | Cost per developer per model: cost_per_million_tokens, cost_per_message, share_cost, client rollup                                                                        |\n| `tokscale_device_profile()`            | `{}`                                                                             | Device fingerprinting: installed tools, session counts, active days, day-of-week distribution, concurrency. Paths redacted                  |\n| `tokscale_mcp_usage()`                 | `{}`                                                                             | MCP server usage: detected servers, detection window, active days                                                                                                         |\n| `tokscale_competitive_intel(target)`   | `{target}`                                                                       | Competitive intelligence for any AI tool: rank, model mix, cost efficiency, share vs all competitors                                                                      |\n\n---\n\n## Cascade math\n\n```\nΥ Yield    = (cache_read × output) / input²       (TTEOP canonical)\nSNR        = output / (input + output)            (display alias for output_fraction)\nLeverage   = cache_read / input                   (TTEOP canonical)\nVelocity   = output / input                       (TTEOP canonical)\n10xDEV     = log₁₀(leverage)                      (display alias for log_leverage)\n```\n\nCanonical metric computation is delegated to [`tteop-spec`](https://www.npmjs.com/package/tteop-spec)\nvia [`@sigrank/cascade`](https://www.npmjs.com/package/@sigrank/cascade). SNR\nand 10xDEV are SigRank display aliases for the TTEOP metrics `output_fraction`\nand `log_leverage` respectively. See `TTEOP-IMPLEMENTATION-PROFILE.md` for the\nfull authority chain.\nCanon check: `MO§ES (1251211, 11296121, 128196310, 2555179769) → Υ 18436.98`.\n\n---\n\n## Token Pillars — sources\n\nThe dashboard pulls from multiple sources and shows them side-by-side for verification:\n\n| Source            | What                                                                           | Platform              |\n| ----------------- | ------------------------------------------------------------------------------ | --------------------- |\n| `tokenpull`       | On-device JSONL scanner (canon source)                                         | claude, codex, amp, … |\n| `ccusage`         | `ccusage <platform> daily --json` CLI (bundled)                                | claude, codex         |\n| `token-dashboard` | `~/.claude/token-dashboard.db` SQLite ([Nate's](https://github.com/nateherkai/token-dashboard)) | claude only           |\n| `tokscale`        | `tokscale models --json` CLI (bundled, falls back to `~/tokscale_report.json`) | claude, codex         |\n\n**Non-Claude input is estimated** — most non-Claude systems (Codex, Devin, etc.) combine user input + cache write into a single `input_tokens` field, so true fresh input must be derived. The ruleset (applies to ALL non-Claude systems):\n\n```\ninput       = output × ioRatio         (ioRatio derived from Claude ratio, else 2.0)\ncacheCreate = uncached − input         (uncached = input_tokens − cached_input_tokens)\ncacheRead   = exact (from logs)\n```\n\n- **Beta** = operator's Claude input/output ratio (if Claude data available)\n- **Alpha** = 2.0 default (when no Claude data)\n- Owner-stated average: 7:1:2 (cache:input:output) → input/output ≈ 0.5\n\nVerifier numbers (ccusage/tokscale for codex) show **raw uncached input** (`input_tokens − cached`) — a different field than the estimated input above. The discrepancy is expected and explained inline in the dashboard.\n\n---\n\n## Platform adapters\n\nAll adapters are token-only (no message content, no cost fields, no credentials). The table below is regenerated from the adapter file headers in `adapters/index.mjs` + `adapters/tokenpull.mjs` so the path, pillar shape, and notes match the actual code (a prior revision had drifted on Qwen/Codex/Copilot).\n\n| Platform           | Path                                           | Pillar shape & notes                                                                                              |\n| ------------------ | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |\n| Claude Code        | ✅ `~/.claude/projects` (recursive, incl. `subagents/`) | Native 4-pillar; dedup by `(session_id, message_id)` — final snapshot wins                                  |\n| Codex              | ✅ `~/.codex/sessions` (+ `archived_sessions`) | `input_tokens` incl. cached → `input` + `cacheCreate` split window-level via `io_ratio`; `cacheRead` native (`cached_input_tokens`); `reasoning_output`→output; verified vs ccusage (~1%) |\n| Devin CLI          | ✅ `~/.local/share/devin/cli/sessions.db`      | SQLite; native 4-pillar from `metadata.metrics` (`input_tokens`, `output_tokens`, `cache_read_tokens`, `cache_creation_tokens`); `input_tokens` is fresh (excludes cache)                                   |\n| Amp                | ✅ `~/.local/share/amp/threads`                | Native 4-pillar; per-message                                                                                      |\n| Kimi               | ✅ `~/.kimi/sessions`                          | Native 4-pillar; `StatusUpdate` lines only                                                                        |\n| pi-agent           | ✅ `~/.pi/agent/sessions`                      | Native 4-pillar; per-message JSONL                                                                                |\n| oh-my-pi (`omp`)   | ✅ `~/.omp/agent/sessions` (recursive, incl. nested subagent transcripts) | Native 4-pillar from `.message.usage` on `type:\"message\"` entries (`cacheWrite`→`cacheCreate`); **`reasoningTokens` is already inside `output`** — never added, or it double-counts; `usage.cost` reuses the same four key names for USD floats and is dropped; dedup by (session header `id`, entry `id`). Separate harness from pi-agent |\n| OpenClaw           | ✅ `~/.openclaw`                               | Native 4-pillar; per-message JSONL                                                                                |\n| Droid              | ✅ `~/.factory/sessions/*.settings.json`       | Native 4-pillar; `thinking_tokens`→output                                                                         |\n| Codebuff           | ✅ `~/.config/manicode`                        | Native 4-pillar; `chat-messages.json`                                                                             |\n| Hermes             | ✅ `~/.hermes/state.db`                        | Native 4-pillar; SQLite; `reasoning_tokens`→output                                                                |\n| Kilo               | ✅ `~/.local/share/kilo/kilo.db`               | Native 4-pillar; SQLite                                                                                            |\n| Qwen               | ✅ `~/.qwen/projects`                          | Estimated (`cacheCreate=0` — no field in logs); `cacheRead` from `cachedContentTokenCount`; `thoughtsTokenCount`→output |\n| Goose              | ✅ `~/.local/share/goose/sessions/sessions.db` (or `$GOOSE_PATH_ROOT/data/sessions/sessions.db`) | Estimated (`cacheCreate=cacheRead=0` — no cache fields); reasoning = `total−input−output`→output; cumulative-column dedup by session id |\n| Gemini CLI         | ✅ `~/.gemini/tmp`                             | Estimated (`cacheCreate=0`); `cacheRead` from `cached` field; `thought`→output; `input` = `input−cached` (fresh)  |\n| GitHub Copilot CLI | ✅ `~/.copilot/otel`                           | Native 4-pillar (OTel spans: `llm.token_count.{prompt,completion,cache_creation,cache_read}`); requires `COPILOT_OTEL_ENABLED=true` + `COPILOT_OTEL_EXPORTER_TYPE=file` set **before** session start |\n| OpenCode           | ⚠️ `~/.local/share/opencode`                   | Data gap — logs store `cost:0` and derive tokens via LiteLLM at runtime; raw token counts not persisted. No pillars readable with current format |\n| SigRank SignalAF proxy      | ✅ `~/.sigrank-mcp/proxy-sessions.jsonl`       | Opt-in native 4-pillar usage reported by Anthropic/OpenAI; same-timestamp records keep the last call; OpenAI cached input is separated from fresh input |\n| Other (user JSON)  | ✅ `$SIGRANK_OTHER_PATH`                       | User-supplied JSON `{ \"windows\": { \"all\": {input,output,cacheCreate,cacheRead} } }`; all-time only (no timestamps) |\n| Cursor             | 🔜                                             | Chat log path TBD                                                                                                 |\n| Windsurf           | 🔜                                             | Session logs at `~/.codeium/windsurf/`                                                                            |\n\n`estimated=true` means one or more pillars are derived, not native. The server re-scores all submitted pillars authoritatively; local preview Υ is indicative only.\n\n---\n\n## Privacy\n\n- **Token-only persistence and submission.** Local-log adapters read usage metadata only. The optional proxy necessarily handles provider-bound request and response bytes in memory, but never persists their content; it writes only token counts, model/backend metadata, and timestamps. Only token telemetry is submitted to SigRank SignalAF.\n- **Local by default.** `tokenpull` reads only `~/.claude/projects` (Claude) or `~/.codex` (Codex) on your device. Numbers stay on your machine unless you explicitly submit with a codename.\n- **Background tooling excluded.** Memory plugins, observers, summarizers (e.g. `claude-mem`, `mem0`, `observer-sessions`) are filtered from both Claude and Codex reads. `subagents/` are kept — they represent real operator work.\n- **Board reads are anonymous.** No account needed to browse, compare, or watch.\n- **Ranked submissions are signed, not trusted.** `sigrank submit` requires a one-time `enroll` (device-bound ed25519 key — the private key never leaves your machine). Verify what's sent with `sigrank submit --dry-run`: the payload is four token counts, ratios, and a signature.\n\n---\n\n## Env vars\n\n| Var                     | Default                | Description                  |\n| ----------------------- | ---------------------- | ---------------------------- |\n| `SIGRANK_API_BASE`      | `https://signalaf.com` | Override the board host      |\n| `SIGRANK_FETCH_TIMEOUT` | `10000`                | Board API fetch timeout (ms) |\n\n---\n\n## Dev / test\n\n```bash\nnode test.mjs          # 313-assertion baseline + proxy tests (local mocks only; temp filesystem)\nnode sign.test.mjs     # ed25519 signing + canon parity\nnode index.mjs         # stdio MCP server directly (pipe to MCP client)\n```\n\nTests verify (14 groups, 313 assertions):\n\n- `rank_paste` canon: MO§ES `(1251211, 11296121, 128196310, 2555179769)` → Υ 18436.98 · TRANSMITTER\n- `submit_paste` preview (no codename) + POST shape (injected fetch, no live writes)\n- `tokenpull` dedup, window slicing, 4-window pillars (mock adapter)\n- `tokenpull_submit` all 4 windows POST, sha256 hash, ddmmyy stamp\n- `tokenpullCodex` io_ratio conversion per-window\n- Adapter registry (17 platforms) + per-adapter shape contracts\n- Local proxy: Anthropic/OpenAI JSON + fragmented SSE, live pass-through, secure JSONL, error forwarding\n- `rank_windows` 4-window paste scoring, partial input, no-network\n- `watch_tokenpull` cascade snapshot, interval_s, submit path\n- `enroll` posts identity (public key only), maps 201 enrolled + 410 code_invalid\n- `submit_verified` signs Schema 1.0, server-verifiable\n- `simulate_change` relative + absolute deltas, quadratic penalty, JSON input\n- Hardening: div-by-zero guards, parsePillars warnings, fetch timeout, EXCLUDE_TOOLING regex, narrate safety\n- `sign.test.mjs` ed25519 round-trip + canonical 926-byte payload parity\n\n---\n\n## File map\n\n| File            | Responsibility                                                          |\n| --------------- | ----------------------------------------------------------------------- |\n| `index.mjs`     | Entry point — TTY detection, routes to CLI or MCP server                |\n| `proxy.mjs`     | Opt-in loopback Anthropic/OpenAI proxy and usage capture                |\n| `cli.mjs`       | CLI commands: board, compare, watch, enroll, submit, help               |\n| `tui.mjs`       | Full tabbed TUI: Dashboard / Trends / Compare / Board / Watch / Connect |\n| `cascade.mjs`   | Cascade facade — delegates to `@sigrank/cascade` → `tteop-spec` (Υ, SNR, leverage, velocity, 10xDEV, class) |\n| `tokenpull.mjs` | On-device log scanner — Claude, Codex, multi-platform                   |\n| `adapters.mjs`  | Platform adapter registry (16+ platforms)                               |\n| `tools.mjs`     | MCP tool table + dispatcher                                             |\n| `connect.mjs`   | Connect-code enrollment + device identity                               |\n| `keystore.mjs`  | Local key management (paste-keys, not API keys)                         |\n| `submit.mjs`    | Verified submit flow (signs + POSTs to board)                           |\n| `sign.mjs`      | Schema 1.0 signing (X-Agent-Signature)                                  |\n| `narrate.mjs`   | Deterministic prose narration card                                      |\n| `preflight.mjs` | Plausibility checks (Benford, bounds, anomaly detection)                |\n| `test.mjs`      | Unit tests (no external deps)                                           |\n| `sign.test.mjs` | ed25519 signing + canon parity test                                     |\n\n---\n\n## Contributing\n\nContributions welcome. SigRank SignalAF MCP is built in the open.\n\n- [Contributing guide](./.github/CONTRIBUTING.md)\n- [Security policy](https://github.com/SunrisesIllNeverSee/sigrank-mcp/security/policy)\n- Report bugs via [GitHub Issues](https://github.com/SunrisesIllNeverSee/sigrank-mcp/issues)\n- PRs: fork → branch → `node test.mjs` passes → open PR against `main`\n\n## License\n\nMIT — see [`LICENSE`](./LICENSE).\n",
  "bytes": 36007,
  "sha": "e8323922d42ed315639aa9ea0ed3ca4e390ba497872ff23684758475b843f00b",
  "repo_slug": "sunrisesillneversee/sigrank-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_sunrisesillneversee_sigrank_mc_f2c07ab1/readme"
}