thumbgate 1.4.3 → 1.4.5
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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/llms.txt +12 -8
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +18 -8
- package/adapters/README.md +1 -1
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/codex/config.toml +2 -2
- package/adapters/mcp/server-stdio.js +1 -1
- package/adapters/opencode/opencode.json +1 -1
- package/config/github-about.json +2 -2
- package/package.json +158 -10
- package/scripts/billing.js +5 -2
- package/scripts/statusline.sh +1 -0
- package/src/api/server.js +113 -16
- package/src/index.js +3 -0
- package/.claude-plugin/bundle/icon.png +0 -0
- package/.claude-plugin/bundle/icon.svg +0 -18
- package/.claude-plugin/bundle/server/index.js +0 -24
- package/adapters/chatgpt/INSTALL.md +0 -158
- package/adapters/perplexity/.mcp.json +0 -36
- package/adapters/perplexity/config.toml +0 -16
- package/adapters/perplexity/opencode.json +0 -29
- package/bin/memory.sh +0 -64
- package/bin/obsidian-sync.sh +0 -20
- package/plugins/amp-skill/INSTALL.md +0 -52
- package/plugins/amp-skill/SKILL.md +0 -64
- package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +0 -22
- package/plugins/claude-codex-bridge/.mcp.json +0 -14
- package/plugins/claude-codex-bridge/INSTALL.md +0 -43
- package/plugins/claude-codex-bridge/README.md +0 -46
- package/plugins/claude-codex-bridge/scripts/codex-bridge.js +0 -286
- package/plugins/claude-codex-bridge/skills/adversarial-review/SKILL.md +0 -24
- package/plugins/claude-codex-bridge/skills/result/SKILL.md +0 -22
- package/plugins/claude-codex-bridge/skills/review/SKILL.md +0 -28
- package/plugins/claude-codex-bridge/skills/second-pass/SKILL.md +0 -27
- package/plugins/claude-codex-bridge/skills/setup/SKILL.md +0 -21
- package/plugins/claude-codex-bridge/skills/status/SKILL.md +0 -19
- package/plugins/claude-skill/INSTALL.md +0 -55
- package/plugins/claude-skill/SKILL.md +0 -46
- package/plugins/codex-profile/.codex-plugin/plugin.json +0 -43
- package/plugins/codex-profile/.mcp.json +0 -14
- package/plugins/codex-profile/AGENTS.md +0 -20
- package/plugins/codex-profile/INSTALL.md +0 -89
- package/plugins/codex-profile/README.md +0 -61
- package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +0 -23
- package/plugins/cursor-marketplace/CHANGELOG.md +0 -30
- package/plugins/cursor-marketplace/LICENSE +0 -21
- package/plugins/cursor-marketplace/README.md +0 -124
- package/plugins/cursor-marketplace/agents/reliability-reviewer.md +0 -31
- package/plugins/cursor-marketplace/assets/logo-400x400.png +0 -0
- package/plugins/cursor-marketplace/commands/capture-feedback.md +0 -33
- package/plugins/cursor-marketplace/commands/check-gates.md +0 -25
- package/plugins/cursor-marketplace/commands/show-lessons.md +0 -27
- package/plugins/cursor-marketplace/hooks/hooks.json +0 -10
- package/plugins/cursor-marketplace/mcp.json +0 -14
- package/plugins/cursor-marketplace/rules/feedback-capture.mdc +0 -34
- package/plugins/cursor-marketplace/rules/pre-action-gates.mdc +0 -30
- package/plugins/cursor-marketplace/rules/session-continuity.mdc +0 -28
- package/plugins/cursor-marketplace/scripts/gate-check.sh +0 -21
- package/plugins/cursor-marketplace/skills/capture-feedback/SKILL.md +0 -48
- package/plugins/cursor-marketplace/skills/prevention-rules/SKILL.md +0 -31
- package/plugins/cursor-marketplace/skills/recall-context/SKILL.md +0 -30
- package/plugins/cursor-marketplace/skills/search-lessons/SKILL.md +0 -33
- package/plugins/gemini-extension/INSTALL.md +0 -92
- package/plugins/gemini-extension/gemini_prompt.txt +0 -14
- package/plugins/gemini-extension/tool_contract.json +0 -45
- package/plugins/opencode-profile/INSTALL.md +0 -57
- package/public/assets/instagram-card.png +0 -0
- package/public/assets/tiktok-agent-memory.mp4 +0 -0
- package/public/blog.html +0 -474
- package/public/compare/mem0.html +0 -189
- package/public/compare/speclock.html +0 -180
- package/public/compare.html +0 -310
- package/public/dashboard.html +0 -1100
- package/public/guide.html +0 -317
- package/public/guides/claude-code-prevent-repeated-mistakes.html +0 -161
- package/public/guides/codex-cli-guardrails.html +0 -158
- package/public/guides/cursor-prevent-repeated-mistakes.html +0 -161
- package/public/guides/pre-action-gates.html +0 -162
- package/public/guides/stop-repeated-ai-agent-mistakes.html +0 -159
- package/public/index.html +0 -1225
- package/public/js/buyer-intent.js +0 -252
- package/public/learn/agent-harness-pattern.html +0 -180
- package/public/learn/ai-agent-persistent-memory.html +0 -203
- package/public/learn/learn.css +0 -45
- package/public/learn/mcp-pre-action-gates-explained.html +0 -172
- package/public/learn/stop-ai-agent-force-push.html +0 -134
- package/public/learn/vibe-coding-safety-net.html +0 -142
- package/public/learn.html +0 -274
- package/public/lessons.html +0 -967
- package/public/llm-context.md +0 -156
- package/public/pro.html +0 -1087
- package/public/vercel.json +0 -8
- package/scripts/a2ui-engine.js +0 -73
- package/scripts/adk-consolidator.js +0 -274
- package/scripts/agent-security-hardening.js +0 -225
- package/scripts/ai-search-visibility.js +0 -116
- package/scripts/autonomous-sales-agent.js +0 -39
- package/scripts/autoresearch-runner.js +0 -216
- package/scripts/background-agent-governance.js +0 -229
- package/scripts/behavioral-extraction.js +0 -93
- package/scripts/budget-enforcer.js +0 -173
- package/scripts/budget-guard.js +0 -173
- package/scripts/build-claude-mcpb.js +0 -255
- package/scripts/build-codex-plugin.js +0 -152
- package/scripts/capture-railway-diagnostics.sh +0 -97
- package/scripts/changeset-check.js +0 -372
- package/scripts/check-congruence.js +0 -443
- package/scripts/computer-use-firewall.js +0 -280
- package/scripts/content-engine/linkedin-content-generator.js +0 -154
- package/scripts/content-engine/output/linkedin-memento-validation.md +0 -17
- package/scripts/content-engine/output/linkedin-posts-2026-04-09.md +0 -175
- package/scripts/content-engine/reddit-thread-finder.js +0 -154
- package/scripts/context-engine.js +0 -710
- package/scripts/daily-digest.js +0 -11
- package/scripts/data-governance.js +0 -173
- package/scripts/deploy-gcp.sh +0 -44
- package/scripts/deploy-policy.js +0 -249
- package/scripts/disagreement-mining.js +0 -315
- package/scripts/dpo-optimizer.js +0 -206
- package/scripts/ensure-repo-bootstrap.js +0 -130
- package/scripts/ephemeral-agent-store.js +0 -212
- package/scripts/eval-harness.js +0 -56
- package/scripts/export-kto-pairs.js +0 -309
- package/scripts/export-training.js +0 -446
- package/scripts/feedback-fallback.js +0 -111
- package/scripts/feedback-inbox-read.js +0 -162
- package/scripts/feedback-root-consolidator.js +0 -233
- package/scripts/feedback-to-memory.js +0 -185
- package/scripts/gate-satisfy.js +0 -42
- package/scripts/generate-paperbanana-diagrams.sh +0 -99
- package/scripts/generate-pretool-hook.sh +0 -40
- package/scripts/github-about.js +0 -430
- package/scripts/github-outreach.js +0 -65
- package/scripts/gtm-revenue-loop.js +0 -535
- package/scripts/hallucination-detector.js +0 -226
- package/scripts/hf-papers.js +0 -317
- package/scripts/hook-auto-capture.sh +0 -100
- package/scripts/hook-stop-pr-thread-check.sh +0 -68
- package/scripts/hook-stop-self-score.sh +0 -51
- package/scripts/hook-stop-verify-deploy.sh +0 -31
- package/scripts/hook-verify-before-done.sh +0 -20
- package/scripts/managed-dpo-export.js +0 -91
- package/scripts/markdown-escape.js +0 -12
- package/scripts/marketing-experiment.js +0 -657
- package/scripts/memalign-recall.js +0 -111
- package/scripts/memory-migration.js +0 -296
- package/scripts/meta-policy.js +0 -190
- package/scripts/metered-billing.js +0 -16
- package/scripts/model-tier-router.js +0 -310
- package/scripts/money-watcher.js +0 -218
- package/scripts/multi-hop-recall.js +0 -240
- package/scripts/per-step-scoring.js +0 -163
- package/scripts/perplexity-command-center.js +0 -644
- package/scripts/perplexity-marketing.js +0 -454
- package/scripts/pii-scanner.js +0 -153
- package/scripts/plan-gate.js +0 -154
- package/scripts/post-everywhere.js +0 -341
- package/scripts/post-to-x-retry.sh +0 -22
- package/scripts/post-to-x.js +0 -369
- package/scripts/pr-manager.js +0 -421
- package/scripts/principle-extractor.js +0 -162
- package/scripts/pro-features.js +0 -41
- package/scripts/prompt-dlp.js +0 -222
- package/scripts/prove-adapters.js +0 -860
- package/scripts/prove-attribution.js +0 -361
- package/scripts/prove-automation.js +0 -651
- package/scripts/prove-autoresearch.js +0 -304
- package/scripts/prove-claim-verification.js +0 -277
- package/scripts/prove-cloudflare-sandbox.js +0 -161
- package/scripts/prove-data-pipeline.js +0 -408
- package/scripts/prove-data-quality.js +0 -227
- package/scripts/prove-evolution.js +0 -352
- package/scripts/prove-harnesses.js +0 -287
- package/scripts/prove-intelligence.js +0 -257
- package/scripts/prove-lancedb.js +0 -425
- package/scripts/prove-local-intelligence.js +0 -340
- package/scripts/prove-loop-closure.js +0 -263
- package/scripts/prove-packaged-runtime.js +0 -327
- package/scripts/prove-predictive-insights.js +0 -355
- package/scripts/prove-runtime.js +0 -363
- package/scripts/prove-seo-gsd.js +0 -234
- package/scripts/prove-settings.js +0 -279
- package/scripts/prove-subway-upgrades.js +0 -277
- package/scripts/prove-tessl.js +0 -229
- package/scripts/prove-training-export.js +0 -325
- package/scripts/prove-workflow-contract.js +0 -112
- package/scripts/prove-xmemory.js +0 -332
- package/scripts/publish-decision.js +0 -159
- package/scripts/ralph-loop.js +0 -376
- package/scripts/ralph-mode-ci.js +0 -434
- package/scripts/reddit-dm-outreach.js +0 -192
- package/scripts/reddit-monitor-cron.sh +0 -26
- package/scripts/reminder-engine.js +0 -132
- package/scripts/revenue-status.js +0 -472
- package/scripts/rotate-stripe-webhook-secret.js +0 -314
- package/scripts/schedule-manager.js +0 -249
- package/scripts/self-healing-check.js +0 -193
- package/scripts/session-analyzer.js +0 -533
- package/scripts/shieldcortex-memory-firewall-runner.mjs +0 -53
- package/scripts/skill-exporter.js +0 -260
- package/scripts/skill-materializer.js +0 -134
- package/scripts/skill-packs.js +0 -136
- package/scripts/skill-proposer.js +0 -99
- package/scripts/skill-quality-tracker.js +0 -282
- package/scripts/slow-loop.js +0 -72
- package/scripts/social-analytics/db/marketing-db.js +0 -179
- package/scripts/social-analytics/db/schema.sql +0 -55
- package/scripts/social-analytics/digest.js +0 -256
- package/scripts/social-analytics/engagement-audit.js +0 -185
- package/scripts/social-analytics/generate-instagram-card.js +0 -123
- package/scripts/social-analytics/generate-slides.js +0 -268
- package/scripts/social-analytics/instagram-thumbgate-post.js +0 -111
- package/scripts/social-analytics/install-growth-automation.js +0 -114
- package/scripts/social-analytics/load-env.js +0 -77
- package/scripts/social-analytics/mcp-server.js +0 -289
- package/scripts/social-analytics/normalizer.js +0 -580
- package/scripts/social-analytics/notify.js +0 -162
- package/scripts/social-analytics/poll-all.js +0 -107
- package/scripts/social-analytics/pollers/github.js +0 -195
- package/scripts/social-analytics/pollers/instagram.js +0 -253
- package/scripts/social-analytics/pollers/linkedin.js +0 -340
- package/scripts/social-analytics/pollers/plausible.js +0 -245
- package/scripts/social-analytics/pollers/reddit.js +0 -306
- package/scripts/social-analytics/pollers/threads.js +0 -233
- package/scripts/social-analytics/pollers/tiktok.js +0 -203
- package/scripts/social-analytics/pollers/x.js +0 -227
- package/scripts/social-analytics/pollers/youtube.js +0 -304
- package/scripts/social-analytics/pollers/zernio.js +0 -183
- package/scripts/social-analytics/post-video.js +0 -316
- package/scripts/social-analytics/publish-instagram-thumbgate.js +0 -104
- package/scripts/social-analytics/publish-thumbgate-launch.js +0 -322
- package/scripts/social-analytics/publishers/devto.js +0 -122
- package/scripts/social-analytics/publishers/instagram.js +0 -317
- package/scripts/social-analytics/publishers/linkedin.js +0 -294
- package/scripts/social-analytics/publishers/reddit.js +0 -385
- package/scripts/social-analytics/publishers/threads.js +0 -275
- package/scripts/social-analytics/publishers/tiktok.js +0 -217
- package/scripts/social-analytics/publishers/x.js +0 -259
- package/scripts/social-analytics/publishers/youtube.js +0 -223
- package/scripts/social-analytics/publishers/zernio.js +0 -568
- package/scripts/social-analytics/reconcile-thumbgate-campaign.js +0 -165
- package/scripts/social-analytics/run-digest.js +0 -34
- package/scripts/social-analytics/schedule-thumbgate-campaign.js +0 -275
- package/scripts/social-analytics/store.js +0 -455
- package/scripts/social-analytics/sync-launch-assets.js +0 -185
- package/scripts/social-analytics/utm.js +0 -143
- package/scripts/social-pipeline.js +0 -2626
- package/scripts/social-post-hourly.js +0 -228
- package/scripts/social-quality-gate.js +0 -134
- package/scripts/social-reply-monitor.js +0 -592
- package/scripts/status-dashboard.js +0 -155
- package/scripts/stripe-live-status.js +0 -115
- package/scripts/subagent-profiles.js +0 -79
- package/scripts/sync-branch-protection.js +0 -340
- package/scripts/sync-gh-secrets-from-env.sh +0 -70
- package/scripts/sync-github-about.js +0 -55
- package/scripts/sync-version.js +0 -479
- package/scripts/synthetic-dpo.js +0 -234
- package/scripts/tessl-export.js +0 -369
- package/scripts/test-coverage.js +0 -128
- package/scripts/thumbgate-bench.js +0 -494
- package/scripts/thumbgate_session_start.sh +0 -32
- package/scripts/train_from_feedback.py +0 -929
- package/scripts/validate-feedback.js +0 -581
- package/scripts/verify-obsidian-setup.sh +0 -269
- package/scripts/verify-run.js +0 -269
- package/scripts/weekly-auto-post.js +0 -124
- package/scripts/x-autonomous-marketing.js +0 -139
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate-marketplace",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"owner": {
|
|
5
5
|
"name": "Igor Ganapolsky",
|
|
6
6
|
"email": "ig5973700@gmail.com"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"source": "npm",
|
|
14
14
|
"package": "thumbgate"
|
|
15
15
|
},
|
|
16
|
-
"version": "1.4.
|
|
16
|
+
"version": "1.4.5",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Igor Ganapolsky"
|
|
19
19
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
3
|
"description": "Type 👍 or 👎 on any agent action. ThumbGate captures it, distills a lesson, and blocks the pattern from repeating. One thumbs-down = the agent physically cannot make that mistake again. 33 pre-action gates, budget enforcement, self-protection, and NIST/SOC2 compliance tags.",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Igor Ganapolsky"
|
|
7
7
|
},
|
package/.well-known/llms.txt
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
# ThumbGate —
|
|
1
|
+
# ThumbGate — Stop AI agents before they make costly mistakes.
|
|
2
2
|
# https://thumbgate-production.up.railway.app
|
|
3
3
|
# https://github.com/IgorGanapolsky/ThumbGate
|
|
4
4
|
# https://www.npmjs.com/package/thumbgate
|
|
5
5
|
|
|
6
|
-
> ThumbGate
|
|
7
|
-
>
|
|
8
|
-
>
|
|
6
|
+
> ThumbGate prevents expensive AI mistakes before they happen. It checks
|
|
7
|
+
> risky commands, file edits, deploys, payments, API calls, and other agent
|
|
8
|
+
> actions before execution. 👎 Thumbs down becomes a history-aware lesson and
|
|
9
|
+
> a Pre-Action Gate; 👍 thumbs up reinforces safe patterns.
|
|
9
10
|
|
|
10
11
|
## What ThumbGate solves
|
|
11
12
|
|
|
12
|
-
- AI coding agents repeat
|
|
13
|
+
- AI coding agents repeat costly mistakes across sessions
|
|
14
|
+
- Bad commands, destructive SQL, risky deploys, unsafe publishes, and API mistakes are expensive after execution
|
|
13
15
|
- CLAUDE.md and .cursorrules files are suggestions agents can ignore
|
|
14
16
|
- No memory between sessions means no learning from corrections
|
|
15
17
|
- Teams have no shared safety rules across developers
|
|
@@ -27,6 +29,7 @@
|
|
|
27
29
|
- Developers using Claude Code, Cursor, Codex, Gemini CLI, or any MCP-compatible agent
|
|
28
30
|
- Engineering teams that need shared agent safety rules
|
|
29
31
|
- Anyone tired of re-correcting their AI coding assistant
|
|
32
|
+
- Solo operators who want Pro dashboard proof for blocked mistakes and DPO exports
|
|
30
33
|
|
|
31
34
|
## Install
|
|
32
35
|
|
|
@@ -36,9 +39,10 @@ npx thumbgate init --agent claude-code
|
|
|
36
39
|
|
|
37
40
|
## Pricing
|
|
38
41
|
|
|
39
|
-
- Free:
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
+
- Free GPT: advice, checkpointing, and setup help in ChatGPT
|
|
43
|
+
- Free local CLI: 3 feedback captures/day, 5 lesson searches/day, recall, and local Pre-Action Gates after install
|
|
44
|
+
- Pro: $19/mo or $149/yr — personal enforcement proof, local dashboard, gate debugger, DPO export, and review-ready exports
|
|
45
|
+
- Team: $99/seat/mo, 3-seat minimum after intake — shared lessons, org visibility, approval boundaries, and rollout proof
|
|
42
46
|
|
|
43
47
|
## Links
|
|
44
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "ThumbGate — 👍👎 feedback that teaches your AI agent. Thumbs down a mistake, it never happens again.",
|
|
5
5
|
"homepage": "https://github.com/IgorGanapolsky/thumbgate",
|
|
6
6
|
"transport": "stdio",
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# ThumbGate
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Stop AI agents before they make costly mistakes.**
|
|
4
|
+
|
|
5
|
+
ThumbGate checks risky commands, file edits, deploys, API calls, and other agent actions before they run. Thumbs-up/down feedback becomes remembered lessons, repeated failures become Pre-Action Gates, and the next bad action gets blocked instead of becoming another cleanup bill.
|
|
4
6
|
|
|
5
7
|
[](https://github.com/IgorGanapolsky/ThumbGate/actions/workflows/ci.yml)
|
|
6
8
|
[](https://www.npmjs.com/package/thumbgate)
|
|
@@ -18,7 +20,7 @@
|
|
|
18
20
|
|
|
19
21
|
## ThumbGate GPT: start here
|
|
20
22
|
|
|
21
|
-
**Use ThumbGate in ChatGPT now:** **[Open the live ThumbGate GPT](https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate)**, paste the action your AI agent wants to run, and ask whether to allow, block, or checkpoint it.
|
|
23
|
+
**Use ThumbGate in ChatGPT now:** **[Open the live ThumbGate GPT](https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate)**, paste the action your AI agent wants to run, and ask whether to allow, block, or checkpoint it before the mistake becomes expensive.
|
|
22
24
|
|
|
23
25
|
Try this first prompt:
|
|
24
26
|
|
|
@@ -26,7 +28,7 @@ Try this first prompt:
|
|
|
26
28
|
Check this agent action before it runs: git push --force --tags
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
**No, users do not have to keep chatting inside the ThumbGate GPT to use ThumbGate.** The GPT is the fast demo, guided setup path, and thumbs-up/down memory surface for ChatGPT users.
|
|
31
|
+
**No, users do not have to keep chatting inside the ThumbGate GPT to use ThumbGate.** The GPT is the fast demo, guided setup path, and thumbs-up/down memory surface for ChatGPT users. Think of the GPT as advice and checkpointing; the hard enforcement layer still runs where the work happens: your local coding agent, CI workflow, or MCP-compatible runtime after `npx thumbgate init`.
|
|
30
32
|
|
|
31
33
|
Developers can import the prepared **[GPT Actions OpenAPI spec](adapters/chatgpt/openapi.yaml)** with the **[ChatGPT Actions setup guide](adapters/chatgpt/INSTALL.md)**. Regular ChatGPT users should just open the GPT and type what happened.
|
|
32
34
|
|
|
@@ -46,7 +48,13 @@ It scores deterministic GitHub, npm, database, Railway, shell, and filesystem sc
|
|
|
46
48
|
|
|
47
49
|
## What problem does this solve?
|
|
48
50
|
|
|
49
|
-
AI agents repeat mistakes. You fix the same problem in session after session — force-push to main, broken migrations, unauthorized file edits — because the agent has no memory of your feedback.
|
|
51
|
+
AI agents repeat expensive mistakes. You fix the same problem in session after session — force-push to main, broken migrations, unauthorized file edits, risky deploys — because the agent has no durable memory of your feedback and no gate before execution.
|
|
52
|
+
|
|
53
|
+
ThumbGate sells three concrete outcomes:
|
|
54
|
+
|
|
55
|
+
- **Prevent expensive AI mistakes** — catch bad commands, destructive database actions, unsafe publishes, and risky API calls before they run.
|
|
56
|
+
- **Make AI stop repeating mistakes** — fix it once, turn the lesson into a rule, and block the repeat before the next tool call lands.
|
|
57
|
+
- **Turn AI into a reliable operator** — move from a smart assistant that apologizes after damage to a production-ready operator with checkpoints, proof, and enforcement.
|
|
50
58
|
|
|
51
59
|
```
|
|
52
60
|
┌─────────────────────────────────────────────────────────────┐
|
|
@@ -64,7 +72,7 @@ AI agents repeat mistakes. You fix the same problem in session after session —
|
|
|
64
72
|
└─────────────────────────────────────────────────────────────┘
|
|
65
73
|
```
|
|
66
74
|
|
|
67
|
-
ThumbGate is the **
|
|
75
|
+
ThumbGate is the **Reliability Gateway** for AI coding agents — turning your feedback into **enforced rules**, not suggestions.
|
|
68
76
|
|
|
69
77
|
---
|
|
70
78
|
|
|
@@ -130,6 +138,8 @@ Session 3: │ Session 3+:
|
|
|
130
138
|
|
|
131
139
|
**Paid path for individual operators:** [ThumbGate Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page) is the self-serve side lane for a personal dashboard and export-ready evidence.
|
|
132
140
|
|
|
141
|
+
**Plain product line:** GPT preview = advice and checkpointing. Free local CLI (3 daily feedback captures, 5 daily lesson searches) = basic enforcement on one machine. Pro ($19/mo or $149/yr) = personal enforcement proof, dashboard, and exports. Team = shared hosted lesson DB, org dashboard, and shared enforcement so one correction protects every seat.
|
|
142
|
+
|
|
133
143
|
---
|
|
134
144
|
|
|
135
145
|
## Quick Start
|
|
@@ -265,9 +275,9 @@ Free and self-hosted users can invoke `search_lessons` directly through MCP, and
|
|
|
265
275
|
**[Start Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=top_cta#workflow-sprint-intake)** · **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=top_cta)** · **[See Pro](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page)**
|
|
266
276
|
|
|
267
277
|
**Where to start:**
|
|
268
|
-
- **Teams:** Begin with the Workflow Hardening Sprint —
|
|
269
|
-
- **Solo operators:** ThumbGate Pro adds a
|
|
270
|
-
- **Individuals & open source:** Free CLI tier, self-hosted
|
|
278
|
+
- **Teams:** Begin with the Workflow Hardening Sprint — prove one costly repeat failure can be blocked before committing to a full rollout
|
|
279
|
+
- **Solo operators:** ThumbGate Pro adds personal enforcement proof, a gate debugger, and export-ready evidence
|
|
280
|
+
- **Individuals & open source:** Free CLI tier, self-hosted, with local Pre-Action Gates after install
|
|
271
281
|
|
|
272
282
|
---
|
|
273
283
|
|
package/adapters/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
- `chatgpt/openapi.yaml`: import into GPT Actions.
|
|
4
4
|
- `gemini/function-declarations.json`: Gemini function-calling definitions.
|
|
5
5
|
- `mcp/server-stdio.js`: underlying local MCP stdio server implementation.
|
|
6
|
-
- `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@1.4.
|
|
6
|
+
- `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@1.4.5 thumbgate serve`.
|
|
7
7
|
- `codex/config.toml`: example Codex MCP profile section using the same version-pinned portable launcher.
|
|
8
8
|
- `amp/skills/thumbgate-feedback/SKILL.md`: Amp skill template.
|
|
9
9
|
- `opencode/opencode.json`: portable OpenCode MCP profile using the same version-pinned portable launcher.
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"thumbgate": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--yes", "--package", "thumbgate@1.4.
|
|
5
|
+
"args": ["--yes", "--package", "thumbgate@1.4.5", "thumbgate", "serve"]
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"hooks": {
|
|
9
9
|
"preToolUse": {
|
|
10
10
|
"command": "npx",
|
|
11
|
-
"args": ["--yes", "--package", "thumbgate@1.4.
|
|
11
|
+
"args": ["--yes", "--package", "thumbgate@1.4.5", "thumbgate", "gate-check"]
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Codex MCP profile (copy into ~/.codex/config.toml or merge section)
|
|
2
2
|
[mcp_servers.thumbgate]
|
|
3
3
|
command = "npx"
|
|
4
|
-
args = ["--yes", "--package", "thumbgate@1.4.
|
|
4
|
+
args = ["--yes", "--package", "thumbgate@1.4.5", "thumbgate", "serve"]
|
|
5
5
|
|
|
6
6
|
# Hard PreToolUse hook for Codex
|
|
7
7
|
[hooks.pre_tool_use]
|
|
8
8
|
command = "npx"
|
|
9
|
-
args = ["--yes", "--package", "thumbgate@1.4.
|
|
9
|
+
args = ["--yes", "--package", "thumbgate@1.4.5", "thumbgate", "gate-check"]
|
|
@@ -124,7 +124,7 @@ const {
|
|
|
124
124
|
finalizeSession: finalizeFeedbackSession,
|
|
125
125
|
} = require('../../scripts/feedback-session');
|
|
126
126
|
|
|
127
|
-
const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.4.
|
|
127
|
+
const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.4.5' };
|
|
128
128
|
const COMMERCE_CATEGORIES = [
|
|
129
129
|
'product_recommendation',
|
|
130
130
|
'brand_compliance',
|
package/config/github-about.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"repo": "IgorGanapolsky/ThumbGate",
|
|
3
3
|
"repositoryUrl": "https://github.com/IgorGanapolsky/ThumbGate",
|
|
4
4
|
"homepageUrl": "https://thumbgate-production.up.railway.app",
|
|
5
|
-
"githubDescription": "
|
|
6
|
-
"metaDescription": "
|
|
5
|
+
"githubDescription": "Agent governance that stops costly AI mistakes before they run: pre-action gates, shared lessons, and team safeguards for AI coding workflows.",
|
|
6
|
+
"metaDescription": "Stop expensive AI agent mistakes before they happen. \ud83d\udc4e Thumbs down becomes history-aware lessons and Pre-Action Gates; \ud83d\udc4d thumbs up reinforces safe patterns. ThumbGate checks risky commands, deploys, API calls, and file edits across ChatGPT, Claude Code, Cursor, Codex, Gemini, Amp, and OpenCode with workflow governance, shared lessons and org visibility for safer vibe coding.",
|
|
7
7
|
"topics": [
|
|
8
8
|
"thumbgate",
|
|
9
9
|
"pre-action-gates",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Self-improving agent governance: type thumbs-up or thumbs-down on any AI agent action. ThumbGate turns every mistake into a prevention rule and blocks the pattern from repeating. One thumbs-down, never again. 33 pre-action gates, budget enforcement, and self-protection for Claude Code, Cursor, Codex, Gemini CLI, and Amp.",
|
|
5
5
|
"homepage": "https://thumbgate-production.up.railway.app",
|
|
6
6
|
"repository": {
|
|
@@ -10,24 +10,172 @@
|
|
|
10
10
|
"bugs": {
|
|
11
11
|
"url": "https://github.com/IgorGanapolsky/ThumbGate/issues"
|
|
12
12
|
},
|
|
13
|
-
"main": "
|
|
13
|
+
"main": "src/index.js",
|
|
14
14
|
"bin": {
|
|
15
15
|
"thumbgate": "bin/cli.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
|
-
"bin/",
|
|
18
|
+
"bin/cli.js",
|
|
19
|
+
"bin/postinstall.js",
|
|
19
20
|
"src/",
|
|
20
|
-
"
|
|
21
|
-
"adapters/",
|
|
21
|
+
"adapters/mcp/server-stdio.js",
|
|
22
|
+
"adapters/chatgpt/openapi.yaml",
|
|
23
|
+
"adapters/gemini/function-declarations.json",
|
|
24
|
+
"adapters/claude/.mcp.json",
|
|
25
|
+
"adapters/codex/config.toml",
|
|
26
|
+
"adapters/opencode/opencode.json",
|
|
27
|
+
"adapters/amp/skills/thumbgate-feedback/SKILL.md",
|
|
28
|
+
"adapters/forge/forge.yaml",
|
|
22
29
|
"config/",
|
|
23
|
-
"plugins/",
|
|
24
30
|
"skills/",
|
|
25
31
|
"openapi/",
|
|
26
|
-
"public/",
|
|
27
32
|
".well-known/",
|
|
28
|
-
".claude-plugin/",
|
|
33
|
+
".claude-plugin/plugin.json",
|
|
34
|
+
".claude-plugin/marketplace.json",
|
|
35
|
+
".claude-plugin/README.md",
|
|
29
36
|
"README.md",
|
|
30
|
-
"LICENSE"
|
|
37
|
+
"LICENSE",
|
|
38
|
+
"scripts/agent-readiness.js",
|
|
39
|
+
"scripts/access-anomaly-detector.js",
|
|
40
|
+
"scripts/agentic-data-pipeline.js",
|
|
41
|
+
"scripts/analytics-report.js",
|
|
42
|
+
"scripts/analytics-window.js",
|
|
43
|
+
"scripts/async-job-runner.js",
|
|
44
|
+
"scripts/audit-trail.js",
|
|
45
|
+
"scripts/auto-promote-gates.js",
|
|
46
|
+
"scripts/auto-wire-hooks.js",
|
|
47
|
+
"scripts/belief-update.js",
|
|
48
|
+
"scripts/billing-setup.js",
|
|
49
|
+
"scripts/billing.js",
|
|
50
|
+
"scripts/bot-detector.js",
|
|
51
|
+
"scripts/build-metadata.js",
|
|
52
|
+
"scripts/claude-feedback-sync.js",
|
|
53
|
+
"scripts/cli-demo.js",
|
|
54
|
+
"scripts/cli-feedback.js",
|
|
55
|
+
"scripts/cli-schema.js",
|
|
56
|
+
"scripts/cli-status.js",
|
|
57
|
+
"scripts/cli-telemetry.js",
|
|
58
|
+
"scripts/cloudflare-dynamic-sandbox.js",
|
|
59
|
+
"scripts/code-reasoning.js",
|
|
60
|
+
"scripts/codegraph-context.js",
|
|
61
|
+
"scripts/commercial-offer.js",
|
|
62
|
+
"scripts/context-manager.js",
|
|
63
|
+
"scripts/contextfs.js",
|
|
64
|
+
"scripts/conversation-context.js",
|
|
65
|
+
"scripts/creator-campaigns.js",
|
|
66
|
+
"scripts/cross-encoder-reranker.js",
|
|
67
|
+
"scripts/daemon-manager.js",
|
|
68
|
+
"scripts/dashboard-render-spec.js",
|
|
69
|
+
"scripts/dashboard.js",
|
|
70
|
+
"scripts/decision-journal.js",
|
|
71
|
+
"scripts/delegation-runtime.js",
|
|
72
|
+
"scripts/dispatch-brief.js",
|
|
73
|
+
"scripts/distribution-surfaces.js",
|
|
74
|
+
"scripts/docker-sandbox-planner.js",
|
|
75
|
+
"scripts/document-intake.js",
|
|
76
|
+
"scripts/evolution-state.js",
|
|
77
|
+
"scripts/experiment-tracker.js",
|
|
78
|
+
"scripts/explore-subcommands.js",
|
|
79
|
+
"scripts/explore.js",
|
|
80
|
+
"scripts/export-databricks-bundle.js",
|
|
81
|
+
"scripts/export-dpo-pairs.js",
|
|
82
|
+
"scripts/export-hf-dataset.js",
|
|
83
|
+
"scripts/failure-diagnostics.js",
|
|
84
|
+
"scripts/feedback-attribution.js",
|
|
85
|
+
"scripts/feedback-history-distiller.js",
|
|
86
|
+
"scripts/feedback-loop.js",
|
|
87
|
+
"scripts/feedback-paths.js",
|
|
88
|
+
"scripts/feedback-quality.js",
|
|
89
|
+
"scripts/feedback-schema.js",
|
|
90
|
+
"scripts/feedback-session.js",
|
|
91
|
+
"scripts/feedback-to-rules.js",
|
|
92
|
+
"scripts/filesystem-search.js",
|
|
93
|
+
"scripts/fs-utils.js",
|
|
94
|
+
"scripts/funnel-analytics.js",
|
|
95
|
+
"scripts/gate-stats.js",
|
|
96
|
+
"scripts/gate-templates.js",
|
|
97
|
+
"scripts/gates-engine.js",
|
|
98
|
+
"scripts/harness-selector.js",
|
|
99
|
+
"scripts/history-distiller.js",
|
|
100
|
+
"scripts/hook-runtime.js",
|
|
101
|
+
"scripts/hook-thumbgate-cache-updater.js",
|
|
102
|
+
"scripts/hosted-config.js",
|
|
103
|
+
"scripts/hosted-job-launcher.js",
|
|
104
|
+
"scripts/hybrid-feedback-context.js",
|
|
105
|
+
"scripts/install-mcp.js",
|
|
106
|
+
"scripts/intent-router.js",
|
|
107
|
+
"scripts/internal-agent-bootstrap.js",
|
|
108
|
+
"scripts/intervention-policy.js",
|
|
109
|
+
"scripts/jsonl-watcher.js",
|
|
110
|
+
"scripts/lesson-db.js",
|
|
111
|
+
"scripts/lesson-inference.js",
|
|
112
|
+
"scripts/lesson-reranker.js",
|
|
113
|
+
"scripts/lesson-retrieval.js",
|
|
114
|
+
"scripts/lesson-rotation.js",
|
|
115
|
+
"scripts/lesson-search.js",
|
|
116
|
+
"scripts/lesson-synthesis.js",
|
|
117
|
+
"scripts/license.js",
|
|
118
|
+
"scripts/llm-client.js",
|
|
119
|
+
"scripts/local-model-profile.js",
|
|
120
|
+
"scripts/managed-lesson-agent.js",
|
|
121
|
+
"scripts/mcp-config.js",
|
|
122
|
+
"scripts/mcp-policy.js",
|
|
123
|
+
"scripts/memory-firewall.js",
|
|
124
|
+
"scripts/meta-agent-loop.js",
|
|
125
|
+
"scripts/natural-language-harness.js",
|
|
126
|
+
"scripts/obsidian-export.js",
|
|
127
|
+
"scripts/operational-dashboard.js",
|
|
128
|
+
"scripts/operational-integrity.js",
|
|
129
|
+
"scripts/operational-summary.js",
|
|
130
|
+
"scripts/optimize-context.js",
|
|
131
|
+
"scripts/org-dashboard.js",
|
|
132
|
+
"scripts/partner-orchestration.js",
|
|
133
|
+
"scripts/perplexity-client.js",
|
|
134
|
+
"scripts/predictive-insights.js",
|
|
135
|
+
"scripts/pro-local-dashboard.js",
|
|
136
|
+
"scripts/problem-detail.js",
|
|
137
|
+
"scripts/product-feedback.js",
|
|
138
|
+
"scripts/profile-router.js",
|
|
139
|
+
"scripts/prompt-guard.js",
|
|
140
|
+
"scripts/published-cli.js",
|
|
141
|
+
"scripts/pulse.js",
|
|
142
|
+
"scripts/rate-limiter.js",
|
|
143
|
+
"scripts/reflector-agent.js",
|
|
144
|
+
"scripts/risk-scorer.js",
|
|
145
|
+
"scripts/rlaif-self-audit.js",
|
|
146
|
+
"scripts/rubric-engine.js",
|
|
147
|
+
"scripts/secret-scanner.js",
|
|
148
|
+
"scripts/security-scanner.js",
|
|
149
|
+
"scripts/self-distill-agent.js",
|
|
150
|
+
"scripts/self-heal.js",
|
|
151
|
+
"scripts/semantic-dedup.js",
|
|
152
|
+
"scripts/semantic-layer.js",
|
|
153
|
+
"scripts/seo-gsd.js",
|
|
154
|
+
"scripts/settings-hierarchy.js",
|
|
155
|
+
"scripts/skill-generator.js",
|
|
156
|
+
"scripts/slo-alert-engine.js",
|
|
157
|
+
"scripts/statusline-cache-path.js",
|
|
158
|
+
"scripts/statusline-lesson.js",
|
|
159
|
+
"scripts/statusline-links.js",
|
|
160
|
+
"scripts/statusline-local-stats.js",
|
|
161
|
+
"scripts/statusline-meta.js",
|
|
162
|
+
"scripts/statusline.sh",
|
|
163
|
+
"scripts/statusline-tower.js",
|
|
164
|
+
"scripts/telemetry-analytics.js",
|
|
165
|
+
"scripts/thompson-sampling.js",
|
|
166
|
+
"scripts/thumbgate-search.js",
|
|
167
|
+
"scripts/tool-registry.js",
|
|
168
|
+
"scripts/tool-kpi-tracker.js",
|
|
169
|
+
"scripts/user-profile.js",
|
|
170
|
+
"scripts/validate-workflow-contract.js",
|
|
171
|
+
"scripts/vector-store.js",
|
|
172
|
+
"scripts/verification-loop.js",
|
|
173
|
+
"scripts/webhook-delivery.js",
|
|
174
|
+
"scripts/workflow-runs.js",
|
|
175
|
+
"scripts/workflow-sentinel.js",
|
|
176
|
+
"scripts/workflow-sprint-intake.js",
|
|
177
|
+
"scripts/workspace-evolver.js",
|
|
178
|
+
"scripts/xmemory-lite.js"
|
|
31
179
|
],
|
|
32
180
|
"scripts": {
|
|
33
181
|
"postinstall": "node bin/postinstall.js || true",
|
|
@@ -133,7 +281,7 @@
|
|
|
133
281
|
"test:quality": "node --test tests/validate-feedback.test.js",
|
|
134
282
|
"test:intelligence": "node --test tests/intelligence.test.js",
|
|
135
283
|
"test:training-export": "node --test tests/training-export.test.js tests/databricks-export.test.js",
|
|
136
|
-
"test:deployment": "node --test tests/deployment.test.js tests/deploy-policy.test.js tests/publish-decision.test.js tests/changeset-check.test.js tests/sonarcloud-workflow.test.js tests/package-boundary.test.js",
|
|
284
|
+
"test:deployment": "node --test tests/deployment.test.js tests/deploy-policy.test.js tests/publish-decision.test.js tests/changeset-check.test.js tests/release-notes.test.js tests/sonarcloud-workflow.test.js tests/package-boundary.test.js",
|
|
137
285
|
"test:operational-integrity": "node --test tests/operational-integrity.test.js tests/sync-branch-protection.test.js",
|
|
138
286
|
"test:workflow": "node --test tests/workflow-contract.test.js tests/social-marketing-assets.test.js tests/social-pipeline.test.js tests/positioning-contract.test.js tests/docs-claim-hygiene.test.js tests/workflow-runs.test.js tests/workflow-sprint-intake.test.js tests/gtm-revenue-loop.test.js tests/enterprise-story.test.js tests/ralph-loop.test.js tests/ralph-mode-ci.test.js",
|
|
139
287
|
"test:billing": "node --test tests/billing.test.js",
|
package/scripts/billing.js
CHANGED
|
@@ -2068,8 +2068,11 @@ function buildCheckoutSessionPayload({ successUrl, cancelUrl, customerEmail, che
|
|
|
2068
2068
|
packId: pack ? pack.id : null,
|
|
2069
2069
|
credits: pack ? pack.credits : null,
|
|
2070
2070
|
}),
|
|
2071
|
-
// 7-day free trial for subscriptions —
|
|
2072
|
-
...(pack ? {} : {
|
|
2071
|
+
// 7-day free trial for subscriptions — don't require card upfront
|
|
2072
|
+
...(pack ? {} : {
|
|
2073
|
+
subscription_data: { trial_period_days: 7 },
|
|
2074
|
+
payment_method_collection: 'if_required',
|
|
2075
|
+
}),
|
|
2073
2076
|
};
|
|
2074
2077
|
|
|
2075
2078
|
const normalizedCustomerEmail = normalizeText(customerEmail);
|
package/scripts/statusline.sh
CHANGED
package/src/api/server.js
CHANGED
|
@@ -1063,38 +1063,131 @@ function loadProPageHtml(runtimeConfig, pageContext = {}) {
|
|
|
1063
1063
|
return loadPublicMarketingTemplateHtml(PRO_PAGE_PATH, runtimeConfig, pageContext);
|
|
1064
1064
|
}
|
|
1065
1065
|
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1066
|
+
function readOptionalPublicTemplate(filePath) {
|
|
1067
|
+
try {
|
|
1068
|
+
return fs.readFileSync(filePath, 'utf-8');
|
|
1069
|
+
} catch (error) {
|
|
1070
|
+
if (error?.code === 'ENOENT') return null;
|
|
1071
|
+
throw error;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
function resolveLocalPageBootstrap(req, expectedApiKey) {
|
|
1068
1076
|
const forwardedHost = req.headers['x-forwarded-host'];
|
|
1069
1077
|
const hostHeader = Array.isArray(forwardedHost)
|
|
1070
1078
|
? forwardedHost[0]
|
|
1071
1079
|
: forwardedHost || req.headers.host || '';
|
|
1072
1080
|
const localProBootstrap = process.env.THUMBGATE_PRO_MODE === '1' && Boolean(expectedApiKey) && isLoopbackHost(hostHeader);
|
|
1073
|
-
// Developer override: auth is disabled (expectedApiKey===null), auto-connect with dummy key
|
|
1074
1081
|
const devOverride = expectedApiKey === null && isLoopbackHost(hostHeader);
|
|
1075
1082
|
const bootstrapActive = localProBootstrap || devOverride;
|
|
1076
1083
|
const serializedBootstrapKey = JSON.stringify(localProBootstrap ? expectedApiKey : devOverride ? 'dev-override' : '').replace(/</g, '\\u003c');
|
|
1077
1084
|
|
|
1085
|
+
return {
|
|
1086
|
+
bootstrapActive,
|
|
1087
|
+
serializedBootstrapKey,
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
function renderPackagedDashboardHtml({ bootstrapActive, serializedBootstrapKey }) {
|
|
1092
|
+
return `<!doctype html>
|
|
1093
|
+
<html lang="en">
|
|
1094
|
+
<head>
|
|
1095
|
+
<meta charset="utf-8">
|
|
1096
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
1097
|
+
<title>ThumbGate Dashboard</title>
|
|
1098
|
+
<style>
|
|
1099
|
+
:root { color-scheme: light dark; --bg:#0f172a; --panel:#111827; --text:#f8fafc; --muted:#94a3b8; --line:#334155; --accent:#22c55e; }
|
|
1100
|
+
body { margin:0; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:linear-gradient(135deg,#020617,#111827); color:var(--text); }
|
|
1101
|
+
main { max-width:920px; margin:0 auto; padding:48px 20px; }
|
|
1102
|
+
.panel { border:1px solid var(--line); border-radius:20px; background:rgba(15,23,42,.86); padding:28px; box-shadow:0 24px 80px rgba(0,0,0,.32); }
|
|
1103
|
+
.eyebrow { color:var(--accent); font-size:13px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
|
|
1104
|
+
h1 { font-size:clamp(32px,5vw,54px); line-height:1; margin:14px 0; }
|
|
1105
|
+
p { color:var(--muted); font-size:18px; line-height:1.6; }
|
|
1106
|
+
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-top:26px; }
|
|
1107
|
+
a { color:var(--text); text-decoration:none; }
|
|
1108
|
+
.card { display:block; border:1px solid var(--line); border-radius:16px; padding:18px; background:rgba(30,41,59,.7); }
|
|
1109
|
+
.card strong { display:block; margin-bottom:8px; }
|
|
1110
|
+
.card span { color:var(--muted); font-size:14px; line-height:1.5; }
|
|
1111
|
+
</style>
|
|
1112
|
+
<script>
|
|
1113
|
+
window.THUMBGATE_DASHBOARD_BOOTSTRAP = { enabled: ${bootstrapActive ? 'true' : 'false'}, apiKey: ${serializedBootstrapKey} };
|
|
1114
|
+
</script>
|
|
1115
|
+
</head>
|
|
1116
|
+
<body>
|
|
1117
|
+
<main>
|
|
1118
|
+
<section class="panel">
|
|
1119
|
+
<div class="eyebrow">Packaged runtime</div>
|
|
1120
|
+
<h1>ThumbGate is running locally.</h1>
|
|
1121
|
+
<p>This lightweight npm dashboard is bundled without marketing assets, so installs stay small while core feedback, lessons, and API routes remain available.</p>
|
|
1122
|
+
<div class="grid">
|
|
1123
|
+
<a class="card" href="/v1/dashboard"><strong>Dashboard JSON</strong><span>Inspect feedback totals, lesson counts, and Reliability Gateway health.</span></a>
|
|
1124
|
+
<a class="card" href="/lessons"><strong>Lessons</strong><span>Review remembered thumbs-up/down lessons and enforcement context.</span></a>
|
|
1125
|
+
<a class="card" href="/health"><strong>Health</strong><span>Verify the installed package version and runtime status.</span></a>
|
|
1126
|
+
</div>
|
|
1127
|
+
</section>
|
|
1128
|
+
</main>
|
|
1129
|
+
</body>
|
|
1130
|
+
</html>`;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
function renderPackagedLessonsHtml({ bootstrapActive, serializedBootstrapKey }) {
|
|
1134
|
+
return `<!doctype html>
|
|
1135
|
+
<html lang="en">
|
|
1136
|
+
<head>
|
|
1137
|
+
<meta charset="utf-8">
|
|
1138
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
1139
|
+
<title>ThumbGate Lessons</title>
|
|
1140
|
+
<style>
|
|
1141
|
+
:root { color-scheme: light dark; --bg:#0f172a; --panel:#111827; --text:#f8fafc; --muted:#94a3b8; --line:#334155; --accent:#38bdf8; }
|
|
1142
|
+
body { margin:0; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:linear-gradient(135deg,#020617,#0f172a); color:var(--text); }
|
|
1143
|
+
main { max-width:920px; margin:0 auto; padding:48px 20px; }
|
|
1144
|
+
.panel { border:1px solid var(--line); border-radius:20px; background:rgba(15,23,42,.86); padding:28px; box-shadow:0 24px 80px rgba(0,0,0,.32); }
|
|
1145
|
+
.eyebrow { color:var(--accent); font-size:13px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
|
|
1146
|
+
h1 { font-size:clamp(32px,5vw,54px); line-height:1; margin:14px 0; }
|
|
1147
|
+
p { color:var(--muted); font-size:18px; line-height:1.6; }
|
|
1148
|
+
.actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:26px; }
|
|
1149
|
+
a { color:var(--text); text-decoration:none; border:1px solid var(--line); border-radius:999px; padding:12px 16px; background:rgba(30,41,59,.7); }
|
|
1150
|
+
</style>
|
|
1151
|
+
<script>
|
|
1152
|
+
window.THUMBGATE_LESSONS_BOOTSTRAP = { enabled: ${bootstrapActive ? 'true' : 'false'}, apiKey: ${serializedBootstrapKey} };
|
|
1153
|
+
</script>
|
|
1154
|
+
</head>
|
|
1155
|
+
<body>
|
|
1156
|
+
<main>
|
|
1157
|
+
<section class="panel">
|
|
1158
|
+
<div class="eyebrow">Packaged runtime</div>
|
|
1159
|
+
<h1>ThumbGate lessons are available.</h1>
|
|
1160
|
+
<p>The full hosted lessons UI is excluded from the npm tarball, but installed packages still expose the lesson APIs and detail pages needed for local agent feedback loops.</p>
|
|
1161
|
+
<div class="actions">
|
|
1162
|
+
<a href="/v1/lessons/search">Search lessons JSON</a>
|
|
1163
|
+
<a href="/v1/feedback/stats">Feedback stats JSON</a>
|
|
1164
|
+
<a href="/dashboard">Back to dashboard</a>
|
|
1165
|
+
</div>
|
|
1166
|
+
</section>
|
|
1167
|
+
</main>
|
|
1168
|
+
</body>
|
|
1169
|
+
</html>`;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
function loadDashboardPageHtml(req, expectedApiKey) {
|
|
1173
|
+
const bootstrap = resolveLocalPageBootstrap(req, expectedApiKey);
|
|
1174
|
+
const template = readOptionalPublicTemplate(DASHBOARD_PAGE_PATH);
|
|
1175
|
+
if (!template) return renderPackagedDashboardHtml(bootstrap);
|
|
1176
|
+
|
|
1078
1177
|
return fillTemplate(template, {
|
|
1079
|
-
'__DASHBOARD_BOOTSTRAP_KEY__': serializedBootstrapKey,
|
|
1080
|
-
'__DASHBOARD_BOOTSTRAP_ENABLED__': bootstrapActive ? 'true' : 'false',
|
|
1178
|
+
'__DASHBOARD_BOOTSTRAP_KEY__': bootstrap.serializedBootstrapKey,
|
|
1179
|
+
'__DASHBOARD_BOOTSTRAP_ENABLED__': bootstrap.bootstrapActive ? 'true' : 'false',
|
|
1081
1180
|
});
|
|
1082
1181
|
}
|
|
1083
1182
|
|
|
1084
1183
|
function loadLessonsPageHtml(req, expectedApiKey) {
|
|
1085
|
-
const
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
? forwardedHost[0]
|
|
1089
|
-
: forwardedHost || req.headers.host || '';
|
|
1090
|
-
const localProBootstrap = process.env.THUMBGATE_PRO_MODE === '1' && Boolean(expectedApiKey) && isLoopbackHost(hostHeader);
|
|
1091
|
-
const devOverride = expectedApiKey === null && isLoopbackHost(hostHeader);
|
|
1092
|
-
const bootstrapActive = localProBootstrap || devOverride;
|
|
1093
|
-
const serializedBootstrapKey = JSON.stringify(localProBootstrap ? expectedApiKey : devOverride ? 'dev-override' : '').replace(/</g, '\\u003c');
|
|
1184
|
+
const bootstrap = resolveLocalPageBootstrap(req, expectedApiKey);
|
|
1185
|
+
const template = readOptionalPublicTemplate(LESSONS_PAGE_PATH);
|
|
1186
|
+
if (!template) return renderPackagedLessonsHtml(bootstrap);
|
|
1094
1187
|
|
|
1095
1188
|
return fillTemplate(template, {
|
|
1096
|
-
'__LESSONS_BOOTSTRAP_KEY__': serializedBootstrapKey,
|
|
1097
|
-
'__LESSONS_BOOTSTRAP_ENABLED__': bootstrapActive ? 'true' : 'false',
|
|
1189
|
+
'__LESSONS_BOOTSTRAP_KEY__': bootstrap.serializedBootstrapKey,
|
|
1190
|
+
'__LESSONS_BOOTSTRAP_ENABLED__': bootstrap.bootstrapActive ? 'true' : 'false',
|
|
1098
1191
|
});
|
|
1099
1192
|
}
|
|
1100
1193
|
|
|
@@ -5079,6 +5172,10 @@ module.exports = {
|
|
|
5079
5172
|
getPosthogProxyPath,
|
|
5080
5173
|
isAllowedPosthogProxyPath,
|
|
5081
5174
|
renderSitemapXml,
|
|
5175
|
+
renderPackagedDashboardHtml,
|
|
5176
|
+
renderPackagedLessonsHtml,
|
|
5177
|
+
readOptionalPublicTemplate,
|
|
5178
|
+
resolveLocalPageBootstrap,
|
|
5082
5179
|
},
|
|
5083
5180
|
};
|
|
5084
5181
|
|
package/src/index.js
ADDED
|
Binary file
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-labelledby="title desc">
|
|
2
|
-
<title>ThumbGate</title>
|
|
3
|
-
<desc>Gateway icon for the Claude Desktop workflow hardening extension.</desc>
|
|
4
|
-
<defs>
|
|
5
|
-
<linearGradient id="bg" x1="0%" x2="100%" y1="0%" y2="100%">
|
|
6
|
-
<stop offset="0%" stop-color="#111827"/>
|
|
7
|
-
<stop offset="100%" stop-color="#1f2937"/>
|
|
8
|
-
</linearGradient>
|
|
9
|
-
<linearGradient id="gate" x1="0%" x2="100%" y1="0%" y2="100%">
|
|
10
|
-
<stop offset="0%" stop-color="#f97316"/>
|
|
11
|
-
<stop offset="100%" stop-color="#fb7185"/>
|
|
12
|
-
</linearGradient>
|
|
13
|
-
</defs>
|
|
14
|
-
<rect width="512" height="512" rx="96" fill="url(#bg)"/>
|
|
15
|
-
<path fill="url(#gate)" d="M152 128h208c17.7 0 32 14.3 32 32v64h-64v-32H184v128h144v-32h64v64c0 17.7-14.3 32-32 32H152c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32Z"/>
|
|
16
|
-
<path fill="#fff4ed" d="M248 180h96v48h-48v56h48v48h-96z"/>
|
|
17
|
-
<circle cx="196" cy="256" r="26" fill="#fef3c7"/>
|
|
18
|
-
</svg>
|