tubesentry 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.
- tubesentry-0.1.0/.github/workflows/ci_tests.yml +41 -0
- tubesentry-0.1.0/.github/workflows/deploy_docs.yml +57 -0
- tubesentry-0.1.0/.github/workflows/publish_pypi.yml +33 -0
- tubesentry-0.1.0/.gitignore +18 -0
- tubesentry-0.1.0/LICENSE +21 -0
- tubesentry-0.1.0/PKG-INFO +234 -0
- tubesentry-0.1.0/README.md +196 -0
- tubesentry-0.1.0/docs/.vitepress/config.mjs +58 -0
- tubesentry-0.1.0/docs/audit.md +14 -0
- tubesentry-0.1.0/docs/guide/cli.md +58 -0
- tubesentry-0.1.0/docs/guide/creative-profiler.md +54 -0
- tubesentry-0.1.0/docs/guide/mcp-server.md +70 -0
- tubesentry-0.1.0/docs/guide/pro.md +37 -0
- tubesentry-0.1.0/docs/guide/python-sdk.md +48 -0
- tubesentry-0.1.0/docs/guide/quickstart.md +52 -0
- tubesentry-0.1.0/docs/guide/waste-categories.md +29 -0
- tubesentry-0.1.0/docs/index.md +43 -0
- tubesentry-0.1.0/docs/public/llms-full.txt +68 -0
- tubesentry-0.1.0/docs/public/llms.txt +54 -0
- tubesentry-0.1.0/package-lock.json +2536 -0
- tubesentry-0.1.0/package.json +14 -0
- tubesentry-0.1.0/pyproject.toml +81 -0
- tubesentry-0.1.0/tests/test_cli.py +50 -0
- tubesentry-0.1.0/tests/test_core_coverage_boost.py +67 -0
- tubesentry-0.1.0/tests/test_epro_adapted_features.py +126 -0
- tubesentry-0.1.0/tests/test_fixtures.py +23 -0
- tubesentry-0.1.0/tests/test_free_auditor.py +88 -0
- tubesentry-0.1.0/tests/test_id_extractor.py +56 -0
- tubesentry-0.1.0/tests/test_ingestor_multilang.py +103 -0
- tubesentry-0.1.0/tests/test_mcp_server.py +59 -0
- tubesentry-0.1.0/tubesentry/__init__.py +96 -0
- tubesentry-0.1.0/tubesentry/cli.py +180 -0
- tubesentry-0.1.0/tubesentry/contracts/__init__.py +51 -0
- tubesentry-0.1.0/tubesentry/contracts/exceptions.py +21 -0
- tubesentry-0.1.0/tubesentry/contracts/schemas.py +135 -0
- tubesentry-0.1.0/tubesentry/contracts/taxonomy.py +66 -0
- tubesentry-0.1.0/tubesentry/core/__init__.py +22 -0
- tubesentry-0.1.0/tubesentry/core/auditor.py +336 -0
- tubesentry-0.1.0/tubesentry/core/heuristics.py +238 -0
- tubesentry-0.1.0/tubesentry/core/seed_db.py +140 -0
- tubesentry-0.1.0/tubesentry/io/__init__.py +13 -0
- tubesentry-0.1.0/tubesentry/io/fixtures.py +202 -0
- tubesentry-0.1.0/tubesentry/io/ingestor.py +379 -0
- tubesentry-0.1.0/tubesentry/mcp_server.py +206 -0
- tubesentry-0.1.0/tubesentry/pro/__init__.py +8 -0
- tubesentry-0.1.0/tubesentry/pro/bridge.py +77 -0
- tubesentry-0.1.0/tubesentry/pro/installer.py +132 -0
- tubesentry-0.1.0/tubesentry/py.typed +1 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: CI Test Suite & Code Quality
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install Dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install -e ".[dev]"
|
|
29
|
+
|
|
30
|
+
- name: Lint with Ruff
|
|
31
|
+
run: |
|
|
32
|
+
ruff check tubesentry tests
|
|
33
|
+
|
|
34
|
+
- name: Type Check with Mypy
|
|
35
|
+
run: |
|
|
36
|
+
mypy tubesentry
|
|
37
|
+
continue-on-error: true
|
|
38
|
+
|
|
39
|
+
- name: Run Pytest with Coverage
|
|
40
|
+
run: |
|
|
41
|
+
pytest -v --tb=short --cov=tubesentry --cov-report=term-missing tests/
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Deploy VitePress Documentation & WASM Dropzone
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'docs/**'
|
|
8
|
+
- '.github/workflows/deploy_docs.yml'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
pages: write
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: pages
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0
|
|
28
|
+
|
|
29
|
+
- name: Setup Node
|
|
30
|
+
uses: actions/setup-node@v4
|
|
31
|
+
with:
|
|
32
|
+
node-version: 20
|
|
33
|
+
|
|
34
|
+
- name: Setup Pages
|
|
35
|
+
uses: actions/configure-pages@v4
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies & Build
|
|
38
|
+
run: |
|
|
39
|
+
npm install -D vitepress
|
|
40
|
+
npx vitepress build docs
|
|
41
|
+
|
|
42
|
+
- name: Upload artifact
|
|
43
|
+
uses: actions/upload-pages-artifact@v3
|
|
44
|
+
with:
|
|
45
|
+
path: docs/.vitepress/dist
|
|
46
|
+
|
|
47
|
+
deploy:
|
|
48
|
+
environment:
|
|
49
|
+
name: github-pages
|
|
50
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
51
|
+
needs: build
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
name: Deploy
|
|
54
|
+
steps:
|
|
55
|
+
- name: Deploy to GitHub Pages
|
|
56
|
+
id: deployment
|
|
57
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Publish tubesentry to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-and-publish:
|
|
11
|
+
name: Build and publish to PyPI
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Install build tools
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
pip install build
|
|
26
|
+
|
|
27
|
+
- name: Build sdist and wheel
|
|
28
|
+
run: python -m build
|
|
29
|
+
|
|
30
|
+
- name: Publish package distributions to PyPI
|
|
31
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
32
|
+
with:
|
|
33
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.so
|
|
5
|
+
*.pyd
|
|
6
|
+
.pytest_cache/
|
|
7
|
+
.coverage
|
|
8
|
+
htmlcov/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
*.egg-info/
|
|
12
|
+
.venv/
|
|
13
|
+
demo_youtube/
|
|
14
|
+
.mypy_cache/
|
|
15
|
+
.ruff_cache/
|
|
16
|
+
node_modules/
|
|
17
|
+
docs/.vitepress/dist/
|
|
18
|
+
docs/.vitepress/cache/
|
tubesentry-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TubeSentry Contributors
|
|
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,234 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: tubesentry
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-First YouTube & Performance Max Placement Waste Auditor & MCP Server
|
|
5
|
+
Project-URL: Homepage, https://tubesentry.dev
|
|
6
|
+
Project-URL: Documentation, https://tubesentry.dev/docs
|
|
7
|
+
Project-URL: Repository, https://github.com/flovv/tubesentry
|
|
8
|
+
Project-URL: Changelog, https://github.com/flovv/tubesentry/releases
|
|
9
|
+
Author: TubeSentry Core Team
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: claude-desktop,dv360,google-ads,made-for-kids,mcp-server,model-context-protocol,performance-max,placement-exclusions,youtube-ads
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: httpx>=0.25.0
|
|
25
|
+
Requires-Dist: mcp<2.0.0,>=1.2.0
|
|
26
|
+
Requires-Dist: numpy>=1.24.0
|
|
27
|
+
Requires-Dist: pandas>=2.0.0
|
|
28
|
+
Requires-Dist: pyarrow>=14.0.0
|
|
29
|
+
Requires-Dist: pydantic>=2.5.0
|
|
30
|
+
Requires-Dist: rich>=13.0.0
|
|
31
|
+
Requires-Dist: typer>=0.9.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: mypy>=1.8.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: ruff>=0.2.0; extra == 'dev'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# TubeSentry 🛡️
|
|
40
|
+
|
|
41
|
+
**The Agentic-First YouTube & Performance Max Placement Waste Auditor, Creative Targeting Engine & FastMCP Server**
|
|
42
|
+
|
|
43
|
+
[](https://github.com/flovv/tubesentry/actions/workflows/ci_tests.yml)
|
|
44
|
+
[](https://flovv.github.io/tubesentry/)
|
|
45
|
+
[](https://pypi.org/project/tubesentry/)
|
|
46
|
+
[](https://opensource.org/licenses/MIT)
|
|
47
|
+
[](https://www.python.org/)
|
|
48
|
+
[](https://modelcontextprotocol.io/)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### [📖 Interactive Documentation & Live Guide](https://flovv.github.io/tubesentry/)
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 💡 Why TubeSentry?
|
|
57
|
+
|
|
58
|
+
When running video campaigns on **Google Ads**, **Performance Max (PMax)**, **Demand Gen**, or **DV360**, algorithmic automated placement expansion routinely wastes **20% to 50%+** of advertising spend on low-intent, accidental, or non-human impressions:
|
|
59
|
+
|
|
60
|
+
* 👶 **Made-for-Kids & Toddler Brainrot:** CoComelon, Baby Shark, nursery rhymes, and toddler sing-alongs streamed on parent iPads (severe bounce rates and COPPA / GDPR-K regulatory risk).
|
|
61
|
+
* 🎧 **Passive Background Audio Streams:** 24/7 Lofi beats, sleep music, rain sounds, and meditation loops with zero active visual attention.
|
|
62
|
+
* 🎮 **Underage Minor Gaming Drains:** Roblox, Minecraft, Brawl Stars, and Skibidi Toilet mobile livestreams tapped accidentally by young children.
|
|
63
|
+
* 🌍 **Foreign Script Geo-Leakage:** Mismatched Cyrillic, Hindi, Arabic, Thai, or Asian broadcast TV channels consuming spend in local EU/US campaigns.
|
|
64
|
+
* 🤖 **AI Slop & Content Farms:** Split-screen Subway Surfers + synthetic voiceover shorts and click arbitrage farms with anomalous CTR and zero conversions.
|
|
65
|
+
* 🕳️ **Performance Sinkholes:** Placements burning $>3\times$ target CPA with 0 conversions.
|
|
66
|
+
* 🎯 **Creative Intent vs. Delivery Reality Gap:** Even clean channels often deliver far outside your creative brief. TubeSentry includes a **Gemini Creative Profiler** to evaluate your ad video URL or brief, extract your Ideal Customer Profile (ICP), and contrast **Expectation vs. Delivery Reality**.
|
|
67
|
+
|
|
68
|
+
TubeSentry is **100% local-first and privacy-preserving**: your placement CSV reports never leave your machine.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## ⚡ Quickstart
|
|
73
|
+
|
|
74
|
+
### Installation
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install tubesentry
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 1. Test Drive with 25,000 Synthetic Placements
|
|
81
|
+
|
|
82
|
+
Generate a realistic 25,000-row Google Ads placement report and run an instant audit diagnostic:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
tubesentry demo --out-dir ./demo_youtube
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 2. Audit Your Google Ads / DV360 Placement Report
|
|
89
|
+
|
|
90
|
+
Export your placement report from Google Ads (*Reports $\rightarrow$ Predefined reports $\rightarrow$ Other $\rightarrow$ Where ads showed $\rightarrow$ Download `.csv`*) or DV360 and run:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
tubesentry audit where_ads_showed.csv --lang de,en --cpa 45.0
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 3. Profile Creative Targeting Fit (Gemini Multimodal)
|
|
97
|
+
|
|
98
|
+
Pass your YouTube Ad URL or creative brief to compare your campaign intent against algorithmic delivery:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
tubesentry audit where_ads_showed.csv \
|
|
102
|
+
--ad-url "https://youtube.com/watch?v=your_ad_video" \
|
|
103
|
+
--ad-text "B2B enterprise cloud security platform for CISOs and DevSecOps teams" \
|
|
104
|
+
--html audit_deck.html
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 🐍 Python SDK API
|
|
110
|
+
|
|
111
|
+
TubeSentry seamlessly auto-detects multi-language CSV exports (**English, German, Spanish, French, Italian, Dutch**):
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
import tubesentry as ts
|
|
115
|
+
|
|
116
|
+
# Run instant placement audit
|
|
117
|
+
report = ts.audit_placements(
|
|
118
|
+
report="where_ads_showed.csv",
|
|
119
|
+
target_languages=["de", "en"],
|
|
120
|
+
target_cpa=40.0,
|
|
121
|
+
ad_url="https://youtube.com/watch?v=demo_video",
|
|
122
|
+
ad_text="Enterprise Kubernetes automation for DevOps and SRE teams.",
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
print(f"Audited Spend: €{report.total_spend:,.2f}")
|
|
126
|
+
print(f"Wasted Spend: €{report.total_wasted_spend:,.2f} ({report.wasted_spend_percentage:.1f}%)")
|
|
127
|
+
print(f"Quality Score: {report.weighted_quality_score:.1f} / 10.0")
|
|
128
|
+
|
|
129
|
+
if report.creative_alignment:
|
|
130
|
+
print(f"Targeting Fit: {report.creative_alignment.overall_alignment_score:.1f} / 10.0")
|
|
131
|
+
print(f"Off-Target Bleed: €{report.creative_alignment.off_target_spend:,.2f}")
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 🤖 Claude Desktop, Claude Code & Cursor MCP Server
|
|
137
|
+
|
|
138
|
+
TubeSentry includes a native **Model Context Protocol (FastMCP)** server. AI coding assistants and chat environments can audit placements and inspect channels directly in natural language.
|
|
139
|
+
|
|
140
|
+
### Claude Desktop Configuration
|
|
141
|
+
|
|
142
|
+
Add to your `claude_desktop_config.json`:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcpServers": {
|
|
147
|
+
"tubesentry": {
|
|
148
|
+
"command": "tubesentry-mcp"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Or run without installation via `uvx`:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"mcpServers": {
|
|
159
|
+
"tubesentry": {
|
|
160
|
+
"command": "uvx",
|
|
161
|
+
"args": ["--from", "tubesentry", "tubesentry-mcp"]
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Cursor IDE Configuration
|
|
168
|
+
|
|
169
|
+
Add to `.cursor/mcp.json`:
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"mcpServers": {
|
|
174
|
+
"tubesentry": {
|
|
175
|
+
"command": "tubesentry-mcp"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Example Natural Language Prompts
|
|
182
|
+
* *"Audit my Google Ads placement report at `~/Downloads/pmax_october.csv` for toddler brainrot and passive music streams."*
|
|
183
|
+
* *"Profile this YouTube video ad URL with Gemini: `https://youtube.com/watch?v=...` and tell me what contextual topics and negative exclusions to set in Google Ads."*
|
|
184
|
+
* *"Inspect these 5 YouTube channels for COPPA and background audio risk: `UCbCmjCuTUZos6Inko4u57UQ`, `UCSJ4gkVC6NrvII8umztf0Ow`."*
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 📊 Open-Core vs. TubeSentry Pro
|
|
189
|
+
|
|
190
|
+
| Feature | Open-Core `tubesentry` (Free) | `tubesentry_pro` (Licensed) |
|
|
191
|
+
| :--- | :---: | :---: |
|
|
192
|
+
| **Exact Category Spend & % Waste Breakdown** | ✅ Full Visibility | ✅ Full Visibility |
|
|
193
|
+
| **Impression-Weighted Quality Score (1–10)** | ✅ Included | ✅ Included |
|
|
194
|
+
| **Top 25 Worst Offender Channels** | ✅ Unmasked | ✅ Unmasked |
|
|
195
|
+
| **Tail Offender Channels ($c_{26} \dots c_M$)** | 🔒 Masked (`UC••••••••••••`) | ✅ 100% Unmasked |
|
|
196
|
+
| **Bundled Waste Seed Dictionary** | 2,500 Notorious Channels | **250,000 Pre-Classified Registry** |
|
|
197
|
+
| **Long-Tail Unknown Channel Enrichment** | Regex Heuristics | **Async 50-ID Batch YouTube API v3 Resolver** |
|
|
198
|
+
| **Google Ads 65,000 Exclusion Shield CSV** | ❌ | ✅ 1-Click Ready (`google_ads_65k_full_shield.csv`) |
|
|
199
|
+
| **DV360 SDF Exclusion Chunks** | ❌ | ✅ 10,000-Row SDF Blocks |
|
|
200
|
+
| **Gemini Creative Targeting Fit Engine** | ✅ Core Matching | ✅ Multimodal Deep Profiler |
|
|
201
|
+
| **CFO / Client Brand-Safety HTML Audit Deck** | ❌ | ✅ White-Label Interactive Chart.js Deck |
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 🔑 Activating TubeSentry Pro
|
|
206
|
+
|
|
207
|
+
Obtain an instant Single Audit Pass (€199) or Agency Unlimited Key via [Polar Checkout](https://buy.polar.sh/polar_cl_lRuifr3uJS0LR0k6frhg3JEKBRZNQq75hv7cS2am9cX):
|
|
208
|
+
|
|
209
|
+
[](https://buy.polar.sh/polar_cl_lRuifr3uJS0LR0k6frhg3JEKBRZNQq75hv7cS2am9cX)
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
tubesentry auth --key TS_PRO_YOUR_POLAR_KEY
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Or via Python:
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
import tubesentry as ts
|
|
219
|
+
ts.install_pro(api_key="TS_PRO_...")
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 🛡️ Privacy & Security Guarantee
|
|
225
|
+
|
|
226
|
+
* **Local-First:** All CSV ingestion, regex scoring, and database lookups run 100% locally on your machine.
|
|
227
|
+
* **Zero Cloud Ingestion:** Your clients' placement data, budgets, and impressions are never uploaded to any third-party server.
|
|
228
|
+
* **Serverless Architecture:** 0€ infrastructure overhead.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## 📜 License
|
|
233
|
+
|
|
234
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# TubeSentry 🛡️
|
|
2
|
+
|
|
3
|
+
**The Agentic-First YouTube & Performance Max Placement Waste Auditor, Creative Targeting Engine & FastMCP Server**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/flovv/tubesentry/actions/workflows/ci_tests.yml)
|
|
6
|
+
[](https://flovv.github.io/tubesentry/)
|
|
7
|
+
[](https://pypi.org/project/tubesentry/)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](https://www.python.org/)
|
|
10
|
+
[](https://modelcontextprotocol.io/)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
### [📖 Interactive Documentation & Live Guide](https://flovv.github.io/tubesentry/)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 💡 Why TubeSentry?
|
|
19
|
+
|
|
20
|
+
When running video campaigns on **Google Ads**, **Performance Max (PMax)**, **Demand Gen**, or **DV360**, algorithmic automated placement expansion routinely wastes **20% to 50%+** of advertising spend on low-intent, accidental, or non-human impressions:
|
|
21
|
+
|
|
22
|
+
* 👶 **Made-for-Kids & Toddler Brainrot:** CoComelon, Baby Shark, nursery rhymes, and toddler sing-alongs streamed on parent iPads (severe bounce rates and COPPA / GDPR-K regulatory risk).
|
|
23
|
+
* 🎧 **Passive Background Audio Streams:** 24/7 Lofi beats, sleep music, rain sounds, and meditation loops with zero active visual attention.
|
|
24
|
+
* 🎮 **Underage Minor Gaming Drains:** Roblox, Minecraft, Brawl Stars, and Skibidi Toilet mobile livestreams tapped accidentally by young children.
|
|
25
|
+
* 🌍 **Foreign Script Geo-Leakage:** Mismatched Cyrillic, Hindi, Arabic, Thai, or Asian broadcast TV channels consuming spend in local EU/US campaigns.
|
|
26
|
+
* 🤖 **AI Slop & Content Farms:** Split-screen Subway Surfers + synthetic voiceover shorts and click arbitrage farms with anomalous CTR and zero conversions.
|
|
27
|
+
* 🕳️ **Performance Sinkholes:** Placements burning $>3\times$ target CPA with 0 conversions.
|
|
28
|
+
* 🎯 **Creative Intent vs. Delivery Reality Gap:** Even clean channels often deliver far outside your creative brief. TubeSentry includes a **Gemini Creative Profiler** to evaluate your ad video URL or brief, extract your Ideal Customer Profile (ICP), and contrast **Expectation vs. Delivery Reality**.
|
|
29
|
+
|
|
30
|
+
TubeSentry is **100% local-first and privacy-preserving**: your placement CSV reports never leave your machine.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## ⚡ Quickstart
|
|
35
|
+
|
|
36
|
+
### Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install tubesentry
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 1. Test Drive with 25,000 Synthetic Placements
|
|
43
|
+
|
|
44
|
+
Generate a realistic 25,000-row Google Ads placement report and run an instant audit diagnostic:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
tubesentry demo --out-dir ./demo_youtube
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 2. Audit Your Google Ads / DV360 Placement Report
|
|
51
|
+
|
|
52
|
+
Export your placement report from Google Ads (*Reports $\rightarrow$ Predefined reports $\rightarrow$ Other $\rightarrow$ Where ads showed $\rightarrow$ Download `.csv`*) or DV360 and run:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
tubesentry audit where_ads_showed.csv --lang de,en --cpa 45.0
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 3. Profile Creative Targeting Fit (Gemini Multimodal)
|
|
59
|
+
|
|
60
|
+
Pass your YouTube Ad URL or creative brief to compare your campaign intent against algorithmic delivery:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
tubesentry audit where_ads_showed.csv \
|
|
64
|
+
--ad-url "https://youtube.com/watch?v=your_ad_video" \
|
|
65
|
+
--ad-text "B2B enterprise cloud security platform for CISOs and DevSecOps teams" \
|
|
66
|
+
--html audit_deck.html
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🐍 Python SDK API
|
|
72
|
+
|
|
73
|
+
TubeSentry seamlessly auto-detects multi-language CSV exports (**English, German, Spanish, French, Italian, Dutch**):
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import tubesentry as ts
|
|
77
|
+
|
|
78
|
+
# Run instant placement audit
|
|
79
|
+
report = ts.audit_placements(
|
|
80
|
+
report="where_ads_showed.csv",
|
|
81
|
+
target_languages=["de", "en"],
|
|
82
|
+
target_cpa=40.0,
|
|
83
|
+
ad_url="https://youtube.com/watch?v=demo_video",
|
|
84
|
+
ad_text="Enterprise Kubernetes automation for DevOps and SRE teams.",
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
print(f"Audited Spend: €{report.total_spend:,.2f}")
|
|
88
|
+
print(f"Wasted Spend: €{report.total_wasted_spend:,.2f} ({report.wasted_spend_percentage:.1f}%)")
|
|
89
|
+
print(f"Quality Score: {report.weighted_quality_score:.1f} / 10.0")
|
|
90
|
+
|
|
91
|
+
if report.creative_alignment:
|
|
92
|
+
print(f"Targeting Fit: {report.creative_alignment.overall_alignment_score:.1f} / 10.0")
|
|
93
|
+
print(f"Off-Target Bleed: €{report.creative_alignment.off_target_spend:,.2f}")
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 🤖 Claude Desktop, Claude Code & Cursor MCP Server
|
|
99
|
+
|
|
100
|
+
TubeSentry includes a native **Model Context Protocol (FastMCP)** server. AI coding assistants and chat environments can audit placements and inspect channels directly in natural language.
|
|
101
|
+
|
|
102
|
+
### Claude Desktop Configuration
|
|
103
|
+
|
|
104
|
+
Add to your `claude_desktop_config.json`:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"mcpServers": {
|
|
109
|
+
"tubesentry": {
|
|
110
|
+
"command": "tubesentry-mcp"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Or run without installation via `uvx`:
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"mcpServers": {
|
|
121
|
+
"tubesentry": {
|
|
122
|
+
"command": "uvx",
|
|
123
|
+
"args": ["--from", "tubesentry", "tubesentry-mcp"]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Cursor IDE Configuration
|
|
130
|
+
|
|
131
|
+
Add to `.cursor/mcp.json`:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"mcpServers": {
|
|
136
|
+
"tubesentry": {
|
|
137
|
+
"command": "tubesentry-mcp"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Example Natural Language Prompts
|
|
144
|
+
* *"Audit my Google Ads placement report at `~/Downloads/pmax_october.csv` for toddler brainrot and passive music streams."*
|
|
145
|
+
* *"Profile this YouTube video ad URL with Gemini: `https://youtube.com/watch?v=...` and tell me what contextual topics and negative exclusions to set in Google Ads."*
|
|
146
|
+
* *"Inspect these 5 YouTube channels for COPPA and background audio risk: `UCbCmjCuTUZos6Inko4u57UQ`, `UCSJ4gkVC6NrvII8umztf0Ow`."*
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 📊 Open-Core vs. TubeSentry Pro
|
|
151
|
+
|
|
152
|
+
| Feature | Open-Core `tubesentry` (Free) | `tubesentry_pro` (Licensed) |
|
|
153
|
+
| :--- | :---: | :---: |
|
|
154
|
+
| **Exact Category Spend & % Waste Breakdown** | ✅ Full Visibility | ✅ Full Visibility |
|
|
155
|
+
| **Impression-Weighted Quality Score (1–10)** | ✅ Included | ✅ Included |
|
|
156
|
+
| **Top 25 Worst Offender Channels** | ✅ Unmasked | ✅ Unmasked |
|
|
157
|
+
| **Tail Offender Channels ($c_{26} \dots c_M$)** | 🔒 Masked (`UC••••••••••••`) | ✅ 100% Unmasked |
|
|
158
|
+
| **Bundled Waste Seed Dictionary** | 2,500 Notorious Channels | **250,000 Pre-Classified Registry** |
|
|
159
|
+
| **Long-Tail Unknown Channel Enrichment** | Regex Heuristics | **Async 50-ID Batch YouTube API v3 Resolver** |
|
|
160
|
+
| **Google Ads 65,000 Exclusion Shield CSV** | ❌ | ✅ 1-Click Ready (`google_ads_65k_full_shield.csv`) |
|
|
161
|
+
| **DV360 SDF Exclusion Chunks** | ❌ | ✅ 10,000-Row SDF Blocks |
|
|
162
|
+
| **Gemini Creative Targeting Fit Engine** | ✅ Core Matching | ✅ Multimodal Deep Profiler |
|
|
163
|
+
| **CFO / Client Brand-Safety HTML Audit Deck** | ❌ | ✅ White-Label Interactive Chart.js Deck |
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 🔑 Activating TubeSentry Pro
|
|
168
|
+
|
|
169
|
+
Obtain an instant Single Audit Pass (€199) or Agency Unlimited Key via [Polar Checkout](https://buy.polar.sh/polar_cl_lRuifr3uJS0LR0k6frhg3JEKBRZNQq75hv7cS2am9cX):
|
|
170
|
+
|
|
171
|
+
[](https://buy.polar.sh/polar_cl_lRuifr3uJS0LR0k6frhg3JEKBRZNQq75hv7cS2am9cX)
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
tubesentry auth --key TS_PRO_YOUR_POLAR_KEY
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Or via Python:
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
import tubesentry as ts
|
|
181
|
+
ts.install_pro(api_key="TS_PRO_...")
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 🛡️ Privacy & Security Guarantee
|
|
187
|
+
|
|
188
|
+
* **Local-First:** All CSV ingestion, regex scoring, and database lookups run 100% locally on your machine.
|
|
189
|
+
* **Zero Cloud Ingestion:** Your clients' placement data, budgets, and impressions are never uploaded to any third-party server.
|
|
190
|
+
* **Serverless Architecture:** 0€ infrastructure overhead.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 📜 License
|
|
195
|
+
|
|
196
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineConfig } from 'vitepress'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
title: "TubeSentry",
|
|
5
|
+
description: "Agentic-First YouTube & Performance Max Placement Waste Auditor & MCP Server",
|
|
6
|
+
base: "/tubesentry/",
|
|
7
|
+
head: [
|
|
8
|
+
['link', { rel: 'icon', href: '/tubesentry/favicon.ico' }],
|
|
9
|
+
['meta', { name: 'theme-color', content: '#0284c7' }]
|
|
10
|
+
],
|
|
11
|
+
themeConfig: {
|
|
12
|
+
logo: '🛡️',
|
|
13
|
+
siteTitle: 'TubeSentry',
|
|
14
|
+
nav: [
|
|
15
|
+
{ text: 'Guide', link: '/guide/quickstart' },
|
|
16
|
+
{ text: 'Creative Profiler', link: '/guide/creative-profiler' },
|
|
17
|
+
{ text: 'MCP Server', link: '/guide/mcp-server' },
|
|
18
|
+
{ text: 'CLI Reference', link: '/guide/cli' },
|
|
19
|
+
{ text: 'TubeSentry Pro', link: '/guide/pro' },
|
|
20
|
+
{ text: 'Buy Pro ↗', link: 'https://buy.polar.sh/polar_cl_lRuifr3uJS0LR0k6frhg3JEKBRZNQq75hv7cS2am9cX' },
|
|
21
|
+
{ text: 'GitHub', link: 'https://github.com/flovv/tubesentry' }
|
|
22
|
+
],
|
|
23
|
+
sidebar: [
|
|
24
|
+
{
|
|
25
|
+
text: 'Getting Started',
|
|
26
|
+
items: [
|
|
27
|
+
{ text: 'Overview', link: '/guide/quickstart' },
|
|
28
|
+
{ text: 'Waste Categories', link: '/guide/waste-categories' }
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
text: 'Core Features',
|
|
33
|
+
items: [
|
|
34
|
+
{ text: 'Creative Targeting Fit (Gemini)', link: '/guide/creative-profiler' },
|
|
35
|
+
{ text: 'Claude & Cursor MCP Server', link: '/guide/mcp-server' },
|
|
36
|
+
{ text: 'CLI Reference', link: '/guide/cli' },
|
|
37
|
+
{ text: 'Python SDK', link: '/guide/python-sdk' }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
text: 'Commercial Edition',
|
|
42
|
+
items: [
|
|
43
|
+
{ text: 'TubeSentry Pro & 65k Shield', link: '/guide/pro' }
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
socialLinks: [
|
|
48
|
+
{ icon: 'github', link: 'https://github.com/flovv/tubesentry' }
|
|
49
|
+
],
|
|
50
|
+
footer: {
|
|
51
|
+
message: 'Released under the MIT License.',
|
|
52
|
+
copyright: 'Copyright © 2026 TubeSentry Core Contributors'
|
|
53
|
+
},
|
|
54
|
+
search: {
|
|
55
|
+
provider: 'local'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Zero-Upload Browser WASM Auditor (`tubesentry.dev/audit`)
|
|
2
|
+
|
|
3
|
+
For agency media buyers and PPC analysts on restricted corporate laptops where terminal or Python access is locked down, **TubeSentry** provides a 100% client-side WebAssembly auditor powered by Pyodide and DuckDB-WASM.
|
|
4
|
+
|
|
5
|
+
## Privacy Guarantee: 100% Local Execution
|
|
6
|
+
* **Zero Cloud Upload:** Your Google Ads / DV360 CSV never leaves your browser sandbox.
|
|
7
|
+
* **No Server Storage:** Client data and financial spend figures are processed locally in memory.
|
|
8
|
+
* **Instant Processing:** Parses and audits 50,000 placements in $<200\text{ms}$.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
1. Drag and drop your Google Ads *"Where ads showed"* CSV export into the dropzone.
|
|
12
|
+
2. The WebAssembly engine scans the file, matches channels against the embedded intelligence database, and renders an instant interactive spend waterfall.
|
|
13
|
+
3. Review your Top 25 worst offending channels and total wasted spend breakdown.
|
|
14
|
+
4. Enter your TubeSentry Pro license key to unlock the 65,000-channel Google Ads Editor exclusion CSV and white-label client pitch deck.
|