thumbgate 1.39.1 → 1.40.2
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/plugin.json +1 -1
- package/.well-known/llms.txt +2 -2
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +5 -4
- package/adapters/claude/.mcp.json +6 -2
- package/adapters/codex/config.toml +5 -0
- package/adapters/forge/forge.yaml +4 -4
- package/adapters/future-agi/.mcp.json +1 -1
- package/adapters/future-agi/config.toml +1 -1
- package/adapters/future-agi/opencode.json +1 -1
- package/adapters/herdr/herdr-plugin.toml +2 -2
- package/adapters/mcp/server-stdio.js +82 -7
- package/adapters/opencode/opencode.json +1 -1
- package/bin/cli.js +128 -15
- package/config/brand-standards.json +131 -0
- package/config/gates/default.json +18 -1
- package/config/github-about.json +1 -1
- package/config/mcp-allowlists.json +16 -3
- package/config/merge-quality-checks.json +1 -0
- package/config/post-deploy-marketing-pages.json +3 -3
- package/config/schemas/task-outcome-receipt.schema.json +9 -0
- package/openapi/openapi.yaml +7 -3
- package/package.json +98 -31
- package/public/about.html +2 -2
- package/public/admin.html +771 -0
- package/public/agent-manager.html +3 -3
- package/public/agents-cost-savings.html +1 -1
- package/public/ai-malpractice-prevention.html +12 -12
- package/public/architecture.html +0 -1
- package/public/assets/diagrams/decision.svg +3 -3
- package/public/blog/2026-10-05-why-3-days-of-triage-wont-save-ai-speed-code.html +1 -1
- package/public/blog/2026-10-09-your-code-got-a-third-author-governance.html +1 -1
- package/public/blog/git-at-agent-scale.html +2 -2
- package/public/blog/inside-your-boundary.html +1 -1
- package/public/blog/process-over-outcome-gates.html +1 -1
- package/public/case-studies.html +1 -2
- package/public/codex-enterprise.html +1 -1
- package/public/codex-plugin.html +1 -1
- package/public/dashboard.html +773 -481
- package/public/diagnostic.html +8 -3
- package/public/enterprise-governance.html +26 -174
- package/public/eval-scorecard.html +3 -4
- package/public/eval-scorecard.json +2 -2
- package/public/evaluations.html +0 -1
- package/public/founders.html +3 -3
- package/public/gaming-playbook.html +4 -4
- package/public/guide.html +3 -5
- package/public/index.html +181 -205
- package/public/install.html +12 -11
- package/public/js/buyer-intent.js +49 -8
- package/public/lessons.html +103 -46
- package/public/numbers.html +32 -33
- package/public/operator-framework.html +44 -72
- package/public/peter.html +3 -3
- package/public/platform-partners.html +1 -1
- package/public/pricing.html +61 -327
- package/public/pro.html +3 -1
- package/public/project-switcher.js +76 -0
- package/public/whitepaper.html +1 -2
- package/scripts/activation-quickstart.js +15 -3
- package/scripts/activation-tracker.js +280 -3
- package/scripts/agent-action-inventory.js +235 -143
- package/scripts/agent-operations-planner.js +1 -1
- package/scripts/agent-readiness.js +36 -6
- package/scripts/agentic-prompt-pipelines.js +901 -0
- package/scripts/analytics-report.js +363 -0
- package/scripts/analytics-window.js +7 -1
- package/scripts/async-job-runner.js +66 -11
- package/scripts/audit-trail.js +37 -24
- package/scripts/auto-context-packs.js +249 -0
- package/scripts/auto-promote-gates.js +37 -27
- package/scripts/backfill-lesson-scopes.js +122 -0
- package/scripts/billing-setup.js +137 -0
- package/scripts/billing.js +889 -132
- package/scripts/bot-detection.js +112 -0
- package/scripts/brand-standards-gate.js +571 -0
- package/scripts/chatgpt-ads-readiness-pack.js +1 -1
- package/scripts/check-update.js +236 -0
- package/scripts/cli-schema.js +1 -1
- package/scripts/commercial-offer.js +2 -2
- package/scripts/contextfs.js +9 -3
- package/scripts/conversion-rate-stats.js +442 -0
- package/scripts/cost-cli.js +147 -0
- package/scripts/creator-campaigns.js +239 -0
- package/scripts/cross-encoder-reranker.js +4 -0
- package/scripts/cuda-gate-batch.js +560 -0
- package/scripts/daemon-manager.js +108 -0
- package/scripts/dashboard-chat.js +11 -0
- package/scripts/dashboard.js +576 -169
- package/scripts/decision-journal.js +7 -4
- package/scripts/delegation-runtime.js +1036 -0
- package/scripts/dispatch-brief.js +159 -0
- package/scripts/distribution-surfaces.js +110 -0
- package/scripts/docker-sandbox-planner.js +3 -3
- package/scripts/egm-goldfish-packet.js +95 -0
- package/scripts/embeddinggemma-adapter.js +407 -0
- package/scripts/export-dpo-pairs.js +12 -7
- package/scripts/feedback-aggregate.js +4 -0
- package/scripts/feedback-attribution.js +6 -4
- package/scripts/feedback-history-distiller.js +18 -6
- package/scripts/feedback-loop.js +255 -89
- package/scripts/feedback-paths.js +8 -1
- package/scripts/feedback-sanitizer.js +5 -0
- package/scripts/feedback-scope.js +106 -0
- package/scripts/feedback-session.js +8 -2
- package/scripts/filesystem-search.js +13 -8
- package/scripts/financial-control-plane.js +707 -45
- package/scripts/funnel-analytics.js +35 -0
- package/scripts/gate-semantic-layer.js +292 -0
- package/scripts/gate-stats.js +8 -2
- package/scripts/gates-engine.js +694 -230
- package/scripts/generate-eval-scorecard.js +0 -1
- package/scripts/harness-tool-names.js +31 -5
- package/scripts/hybrid-feedback-context.js +5 -2
- package/scripts/implementation-notes.js +241 -0
- package/scripts/intent-router.js +518 -0
- package/scripts/intervention-policy.js +2 -1
- package/scripts/latency-budget.js +164 -0
- package/scripts/lesson-canonical.js +2 -2
- package/scripts/lesson-db.js +55 -14
- package/scripts/lesson-graph.js +2 -1
- package/scripts/lesson-retrieval.js +95 -9
- package/scripts/lesson-search.js +86 -22
- package/scripts/lesson-synthesis.js +21 -5
- package/scripts/mailer/index.js +17 -1
- package/scripts/mailer/resend-mailer.js +213 -179
- package/scripts/mcp-writeguard.js +158 -0
- package/scripts/migrate-project-scope.js +209 -0
- package/scripts/model-candidates.js +414 -0
- package/scripts/openrouter-armor-partnership-diode.js +2419 -0
- package/scripts/operational-dashboard.js +172 -0
- package/scripts/operational-integrity.js +436 -3
- package/scripts/operational-summary.js +190 -0
- package/scripts/operator-artifacts.js +622 -0
- package/scripts/optimize-context.js +17 -0
- package/scripts/override-audit.js +2 -0
- package/scripts/owner-admin.js +338 -0
- package/scripts/pr-manager.js +194 -1
- package/scripts/predictive-insights.js +449 -0
- package/scripts/profound-aeo-citation-engine.js +583 -0
- package/scripts/progressive-signoff.js +260 -0
- package/scripts/project-catalog.js +243 -0
- package/scripts/project-dashboard.js +61 -0
- package/scripts/project-evidence.js +172 -0
- package/scripts/project-identity.js +182 -0
- package/scripts/project-scope.js +381 -0
- package/scripts/prompt-guard.js +446 -52
- package/scripts/proof-report.js +232 -0
- package/scripts/provider-action-normalizer.js +14 -6
- package/scripts/pulse.js +80 -0
- package/scripts/rate-limiter.js +41 -0
- package/scripts/rrsi-doctor.js +2698 -0
- package/scripts/secret-redaction.js +171 -25
- package/scripts/secret-scanner.js +101 -42
- package/scripts/self-protection.js +2 -2
- package/scripts/seo-gsd.js +14 -14
- package/scripts/session-context-dedupe.js +66 -0
- package/scripts/session-report.js +120 -0
- package/scripts/settings-hierarchy.js +4 -2
- package/scripts/statusline-meta.js +34 -23
- package/scripts/subagent-profiles.js +79 -0
- package/scripts/task-outcomes.js +29 -2
- package/scripts/telemetry-analytics.js +238 -13
- package/scripts/third-author-cli.js +118 -0
- package/scripts/third-author-governance.js +437 -0
- package/scripts/thumbgate-dream.js +878 -0
- package/scripts/thumbgate-search.js +23 -9
- package/scripts/tool-kpi-tracker.js +5 -2
- package/scripts/tool-registry.js +42 -1
- package/scripts/triage-savings-calculator.js +1 -1
- package/scripts/vector-store.js +4 -1
- package/scripts/verified-lessons.js +270 -0
- package/scripts/verify-marketing-pages-deployed.js +2 -2
- package/scripts/workflow-sentinel.js +29 -10
- package/server.json +2 -2
- package/skills/thumbgate-daily-discoveries/SKILL.md +25 -41
- package/src/api/server.js +2371 -451
- package/src/feedback.js +21 -0
- package/src/hermes-sync-plane.js +2 -1
- package/src/index.js +2 -0
- package/src/lesson-search.js +9 -0
- package/src/mckinsey-top-company-ai-coding.js +493 -0
- package/src/mcp/server.js +3 -0
- package/src/mcp-writeguard.js +772 -11
- package/src/openshell-lovable-engine.js +1475 -0
- package/src/task-outcome.js +3 -0
- package/config/evals/agent-safety-eval.json +0 -447
- package/config/evals/retrieval-ranking-golden.json +0 -522
- package/config/progressive/01-wire-only.json +0 -11
- package/config/progressive/02-dashboard-empty-ok.json +0 -10
- package/config/progressive/03-one-lesson.json +0 -10
- package/config/progressive/04-warn-fires.json +0 -11
- package/config/progressive/05-strict-optional.json +0 -11
- package/config/progressive/README.md +0 -15
- package/public/assets/diagrams/agent-integration.png +0 -0
- package/public/assets/diagrams/thumbgate-architecture.png +0 -0
- package/scripts/install-thumbgate-daily-publish-launchd.sh +0 -83
- package/scripts/thumbgate-daily-discoveries-publish.js +0 -461
- package/scripts/thumbgate-daily-discoveries-publish.sh +0 -18
package/scripts/bot-detection.js
CHANGED
|
@@ -116,6 +116,11 @@ const BOT_PATTERNS = [
|
|
|
116
116
|
/\blighthouse\b/i,
|
|
117
117
|
/\bspeedcurve\b/i,
|
|
118
118
|
/\bpagespeed\b/i,
|
|
119
|
+
/\bmoney-v\d+-audit\b/i,
|
|
120
|
+
/\bprotocolv\d+-gate\b/i,
|
|
121
|
+
/\bfuzz faster u fool\b/i,
|
|
122
|
+
/\bffuf\b/i,
|
|
123
|
+
/\bfirstpage\//i,
|
|
119
124
|
];
|
|
120
125
|
|
|
121
126
|
function normalizeHeader(value) {
|
|
@@ -165,6 +170,109 @@ function isProbablyBot(headers) {
|
|
|
165
170
|
return classifyRequester(headers).isBot;
|
|
166
171
|
}
|
|
167
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Stricter check for links that open a checkout page on GET. Link unfurlers and
|
|
175
|
+
* email security scanners send browser-shaped User-Agent and Accept headers but
|
|
176
|
+
* no Sec-Fetch-* navigation headers, so they pass classifyRequester and leave
|
|
177
|
+
* expired sessions nobody saw. Browsers send Sec-Fetch-Mode: navigate on a link
|
|
178
|
+
* click; older browsers without Sec-Fetch pass when the Referer is our own site.
|
|
179
|
+
*/
|
|
180
|
+
const THUMBGATE_REFERER_HOSTS = new Set([
|
|
181
|
+
'thumbgate.ai',
|
|
182
|
+
'www.thumbgate.ai',
|
|
183
|
+
'thumbgate.app',
|
|
184
|
+
'mcp.thumbgate.ai',
|
|
185
|
+
'thumbgate-production.up.railway.app',
|
|
186
|
+
]);
|
|
187
|
+
|
|
188
|
+
function parseSafeUrl(rawUrl) {
|
|
189
|
+
try {
|
|
190
|
+
return new URL(rawUrl);
|
|
191
|
+
} catch {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function engineSendsSecFetchUser(headers = {}) {
|
|
197
|
+
if (normalizeHeader(headers['sec-ch-ua']).trim()) return true;
|
|
198
|
+
const ua = normalizeHeader(headers['user-agent'] || headers['User-Agent']);
|
|
199
|
+
return /\b(?:Chrome|Chromium|Edg|OPR|Firefox)\//i.test(ua);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function isHumanCheckoutNavigation(headers = {}, appOrigin = '') {
|
|
203
|
+
const referer = normalizeHeader(headers.referer || headers.referrer);
|
|
204
|
+
const parsedReferer = referer ? parseSafeUrl(referer) : null;
|
|
205
|
+
const parsedOrigin = appOrigin ? parseSafeUrl(appOrigin) : null;
|
|
206
|
+
if (parsedReferer && /^\/go\//i.test(parsedReferer.pathname || '')) {
|
|
207
|
+
const refererHost = parsedReferer.host.toLowerCase();
|
|
208
|
+
const isOwnHost = parsedOrigin
|
|
209
|
+
? refererHost === parsedOrigin.host.toLowerCase()
|
|
210
|
+
: THUMBGATE_REFERER_HOSTS.has(parsedReferer.hostname.toLowerCase());
|
|
211
|
+
if (isOwnHost) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
const mode = normalizeHeader(headers['sec-fetch-mode']).toLowerCase();
|
|
216
|
+
const dest = normalizeHeader(headers['sec-fetch-dest']).toLowerCase();
|
|
217
|
+
const site = normalizeHeader(headers['sec-fetch-site']).toLowerCase();
|
|
218
|
+
const user = normalizeHeader(headers['sec-fetch-user']).toLowerCase();
|
|
219
|
+
if (mode === 'navigate' && (!dest || dest === 'document')) {
|
|
220
|
+
if ((site === 'none' || site === 'cross-site') && user !== '?1' && engineSendsSecFetchUser(headers)) {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
if (mode) return false;
|
|
226
|
+
if (!parsedReferer || !parsedOrigin) return false;
|
|
227
|
+
return parsedReferer.host.toLowerCase() === parsedOrigin.host.toLowerCase();
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// --- Rapid multi-checkout guard ---------------------------------------------
|
|
231
|
+
// A person opens one checkout, then reads the Stripe page. Headless agents and
|
|
232
|
+
// link checkers walk every buy button in a few seconds, and each walk opens a
|
|
233
|
+
// live Stripe session that later shows up as an abandoned checkout. When one
|
|
234
|
+
// requester (first forwarded IP + user agent) reaches a second checkout link
|
|
235
|
+
// within the window, the caller should send it to the no-session confirm page.
|
|
236
|
+
const RAPID_CHECKOUT_WINDOW_MS = 20 * 1000;
|
|
237
|
+
const RAPID_CHECKOUT_MAX_KEYS = 5000;
|
|
238
|
+
|
|
239
|
+
// Production traffic always arrives through the edge proxy with
|
|
240
|
+
// X-Forwarded-For set. Direct socket connections (local dev, tests) are not
|
|
241
|
+
// tracked, so a missing header yields no key.
|
|
242
|
+
function checkoutRequesterKey(headers = {}) {
|
|
243
|
+
const ip = (
|
|
244
|
+
normalizeHeader(headers['cf-connecting-ip']).trim() ||
|
|
245
|
+
normalizeHeader(headers['x-forwarded-for']).split(',')[0].trim()
|
|
246
|
+
);
|
|
247
|
+
if (!ip) return null;
|
|
248
|
+
return `${ip}|${normalizeHeader(headers['user-agent'])}`;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function createRapidCheckoutGuard({ windowMs = RAPID_CHECKOUT_WINDOW_MS, maxKeys = RAPID_CHECKOUT_MAX_KEYS } = {}) {
|
|
252
|
+
const lastSeen = new Map();
|
|
253
|
+
function prune(now) {
|
|
254
|
+
for (const [key, at] of lastSeen) {
|
|
255
|
+
if (now - at <= windowMs && lastSeen.size <= maxKeys) break;
|
|
256
|
+
lastSeen.delete(key);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return {
|
|
260
|
+
// Records this checkout hit and reports whether the same requester already
|
|
261
|
+
// reached a checkout link inside the window.
|
|
262
|
+
hit(key, now = Date.now()) {
|
|
263
|
+
if (!key) return false;
|
|
264
|
+
const previous = lastSeen.get(key);
|
|
265
|
+
lastSeen.delete(key);
|
|
266
|
+
lastSeen.set(key, now);
|
|
267
|
+
prune(now);
|
|
268
|
+
return previous !== undefined && now - previous <= windowMs;
|
|
269
|
+
},
|
|
270
|
+
size() {
|
|
271
|
+
return lastSeen.size;
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
|
|
168
276
|
// --- Visitor classification (analytics filtering) ---------------------------
|
|
169
277
|
// Classifies telemetry/analytics traffic as bot / owner / real_user.
|
|
170
278
|
// Owner traffic is identified via the THUMBGATE_OWNER_EMAILS env var
|
|
@@ -215,6 +323,10 @@ function botFilterMiddleware(req, res, next) {
|
|
|
215
323
|
module.exports = {
|
|
216
324
|
classifyRequester,
|
|
217
325
|
isProbablyBot,
|
|
326
|
+
isHumanCheckoutNavigation,
|
|
327
|
+
checkoutRequesterKey,
|
|
328
|
+
createRapidCheckoutGuard,
|
|
329
|
+
RAPID_CHECKOUT_WINDOW_MS,
|
|
218
330
|
classifyVisitor,
|
|
219
331
|
shouldExcludeFromAnalytics,
|
|
220
332
|
botFilterMiddleware,
|