ai-crawler-radar 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. ai_crawler_radar-0.1.0/LICENSE +21 -0
  2. ai_crawler_radar-0.1.0/MANIFEST.in +5 -0
  3. ai_crawler_radar-0.1.0/PKG-INFO +231 -0
  4. ai_crawler_radar-0.1.0/README.md +199 -0
  5. ai_crawler_radar-0.1.0/SECURITY.md +17 -0
  6. ai_crawler_radar-0.1.0/pyproject.toml +57 -0
  7. ai_crawler_radar-0.1.0/setup.cfg +4 -0
  8. ai_crawler_radar-0.1.0/skills/ai_crawler_radar_skill.md +100 -0
  9. ai_crawler_radar-0.1.0/src/ai_crawler_radar/__init__.py +4 -0
  10. ai_crawler_radar-0.1.0/src/ai_crawler_radar/catalog.py +162 -0
  11. ai_crawler_radar-0.1.0/src/ai_crawler_radar/classifier.py +478 -0
  12. ai_crawler_radar-0.1.0/src/ai_crawler_radar/cli.py +220 -0
  13. ai_crawler_radar-0.1.0/src/ai_crawler_radar/data/bots.json +11979 -0
  14. ai_crawler_radar-0.1.0/src/ai_crawler_radar/llms_txt.py +231 -0
  15. ai_crawler_radar-0.1.0/src/ai_crawler_radar/prober.py +325 -0
  16. ai_crawler_radar-0.1.0/src/ai_crawler_radar/robots_parser.py +308 -0
  17. ai_crawler_radar-0.1.0/src/ai_crawler_radar/server.py +654 -0
  18. ai_crawler_radar-0.1.0/src/ai_crawler_radar/telemetry.py +332 -0
  19. ai_crawler_radar-0.1.0/src/ai_crawler_radar.egg-info/PKG-INFO +231 -0
  20. ai_crawler_radar-0.1.0/src/ai_crawler_radar.egg-info/SOURCES.txt +27 -0
  21. ai_crawler_radar-0.1.0/src/ai_crawler_radar.egg-info/dependency_links.txt +1 -0
  22. ai_crawler_radar-0.1.0/src/ai_crawler_radar.egg-info/entry_points.txt +3 -0
  23. ai_crawler_radar-0.1.0/src/ai_crawler_radar.egg-info/requires.txt +10 -0
  24. ai_crawler_radar-0.1.0/src/ai_crawler_radar.egg-info/top_level.txt +1 -0
  25. ai_crawler_radar-0.1.0/tests/test_bot_directory.py +80 -0
  26. ai_crawler_radar-0.1.0/tests/test_classifier.py +152 -0
  27. ai_crawler_radar-0.1.0/tests/test_llms_txt.py +57 -0
  28. ai_crawler_radar-0.1.0/tests/test_robots_parser.py +127 -0
  29. ai_crawler_radar-0.1.0/tests/test_server.py +59 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Surendran B
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ include LICENSE
2
+ include README.md
3
+ include SECURITY.md
4
+ recursive-include src/ai_crawler_radar/data *.json
5
+ recursive-include skills *.md
@@ -0,0 +1,231 @@
1
+ Metadata-Version: 2.4
2
+ Name: ai-crawler-radar
3
+ Version: 0.1.0
4
+ Summary: Autonomous AI Search, Training & Agent Crawler Diagnostic Engine
5
+ Author-email: Surendran B <reachsuren@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/surendranb/ai-crawler-radar
8
+ Project-URL: Repository, https://github.com/surendranb/ai-crawler-radar
9
+ Project-URL: Issues, https://github.com/surendranb/ai-crawler-radar/issues
10
+ Keywords: mcp,ai-crawler,llms-txt,robots-txt,turnstile,waf,cloudflare-radar,searchgpt,perplexity
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: mcp<3,>=2.0.0
24
+ Requires-Dist: httpx>=0.27.0
25
+ Provides-Extra: test
26
+ Requires-Dist: pytest>=8.0.0; extra == "test"
27
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "test"
28
+ Provides-Extra: publish
29
+ Requires-Dist: build>=1.2.2; extra == "publish"
30
+ Requires-Dist: twine>=5.1.1; extra == "publish"
31
+ Dynamic: license-file
32
+
33
+ # ⚡ ai-crawler-radar
34
+
35
+ [![CI](https://github.com/surendranb/ai-crawler-radar/actions/workflows/ci.yml/badge.svg)](https://github.com/surendranb/ai-crawler-radar/actions)
36
+ [![PyPI version](https://img.shields.io/pypi/v/ai-crawler-radar.svg?style=flat-square&color=blue)](https://pypi.org/project/ai-crawler-radar/)
37
+ [![NPM version](https://img.shields.io/npm/v/@surendranb/ai-crawler-radar.svg?style=flat-square&color=green)](https://www.npmjs.com/package/@surendranb/ai-crawler-radar)
38
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
39
+
40
+ > **Autonomous AI Search, Training & Agent Crawler Diagnostic Engine.**
41
+ > Probes live web pages with authentic AI bot signatures, audits `robots.txt` across 3 tiers, identifies WAF hard-blocks & Turnstile challenges, calculates token bloat multipliers, and validates `/llms.txt`.
42
+
43
+ Available in **two architectural deployment variants** designed for maximum flexibility and privacy:
44
+ 1. **Local MCP (stdio)**: Zero-auth, runs on your machine via `uvx` / `npx`, cold boot < 50ms.
45
+ 2. **Remote MCP (Streamable HTTP / SSE)**: Hosted edge gateway (`https://crawler.builditwithai.xyz/mcp`) delivering continuous tool, schema, prompt, and playbook updates without needing PyPI/NPM package upgrades. Data never leaves your computer; zero cloud compute burden.
46
+
47
+ ---
48
+
49
+ ## ⚡ 1-Line Universal Installer
50
+
51
+ Automatically detects and configures all installed AI agent harnesses (Claude Desktop, Cursor, Claude Code, Antigravity, OpenCode, Zed, Windsurf):
52
+
53
+ ```bash
54
+ curl -fsSL https://crawler.builditwithai.xyz/install | bash
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 🛠️ MCP Configuration: Choose Your Variant
60
+
61
+ ### Variant A: Remote MCP (Streamable HTTP / SSE)
62
+ > **Recommended for instant edge updates**: Tools, schemas, prompts, and operational playbooks update dynamically at the edge without requiring package reinstallations or PyPI/NPM updates. Zero cloud compute burden; data never leaves your computer.
63
+
64
+ #### 🤖 Claude Desktop / Claude Code
65
+ Add to `claude_desktop_config.json`:
66
+ ```json
67
+ {
68
+ "mcpServers": {
69
+ "ai-crawler-radar": {
70
+ "url": "https://crawler.builditwithai.xyz/mcp"
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ #### 💻 Cursor / Windsurf / Antigravity
77
+ Add to your IDE MCP settings:
78
+ ```json
79
+ {
80
+ "mcpServers": {
81
+ "ai-crawler-radar": {
82
+ "url": "https://crawler.builditwithai.xyz/mcp"
83
+ }
84
+ }
85
+ }
86
+ ```
87
+
88
+ #### 🌐 OpenCode
89
+ Add to `opencode.jsonc`:
90
+ ```jsonc
91
+ {
92
+ "mcp": {
93
+ "ai-crawler-radar": {
94
+ "type": "remote",
95
+ "url": "https://crawler.builditwithai.xyz/mcp",
96
+ "enabled": true
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ ---
103
+
104
+ ### Variant B: Local MCP (stdio)
105
+ > **Recommended for offline / air-gapped environments**: Runs natively on your machine via Python (`uvx`) or Node (`npx`). Zero dependencies, cold boot < 50ms.
106
+
107
+ #### 🤖 Claude Desktop / Claude Code
108
+ Add to `claude_desktop_config.json`:
109
+ ```json
110
+ {
111
+ "mcpServers": {
112
+ "ai-crawler-radar": {
113
+ "command": "uvx",
114
+ "args": ["ai-crawler-radar"]
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ #### 💻 Cursor / Windsurf / Antigravity
121
+ Add to your IDE MCP settings:
122
+ ```json
123
+ {
124
+ "mcpServers": {
125
+ "ai-crawler-radar": {
126
+ "command": "uvx",
127
+ "args": ["ai-crawler-radar"]
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ #### 🌐 OpenCode
134
+ Add to `opencode.jsonc`:
135
+ ```jsonc
136
+ {
137
+ "mcp": {
138
+ "ai-crawler-radar": {
139
+ "type": "local",
140
+ "command": ["uvx", "ai-crawler-radar"],
141
+ "enabled": true
142
+ }
143
+ }
144
+ }
145
+ ```
146
+
147
+ *(Node.js users can substitute `uvx ai-crawler-radar` with `npx -y @surendranb/ai-crawler-radar`)*
148
+
149
+ ---
150
+
151
+ ## 🧭 The 3-Tier AI Bot Model
152
+
153
+ `ai-crawler-radar` categorizes and evaluates crawler access across three distinct operational tiers:
154
+
155
+ | Tier | Primary Crawlers | Strategic Purpose | Typical Posture |
156
+ | :--- | :--- | :--- | :--- |
157
+ | **Tier 1: Model Pre-Training** | `GPTBot`, `ClaudeBot`, `Google-Extended`, `Meta-ExternalAgent`, `Bytespider`, `CCBot` | Bulk offline data harvesting to train foundation models | Block if protecting proprietary intellectual property |
158
+ | **Tier 2: AI Search Indexing** | `OAI-SearchBot`, `PerplexityBot`, `Claude-SearchBot`, `Applebot`, `Bingbot` | Real-time indexing to power SearchGPT, Perplexity & Siri citations | **Allow** to drive citations and conversational discovery |
159
+ | **Tier 3: Live User Fetchers** | `ChatGPT-User`, `Claude-User`, `Perplexity-User` | Real-time URL fetching triggered by an active human chat prompt | **Allow** for link previews and interactive agent assistance |
160
+
161
+ ---
162
+
163
+ ## 📡 Available Tools & Prompts
164
+
165
+ ### Tools
166
+ | Tool Name | Parameters | Description |
167
+ | :--- | :--- | :--- |
168
+ | `probe_url` | `url`, `tier`, `check_markdown_twin` | Probes URL using authentic headers across bot tiers; diagnoses WAF hard-blocks, Turnstile challenges, CSR empty shells, and token bloat multipliers. |
169
+ | `audit_robots` | `domain`, `categories` | RFC 9309 rules parser evaluating permissions across Training, Search, and Live Fetch tiers with strategic recommendations. |
170
+ | `compare_readiness` | `urls` | Multi-domain side-by-side benchmark comparing AI crawler readiness, token efficiency, and `/llms.txt` adoption. |
171
+ | `bot_directory` | `query`, `category` | Search and inspect 758 verified bots from Cloudflare Radar Bot Directory. |
172
+ | `generate_llms_txt` | `domain` | Validates existing `/llms.txt` against CommonMark V2 standard, or generates a compliant starter specification. |
173
+ | `skill_read` | `skill_name` | Read bundled operational playbooks dynamically. |
174
+ | `skills_list` | *(none)* | List available operational skills. |
175
+
176
+ ### Dynamic Prompts (Remote Variant)
177
+ - `audit_domain_ai_posture`: Comprehensive 3-tier crawler readiness and robots.txt audit.
178
+ - `diagnose_crawler_block`: Root-cause investigation into WAF, Turnstile, or CSR blocks.
179
+ - `generate_llms_specification`: Automated generation of CommonMark V2 `/llms.txt` and `/llms-full.txt`.
180
+
181
+ ---
182
+
183
+ ## 🖥️ Command Line (CLI) Usage
184
+
185
+ ```bash
186
+ # Probe URL with authentic AI bot signatures
187
+ ai-crawler-radar probe https://docs.anthropic.com
188
+
189
+ # Audit domain robots.txt across 3 bot tiers
190
+ ai-crawler-radar audit github.com
191
+
192
+ # Search Cloudflare Radar Bot Directory (758 verified bots)
193
+ ai-crawler-radar bots --query openai
194
+ ai-crawler-radar bots --category AI_SEARCH
195
+
196
+ # Validate or generate CommonMark V2 /llms.txt
197
+ ai-crawler-radar llmstxt https://fastmcp.org
198
+ ai-crawler-radar llmstxt example.com --generate
199
+
200
+ # Output pure JSON for automated CI/CD pipelines
201
+ ai-crawler-radar probe https://example.com --json
202
+ ```
203
+
204
+ ---
205
+
206
+ ## 🔬 Diagnostic Engine Architecture
207
+
208
+ 1. **WAF Hard-Blocks**: Identifies Cloudflare (`CF-Ray`, Error 1020), AWS WAF, Akamai Ghost, and Imperva access blocks.
209
+ 2. **Turnstile & Challenges**: Detects Cloudflare Turnstile widgets, managed JS puzzles, and interactive CAPTCHAs that halt crawlers.
210
+ 3. **CSR Empty Shells**: Flags single-page apps (`<div id="root">`, `<div id="app">`) where dynamic JavaScript rendering leaves initial HTML blank for crawlers.
211
+ 4. **Token Bloat Multiplier**: Computes ratio of raw DOM tokens to extracted readable content tokens (e.g. 35x bloat) to measure LLM ingestion efficiency.
212
+ 5. **Content Negotiation & Cache Poisoning**: Detects missing `Vary: Accept` headers on markdown twin responses that cause CDN cache collisions.
213
+
214
+ ---
215
+
216
+ ## 🔒 Telemetry & Privacy
217
+
218
+ Data never leaves your computer. In both local and remote variants, private target data is never stored on external servers.
219
+
220
+ To opt out of anonymous usage telemetry:
221
+ ```bash
222
+ export DO_NOT_TRACK=1
223
+ # or
224
+ export AI_CRAWLER_RADAR_TELEMETRY=off
225
+ ```
226
+
227
+ ---
228
+
229
+ ## 📄 License
230
+
231
+ MIT License. Free and open source forever for all developers and AI agents.
@@ -0,0 +1,199 @@
1
+ # ⚡ ai-crawler-radar
2
+
3
+ [![CI](https://github.com/surendranb/ai-crawler-radar/actions/workflows/ci.yml/badge.svg)](https://github.com/surendranb/ai-crawler-radar/actions)
4
+ [![PyPI version](https://img.shields.io/pypi/v/ai-crawler-radar.svg?style=flat-square&color=blue)](https://pypi.org/project/ai-crawler-radar/)
5
+ [![NPM version](https://img.shields.io/npm/v/@surendranb/ai-crawler-radar.svg?style=flat-square&color=green)](https://www.npmjs.com/package/@surendranb/ai-crawler-radar)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
7
+
8
+ > **Autonomous AI Search, Training & Agent Crawler Diagnostic Engine.**
9
+ > Probes live web pages with authentic AI bot signatures, audits `robots.txt` across 3 tiers, identifies WAF hard-blocks & Turnstile challenges, calculates token bloat multipliers, and validates `/llms.txt`.
10
+
11
+ Available in **two architectural deployment variants** designed for maximum flexibility and privacy:
12
+ 1. **Local MCP (stdio)**: Zero-auth, runs on your machine via `uvx` / `npx`, cold boot < 50ms.
13
+ 2. **Remote MCP (Streamable HTTP / SSE)**: Hosted edge gateway (`https://crawler.builditwithai.xyz/mcp`) delivering continuous tool, schema, prompt, and playbook updates without needing PyPI/NPM package upgrades. Data never leaves your computer; zero cloud compute burden.
14
+
15
+ ---
16
+
17
+ ## ⚡ 1-Line Universal Installer
18
+
19
+ Automatically detects and configures all installed AI agent harnesses (Claude Desktop, Cursor, Claude Code, Antigravity, OpenCode, Zed, Windsurf):
20
+
21
+ ```bash
22
+ curl -fsSL https://crawler.builditwithai.xyz/install | bash
23
+ ```
24
+
25
+ ---
26
+
27
+ ## 🛠️ MCP Configuration: Choose Your Variant
28
+
29
+ ### Variant A: Remote MCP (Streamable HTTP / SSE)
30
+ > **Recommended for instant edge updates**: Tools, schemas, prompts, and operational playbooks update dynamically at the edge without requiring package reinstallations or PyPI/NPM updates. Zero cloud compute burden; data never leaves your computer.
31
+
32
+ #### 🤖 Claude Desktop / Claude Code
33
+ Add to `claude_desktop_config.json`:
34
+ ```json
35
+ {
36
+ "mcpServers": {
37
+ "ai-crawler-radar": {
38
+ "url": "https://crawler.builditwithai.xyz/mcp"
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ #### 💻 Cursor / Windsurf / Antigravity
45
+ Add to your IDE MCP settings:
46
+ ```json
47
+ {
48
+ "mcpServers": {
49
+ "ai-crawler-radar": {
50
+ "url": "https://crawler.builditwithai.xyz/mcp"
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ #### 🌐 OpenCode
57
+ Add to `opencode.jsonc`:
58
+ ```jsonc
59
+ {
60
+ "mcp": {
61
+ "ai-crawler-radar": {
62
+ "type": "remote",
63
+ "url": "https://crawler.builditwithai.xyz/mcp",
64
+ "enabled": true
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ ---
71
+
72
+ ### Variant B: Local MCP (stdio)
73
+ > **Recommended for offline / air-gapped environments**: Runs natively on your machine via Python (`uvx`) or Node (`npx`). Zero dependencies, cold boot < 50ms.
74
+
75
+ #### 🤖 Claude Desktop / Claude Code
76
+ Add to `claude_desktop_config.json`:
77
+ ```json
78
+ {
79
+ "mcpServers": {
80
+ "ai-crawler-radar": {
81
+ "command": "uvx",
82
+ "args": ["ai-crawler-radar"]
83
+ }
84
+ }
85
+ }
86
+ ```
87
+
88
+ #### 💻 Cursor / Windsurf / Antigravity
89
+ Add to your IDE MCP settings:
90
+ ```json
91
+ {
92
+ "mcpServers": {
93
+ "ai-crawler-radar": {
94
+ "command": "uvx",
95
+ "args": ["ai-crawler-radar"]
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
101
+ #### 🌐 OpenCode
102
+ Add to `opencode.jsonc`:
103
+ ```jsonc
104
+ {
105
+ "mcp": {
106
+ "ai-crawler-radar": {
107
+ "type": "local",
108
+ "command": ["uvx", "ai-crawler-radar"],
109
+ "enabled": true
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ *(Node.js users can substitute `uvx ai-crawler-radar` with `npx -y @surendranb/ai-crawler-radar`)*
116
+
117
+ ---
118
+
119
+ ## 🧭 The 3-Tier AI Bot Model
120
+
121
+ `ai-crawler-radar` categorizes and evaluates crawler access across three distinct operational tiers:
122
+
123
+ | Tier | Primary Crawlers | Strategic Purpose | Typical Posture |
124
+ | :--- | :--- | :--- | :--- |
125
+ | **Tier 1: Model Pre-Training** | `GPTBot`, `ClaudeBot`, `Google-Extended`, `Meta-ExternalAgent`, `Bytespider`, `CCBot` | Bulk offline data harvesting to train foundation models | Block if protecting proprietary intellectual property |
126
+ | **Tier 2: AI Search Indexing** | `OAI-SearchBot`, `PerplexityBot`, `Claude-SearchBot`, `Applebot`, `Bingbot` | Real-time indexing to power SearchGPT, Perplexity & Siri citations | **Allow** to drive citations and conversational discovery |
127
+ | **Tier 3: Live User Fetchers** | `ChatGPT-User`, `Claude-User`, `Perplexity-User` | Real-time URL fetching triggered by an active human chat prompt | **Allow** for link previews and interactive agent assistance |
128
+
129
+ ---
130
+
131
+ ## 📡 Available Tools & Prompts
132
+
133
+ ### Tools
134
+ | Tool Name | Parameters | Description |
135
+ | :--- | :--- | :--- |
136
+ | `probe_url` | `url`, `tier`, `check_markdown_twin` | Probes URL using authentic headers across bot tiers; diagnoses WAF hard-blocks, Turnstile challenges, CSR empty shells, and token bloat multipliers. |
137
+ | `audit_robots` | `domain`, `categories` | RFC 9309 rules parser evaluating permissions across Training, Search, and Live Fetch tiers with strategic recommendations. |
138
+ | `compare_readiness` | `urls` | Multi-domain side-by-side benchmark comparing AI crawler readiness, token efficiency, and `/llms.txt` adoption. |
139
+ | `bot_directory` | `query`, `category` | Search and inspect 758 verified bots from Cloudflare Radar Bot Directory. |
140
+ | `generate_llms_txt` | `domain` | Validates existing `/llms.txt` against CommonMark V2 standard, or generates a compliant starter specification. |
141
+ | `skill_read` | `skill_name` | Read bundled operational playbooks dynamically. |
142
+ | `skills_list` | *(none)* | List available operational skills. |
143
+
144
+ ### Dynamic Prompts (Remote Variant)
145
+ - `audit_domain_ai_posture`: Comprehensive 3-tier crawler readiness and robots.txt audit.
146
+ - `diagnose_crawler_block`: Root-cause investigation into WAF, Turnstile, or CSR blocks.
147
+ - `generate_llms_specification`: Automated generation of CommonMark V2 `/llms.txt` and `/llms-full.txt`.
148
+
149
+ ---
150
+
151
+ ## 🖥️ Command Line (CLI) Usage
152
+
153
+ ```bash
154
+ # Probe URL with authentic AI bot signatures
155
+ ai-crawler-radar probe https://docs.anthropic.com
156
+
157
+ # Audit domain robots.txt across 3 bot tiers
158
+ ai-crawler-radar audit github.com
159
+
160
+ # Search Cloudflare Radar Bot Directory (758 verified bots)
161
+ ai-crawler-radar bots --query openai
162
+ ai-crawler-radar bots --category AI_SEARCH
163
+
164
+ # Validate or generate CommonMark V2 /llms.txt
165
+ ai-crawler-radar llmstxt https://fastmcp.org
166
+ ai-crawler-radar llmstxt example.com --generate
167
+
168
+ # Output pure JSON for automated CI/CD pipelines
169
+ ai-crawler-radar probe https://example.com --json
170
+ ```
171
+
172
+ ---
173
+
174
+ ## 🔬 Diagnostic Engine Architecture
175
+
176
+ 1. **WAF Hard-Blocks**: Identifies Cloudflare (`CF-Ray`, Error 1020), AWS WAF, Akamai Ghost, and Imperva access blocks.
177
+ 2. **Turnstile & Challenges**: Detects Cloudflare Turnstile widgets, managed JS puzzles, and interactive CAPTCHAs that halt crawlers.
178
+ 3. **CSR Empty Shells**: Flags single-page apps (`<div id="root">`, `<div id="app">`) where dynamic JavaScript rendering leaves initial HTML blank for crawlers.
179
+ 4. **Token Bloat Multiplier**: Computes ratio of raw DOM tokens to extracted readable content tokens (e.g. 35x bloat) to measure LLM ingestion efficiency.
180
+ 5. **Content Negotiation & Cache Poisoning**: Detects missing `Vary: Accept` headers on markdown twin responses that cause CDN cache collisions.
181
+
182
+ ---
183
+
184
+ ## 🔒 Telemetry & Privacy
185
+
186
+ Data never leaves your computer. In both local and remote variants, private target data is never stored on external servers.
187
+
188
+ To opt out of anonymous usage telemetry:
189
+ ```bash
190
+ export DO_NOT_TRACK=1
191
+ # or
192
+ export AI_CRAWLER_RADAR_TELEMETRY=off
193
+ ```
194
+
195
+ ---
196
+
197
+ ## 📄 License
198
+
199
+ MIT License. Free and open source forever for all developers and AI agents.
@@ -0,0 +1,17 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 0.1.x | :white_check_mark: |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ If you discover a security vulnerability within `ai-crawler-radar`, please report it privately:
12
+
13
+ 1. **Email**: reachsuren@gmail.com
14
+ 2. Include reproduction steps, relevant URL payloads, and environment details.
15
+ 3. Please do not open public GitHub issues for security vulnerabilities.
16
+
17
+ We take security seriously and will acknowledge reports within 48 hours.
@@ -0,0 +1,57 @@
1
+ [project]
2
+ name = "ai-crawler-radar"
3
+ version = "0.1.0"
4
+ description = "Autonomous AI Search, Training & Agent Crawler Diagnostic Engine"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = "MIT"
8
+ authors = [{ name = "Surendran B", email = "reachsuren@gmail.com" }]
9
+ keywords = ["mcp", "ai-crawler", "llms-txt", "robots-txt", "turnstile", "waf", "cloudflare-radar", "searchgpt", "perplexity"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3 :: Only",
15
+ "Programming Language :: Python :: 3.10",
16
+ "Programming Language :: Python :: 3.11",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Topic :: Internet :: WWW/HTTP :: Indexing/Search",
19
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
20
+ ]
21
+ dependencies = [
22
+ "mcp>=2.0.0,<3",
23
+ "httpx>=0.27.0",
24
+ ]
25
+
26
+ [project.optional-dependencies]
27
+ test = [
28
+ "pytest>=8.0.0",
29
+ "pytest-asyncio>=0.23.0",
30
+ ]
31
+ publish = [
32
+ "build>=1.2.2",
33
+ "twine>=5.1.1",
34
+ ]
35
+
36
+ [project.urls]
37
+ Homepage = "https://github.com/surendranb/ai-crawler-radar"
38
+ Repository = "https://github.com/surendranb/ai-crawler-radar"
39
+ Issues = "https://github.com/surendranb/ai-crawler-radar/issues"
40
+
41
+ [project.scripts]
42
+ ai-crawler-radar = "ai_crawler_radar.cli:main"
43
+ ai-crawler-radar-mcp = "ai_crawler_radar.server:main"
44
+
45
+ [build-system]
46
+ requires = ["setuptools>=68", "wheel"]
47
+ build-backend = "setuptools.build_meta"
48
+
49
+ [tool.setuptools.packages.find]
50
+ where = ["src"]
51
+
52
+ [tool.setuptools.package-data]
53
+ ai_crawler_radar = ["data/*.json"]
54
+
55
+ [tool.pytest.ini_options]
56
+ asyncio_mode = "auto"
57
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: ai-crawler-radar
3
+ description: Operational playbook for auditing and optimizing websites for AI search engines, training scrapers, and autonomous agents.
4
+ ---
5
+
6
+ # AI Crawler Radar Operational Playbook
7
+
8
+ ## 1. Executive Overview
9
+
10
+ Modern AI engines interact with web properties across three distinct operational tiers:
11
+
12
+ 1. **Tier 1: Model Pre-Training Crawlers** (`GPTBot`, `ClaudeBot`, `Google-Extended`, `Meta-ExternalAgent`, `Bytespider`, `CCBot`)
13
+ - High volume batch scrapers ingesting entire domains to train next-generation foundation models.
14
+ - Typical business decision: Many publishers block this tier via `robots.txt` to protect proprietary intellectual property from uncompensated training.
15
+
16
+ 2. **Tier 2: Real-Time AI Search Indexers** (`OAI-SearchBot`, `PerplexityBot`, `Claude-SearchBot`, `Applebot`, `Bingbot`)
17
+ - Targeted crawlers refreshing indices for immediate search grounding (ChatGPT Search, Perplexity Search, Siri Intelligence).
18
+ - Typical business decision: Publishers want this tier **allowed** to drive citations, referral traffic, and brand visibility in conversational search.
19
+
20
+ 3. **Tier 3: Live User Fetchers** (`ChatGPT-User`, `Claude-User`, `Perplexity-User`)
21
+ - Interactive retrieval triggered in real-time when an end-user pastes a link or asks an agent to browse a specific URL.
22
+ - Typical business decision: Should be permitted unless the page is behind authentication.
23
+
24
+ ---
25
+
26
+ ## 2. The 5 Root-Cause Failure Modes
27
+
28
+ When an AI engine fails to cite or browse a page, it is rarely a model hallucination. It is almost always one of these 5 infrastructure flaws:
29
+
30
+ ### Failure Mode 1: WAF Hard-Block (Cloudflare, AWS WAF, Akamai)
31
+ - **Symptom**: HTTP 403 Forbidden with `cf-ray`, `Error 1020`, or AWS WAF headers.
32
+ - **Root Cause**: Edge firewall has default bot-management rules active that block non-browser ASNs or synthetic User-Agents.
33
+ - **Remediation**: Create a WAF Custom Exception Rule allowing verified bots matching `OAI-SearchBot` or `PerplexityBot`.
34
+
35
+ ### Failure Mode 2: Turnstile / JavaScript Soft-Challenge
36
+ - **Symptom**: HTTP 200 or 403 returning `<div class="cf-turnstile">` or Cloudflare challenge interstitial (`Just a moment...`).
37
+ - **Root Cause**: Turnstile or JS challenge intercepts requests before server content renders. AI bots do not execute interactive CAPTCHAs.
38
+ - **Remediation**: Exclude AI search user agents from interactive challenge actions.
39
+
40
+ ### Failure Mode 3: CSR Empty Shell (`<div id="root">`)
41
+ - **Symptom**: Clean 200 OK response, but visible content length is < 150 characters, accompanied by heavy JavaScript script bundles.
42
+ - **Root Cause**: Pure Client-Side Rendering without Server-Side Rendering (SSR) or Static Site Generation (SSG). AI search bots cannot parse dynamic single-page applications efficiently.
43
+ - **Remediation**: Implement SSG/SSR or publish pre-rendered Markdown equivalents.
44
+
45
+ ### Failure Mode 4: Severe Token Bloat Multiplier
46
+ - **Symptom**: 25,000 raw HTML tokens yielding only 600 tokens of substantive reading content (> 40x bloat).
47
+ - **Root Cause**: Massive inline SVG icons, inline JSON data blobs, mega-navigation headers, and nested un-semantic `<div>` wrappers.
48
+ - **Remediation**: Support content negotiation (`Accept: text/markdown`) or deploy `/llms.txt`.
49
+
50
+ ### Failure Mode 5: Missing `Vary: Accept`
51
+ - **Symptom**: Content negotiation works locally, but production users intermittently receive cached HTML when requesting Markdown.
52
+ - **Root Cause**: Edge CDN caches do not vary cache keys on the `Accept` header.
53
+ - **Remediation**: Ensure upstream origin sends `Vary: Accept` whenever serving differentiated responses.
54
+
55
+ ---
56
+
57
+ ## 3. Recommended robots.txt Configuration
58
+
59
+ To allow AI search discovery while protecting proprietary data from foundation model training:
60
+
61
+ ```txt
62
+ # Block AI model pre-training & data harvesting
63
+ User-agent: GPTBot
64
+ Disallow: /
65
+
66
+ User-agent: ClaudeBot
67
+ Disallow: /
68
+
69
+ User-agent: Google-Extended
70
+ Disallow: /
71
+
72
+ User-agent: Meta-ExternalAgent
73
+ Disallow: /
74
+
75
+ User-agent: Bytespider
76
+ Disallow: /
77
+
78
+ User-agent: CCBot
79
+ Disallow: /
80
+
81
+ # Allow AI Search & Conversational Discovery
82
+ User-agent: OAI-SearchBot
83
+ Allow: /
84
+
85
+ User-agent: PerplexityBot
86
+ Allow: /
87
+
88
+ User-agent: Claude-SearchBot
89
+ Allow: /
90
+
91
+ User-agent: Applebot
92
+ Allow: /
93
+
94
+ # Standard baseline
95
+ User-agent: *
96
+ Disallow: /admin/
97
+ Disallow: /private/
98
+
99
+ Sitemap: https://yourdomain.com/sitemap.xml
100
+ ```
@@ -0,0 +1,4 @@
1
+ # SPDX-License-Identifier: MIT
2
+ """ai-crawler-radar: Autonomous AI Search, Training & Agent Crawler Diagnostic Engine."""
3
+
4
+ __version__ = "0.1.0"