thumbgate 1.40.9 → 1.40.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.well-known/mcp/server-card.json +1 -1
  3. package/README.md +46 -40
  4. package/adapters/claude/.mcp.json +3 -3
  5. package/adapters/forge/forge.yaml +3 -3
  6. package/adapters/future-agi/.mcp.json +1 -1
  7. package/adapters/future-agi/config.toml +1 -1
  8. package/adapters/future-agi/opencode.json +1 -1
  9. package/adapters/herdr/herdr-plugin.toml +2 -2
  10. package/adapters/mcp/server-stdio.js +1 -1
  11. package/adapters/opencode/opencode.json +1 -1
  12. package/bin/cli.js +9 -8
  13. package/bin/postinstall.js +2 -2
  14. package/package.json +9 -5
  15. package/public/admin.html +229 -29
  16. package/public/agent-manager.html +2 -2
  17. package/public/agents-cost-savings.html +1 -1
  18. package/public/codex-enterprise.html +2 -2
  19. package/public/compare.html +3 -3
  20. package/public/dashboard.html +28 -9
  21. package/public/diagnostic.html +1 -1
  22. package/public/founders.html +1 -1
  23. package/public/guide.html +4 -4
  24. package/public/index.html +80 -116
  25. package/public/install.html +19 -19
  26. package/public/js/connect-panel.js +21 -7
  27. package/public/lessons.html +1 -1
  28. package/public/numbers.html +2 -2
  29. package/public/pricing.html +12 -9
  30. package/public/pro.html +96 -137
  31. package/public/project-switcher.js +42 -18
  32. package/scripts/auto-wire-hooks.js +36 -2
  33. package/scripts/billing.js +3 -1
  34. package/scripts/cli-schema.js +2 -3
  35. package/scripts/commercial-offer.js +1 -1
  36. package/scripts/gates-engine.js +26 -8
  37. package/scripts/hook-runtime.js +18 -1
  38. package/scripts/owner-admin.js +212 -13
  39. package/scripts/owner-alerts.js +79 -0
  40. package/scripts/owner-telemetry.js +93 -3
  41. package/scripts/project-catalog.js +3 -1
  42. package/scripts/project-identity.js +4 -1
  43. package/scripts/seo-gsd.js +1 -1
  44. package/scripts/telemetry-analytics.js +14 -4
  45. package/server.json +2 -2
  46. package/src/api/server.js +51 -3
package/public/admin.html CHANGED
@@ -161,6 +161,19 @@
161
161
  font-size: 12px;
162
162
  color: var(--muted);
163
163
  }
164
+ .delta {
165
+ font-size: 13px;
166
+ margin-top: 4px;
167
+ }
168
+ .delta.up {
169
+ color: #4ade80;
170
+ }
171
+ .delta.down {
172
+ color: #f87171;
173
+ }
174
+ .delta.flat {
175
+ color: var(--muted);
176
+ }
164
177
  .status {
165
178
  border-radius: 99px;
166
179
  padding: 3px 10px;
@@ -262,29 +275,22 @@
262
275
  <div id="content" aria-live="polite"></div>
263
276
  </main>
264
277
  <footer>
265
- Customer data stays in this private view. Payments are charge records.
266
- External booked revenue excludes identified internal and test purchases;
267
- unknown identities remain excluded. Deployment time is only shown when
268
- known.
278
+ Private and read-only. Owner and test purchases are left out of every
279
+ revenue number. JSON for agents: /v1/admin/summary and /v1/admin/alerts.
269
280
  </footer>
270
281
  <script nonce="__ADMIN_NONCE__">
271
282
  'use strict';
272
283
  const content = document.getElementById('content');
273
- const sections = [
274
- 'money',
275
- 'overview',
276
- 'stripe',
277
- 'data',
278
- 'analytics',
279
- 'observability',
280
- ];
284
+ // Today answers "does anything need me, and how did this week go". Overview repeated it, so it left the menu;
285
+ // its numbers stay in /v1/admin/summary for agents.
286
+ const sections = ['money', 'analytics', 'observability', 'stripe', 'data'];
281
287
  const titles = {
282
- money: 'Money',
288
+ money: 'Today',
283
289
  overview: 'Overview',
284
290
  stripe: 'Stripe records',
285
291
  data: 'Hosted data',
286
- analytics: 'Analytics',
287
- observability: 'Observability',
292
+ analytics: 'Growth',
293
+ observability: 'Health',
288
294
  };
289
295
  let current = 'money';
290
296
  let resource = 'customers';
@@ -471,9 +477,9 @@
471
477
  : 'N/A, not reported',
472
478
  });
473
479
  return [
474
- row('Acquisition to activation', rates.acquisitionToActivation, stages.acquisition, 'no measured acquisition events'),
475
- row('Activation to paid', rates.activationToPaid, stages.activation, 'no measured activations'),
476
- row('Acquisition to paid', rates.acquisitionToPaid, stages.acquisition, 'no measured acquisition events'),
480
+ row('Acquisition event to first API-key use', rates.acquisitionToActivation, stages.acquisition, 'no measured acquisition events'),
481
+ row('First API-key use to paid', rates.activationToPaid, stages.activation, 'no recorded first API-key uses'),
482
+ row('Acquisition event to paid', rates.acquisitionToPaid, stages.acquisition, 'no measured acquisition events'),
477
483
  ];
478
484
  }
479
485
  function funnelTable(parent, funnel) {
@@ -483,7 +489,7 @@
483
489
  parent.append(
484
490
  element(
485
491
  'p',
486
- 'A lead is one distinct acquisition event identity (an acquisition, trace, visitor, session or install id) from a real checkout step; synthetic checkout sessions are excluded. ' +
492
+ 'An acquisition identity is one distinct event identity (an acquisition, trace, visitor, session or install id) from a recorded acquisition event; synthetic checkout sessions are excluded. ' +
487
493
  'An activation is the first call made with an API key. Free local use without a key is not measured, so a 0 here means none observed, not none happened.',
488
494
  'muted',
489
495
  ),
@@ -503,6 +509,7 @@
503
509
  paid: 'Paid checkouts (Stripe)',
504
510
  subscriptions: 'Active subscriptions (Stripe)',
505
511
  checkouts: 'Checkout sessions (Stripe)',
512
+ recurring: 'Renewals and cancellations (Stripe)',
506
513
  traffic: 'Site visits (telemetry)',
507
514
  leads: 'Signups and leads (ledgers)',
508
515
  };
@@ -537,7 +544,7 @@
537
544
  if (paying > 0) return 'Money is arriving: ' + paying + ' paying customers.';
538
545
  const parts = [];
539
546
  if (Number.isFinite(leads) && leads > 0 && stages.activation === 0)
540
- parts.push(leads + ' acquisition leads and 0 measured activations: no lead has made a first API-key call (free local use is not measured).');
547
+ parts.push(leads + ' distinct acquisition-event identities and 0 recorded first API-key uses. This does not establish unique people, installations or successful local use.');
541
548
  if (since && since.human === 0)
542
549
  parts.push('Since the bot check on ' + (panel.botCheckBeganLabel || 'its start date') + ', ' + since.started + ' checkout sessions started and 0 are classified as a browser (' + since.bot + ' bot-classified, ' + since.internal + ' owner or test).');
543
550
  else if (since && since.human > 0)
@@ -549,7 +556,7 @@
549
556
  if (m.value === null || m.value === undefined) return m.reason || 'Unavailable';
550
557
  if (typeof m.value === 'object') {
551
558
  const entries = Object.entries(m.value);
552
- return entries.length ? entries.map(([c, a]) => money(a, c)).join(', ') : 'None in this window';
559
+ return entries.length ? entries.map(([c, a]) => money(a, c)).join(', ') : m.status === 'partial' ? 'No amounts found in partial evidence' : 'None in this window';
553
560
  }
554
561
  return String(m.value);
555
562
  }
@@ -569,7 +576,7 @@
569
576
  const mine = activeLoad;
570
577
  const box = element('div');
571
578
  parent.append(box);
572
- box.append(element('p', 'Loading verified money and measured activation…', 'muted'));
579
+ box.append(element('p', 'Loading money and recorded first API-key use…', 'muted'));
573
580
  const read = (url) =>
574
581
  fetch(url, { credentials: 'same-origin', cache: 'no-store' }).then((r) => (r.ok ? r.json() : null)).catch(() => null);
575
582
  Promise.all([read('/v1/admin/summary'), read('/v1/admin/analytics')]).then(([summary, analytics]) => {
@@ -577,22 +584,23 @@
577
584
  box.replaceChildren();
578
585
  const fields = summary?.data?.fields;
579
586
  const funnel = analytics?.data?.funnel;
580
- box.append(element('h3', 'Verified external money'));
587
+ box.append(element('h3', 'External money and verification state'));
581
588
  if (fields)
582
589
  table(
583
590
  box,
584
591
  [['Metric', (r) => r.name], ['Value', (r) => r.value], ['State', (r) => r.state], ['Source observed', (r) => r.observed]],
585
- metricRows(fields, ['money.paying_customers', 'money.active_pro', 'money.revenue_30d', 'money.subscription_invoices_30d']),
592
+ metricRows(fields, ['money.paying_customers', 'money.active_pro', 'money.mrr', 'money.cancelling_at_period_end', 'money.revenue_30d', 'money.subscription_invoices_30d', 'usage.active_installs_7d', 'usage.active_installs_30d', 'usage.activated_installs_30d', 'usage.returning_installs_30d']),
586
593
  );
587
594
  else box.append(element('p', 'The money summary is unavailable right now. No zero is inferred.', 'notice'));
588
- box.append(element('h3', 'Measured activation'));
595
+ box.append(element('h3', 'Recorded first API-key use'));
596
+ box.append(element('p', 'Free local use never calls an API key, so this funnel cannot see it. CLI installs that captured feedback, in the table above, are the activation measure for the free product.', 'muted'));
589
597
  if (funnel) {
590
598
  cards(
591
599
  box,
592
600
  {
593
- 'Unique acquisition leads': funnel.uniqueAcquisitionLeads,
601
+ 'Distinct acquisition-event identities': funnel.uniqueAcquisitionLeads,
594
602
  'Acquisition events': funnel.stageCounts?.acquisition,
595
- 'Measured activations': funnel.stageCounts?.activation,
603
+ 'Recorded first API-key uses': funnel.stageCounts?.activation,
596
604
  'Paid customers': funnel.uniquePaidCustomers,
597
605
  'Excluded synthetic checkout sessions': funnel.excludedSyntheticCheckoutSessions,
598
606
  },
@@ -757,8 +765,184 @@
757
765
  'Data disk': r.disk.usedGb + ' GB of ' + r.disk.capacityGb + ' GB used (' + r.disk.percent + '%)',
758
766
  });
759
767
  }
768
+ // "+3 vs prior 7 days (12 → 15)": the change a reader would otherwise have to remember from last week.
769
+ function deltaWords(now, before) {
770
+ if (!Number.isFinite(now) || !Number.isFinite(before)) return { text: 'No earlier week to compare', tone: 'flat' };
771
+ const diff = now - before;
772
+ const pct = before > 0 ? ' (' + (diff >= 0 ? '+' : '') + Math.round((diff / before) * 100) + '%)' : '';
773
+ if (diff === 0) return { text: 'Same as the 7 days before', tone: 'flat' };
774
+ return { text: (diff > 0 ? '+' : '') + diff + pct + ' vs the 7 days before (' + before + ')', tone: diff > 0 ? 'up' : 'down' };
775
+ }
776
+ function weekCards(parent, weeks, extra = {}) {
777
+ const grid = element('div', undefined, 'cards');
778
+ const add = (name, value, delta) => {
779
+ const card = element('div', undefined, 'card');
780
+ card.append(element('div', value, 'value'), element('div', name, 'label'));
781
+ if (delta) card.append(element('div', delta.text, 'delta ' + delta.tone));
782
+ grid.append(card);
783
+ };
784
+ for (const [name, value] of Object.entries(extra)) add(name, value);
785
+ if (weeks) {
786
+ const rows = [
787
+ ['People on the site', 'realVisitors'],
788
+ ['Checkout starts', 'checkoutStarts'],
789
+ ['Active CLI installs', 'activeInstalls'],
790
+ ];
791
+ for (const [name, key] of rows) add(name + ', past 7 days', String(weeks.last7?.[key] ?? 'Unknown'), deltaWords(weeks.last7?.[key], weeks.prior7?.[key]));
792
+ }
793
+ parent.append(grid);
794
+ }
795
+ function mrrWords(mrr) {
796
+ if (!mrr) return null;
797
+ const entries = Object.entries(mrr);
798
+ return entries.length ? entries.map(([c, a]) => money(a, c)).join(', ') : money(0, 'usd');
799
+ }
800
+ // "Needs you": the alert rules from /v1/admin/alerts, worst first, each with what to do and a link to its tab.
801
+ function alertsBlock(parent) {
802
+ const mine = activeLoad;
803
+ const box = element('div', undefined, 'block');
804
+ box.append(element('h3', 'Needs you'));
805
+ const waiting = element('p', 'Checking alerts…', 'muted');
806
+ box.append(waiting);
807
+ parent.append(box);
808
+ fetch('/v1/admin/alerts', { credentials: 'same-origin', cache: 'no-store' })
809
+ .then((r) => (r.ok ? r.json() : null))
810
+ .catch(() => null)
811
+ .then((result) => {
812
+ if (mine !== activeLoad) return;
813
+ waiting.remove();
814
+ const alerts = result?.data?.alerts;
815
+ if (!Array.isArray(alerts)) {
816
+ box.append(element('p', 'Alerts could not be checked right now.', 'notice'));
817
+ return;
818
+ }
819
+ if (!alerts.length) {
820
+ box.append(element('p', 'Nothing needs you right now. Every alert rule passed.', 'banner green'));
821
+ }
822
+ for (const alert of alerts) {
823
+ const row = element('div', undefined, 'banner ' + (alert.level === 'red' ? 'red' : 'amber'));
824
+ row.append(element('div', alert.text), element('small', alert.action + ' '));
825
+ if (alert.tab && titles[alert.tab] && sections.includes(alert.tab)) {
826
+ const go = element('button', 'Open ' + titles[alert.tab]);
827
+ go.type = 'button';
828
+ go.addEventListener('click', () => {
829
+ current = alert.tab;
830
+ controls();
831
+ load();
832
+ });
833
+ row.append(go);
834
+ }
835
+ box.append(row);
836
+ }
837
+ box.append(
838
+ element(
839
+ 'p',
840
+ result.data.delivery === 'off'
841
+ ? 'Alerts show here only. On Railway, THUMBGATE_OWNER_ALERT_EMAIL=on emails new ones to you; THUMBGATE_OWNER_ALERT_WEBHOOK posts them to Slack or Discord.'
842
+ : 'New alerts are also sent (' + label(result.data.delivery).replace(/ on new alert$/, '') + '), checked every 15 minutes.',
843
+ 'muted',
844
+ ),
845
+ );
846
+ });
847
+ }
848
+ // Retention by weekly install cohort: of the installs first seen in a week, the share seen again 1, 2, 3… weeks later.
849
+ function cohortTable(parent, read) {
850
+ parent.append(element('h3', 'Install retention by week first seen'));
851
+ if (!read || !Array.isArray(read.cohorts)) {
852
+ parent.append(element('p', 'Cohorts are unavailable right now. No zero is inferred.', 'notice'));
853
+ return;
854
+ }
855
+ const later = Math.max(0, ...read.cohorts.map((c) => c.retained.length - 1));
856
+ const columns = [
857
+ ['Week first seen', (c) => c.weekStart + (c.includesOlder ? ' or earlier' : '')],
858
+ ['Installs', (c) => c.size],
859
+ ];
860
+ for (let k = 1; k <= later; k += 1)
861
+ columns.push([
862
+ 'Week ' + k,
863
+ (c) => (k >= c.retained.length ? '' : c.size ? Math.round((c.retained[k] / c.size) * 100) + '% (' + c.retained[k] + ')' : '–'),
864
+ ]);
865
+ table(parent, columns, read.cohorts);
866
+ parent.append(
867
+ element(
868
+ 'p',
869
+ 'Week 1 is the 7 days after the first week an install was seen. The oldest row also holds installs that began before this 8-week read.' +
870
+ (read.partial ? ' The telemetry log was cut short, so older weeks are lower bounds.' : ''),
871
+ 'muted',
872
+ ),
873
+ );
874
+ }
875
+ function channelTable(parent, channels, why) {
876
+ parent.append(element('h3', 'Where buyers come from'));
877
+ if (!Array.isArray(channels)) {
878
+ parent.append(element('p', why || 'Source not available right now', 'notice'));
879
+ return;
880
+ }
881
+ table(
882
+ parent,
883
+ [
884
+ ['Channel', (r) => r.channel],
885
+ ['Checkout starts, 30 days', (r) => (r.checkoutStarts30d === null ? 'Not read' : r.checkoutStarts30d)],
886
+ ['Paying customers, 1 year', (r) => (r.paidCustomers === null ? 'Not read' : r.paidCustomers)],
887
+ ['Revenue, 30 days', (r) => (r.revenue30d === null ? 'Not read' : mrrWords(r.revenue30d))],
888
+ ],
889
+ channels,
890
+ );
891
+ parent.append(element('p', 'The channel is the utm source a checkout carried, or direct. Bots and your own checkouts are left out of starts; a customer counts once, for their first paid checkout.', 'muted'));
892
+ }
893
+ function usageBlock(parent, usage) {
894
+ parent.append(element('h3', 'Product usage · CLI installs, past 30 days'));
895
+ if (!usage) {
896
+ parent.append(element('p', 'CLI usage is unavailable right now. No zero is inferred.', 'notice'));
897
+ return;
898
+ }
899
+ const share = (n) => (usage.activeInstalls30d > 0 && Number.isFinite(n) ? ' (' + Math.round((n / usage.activeInstalls30d) * 100) + '%)' : '');
900
+ cards(
901
+ parent,
902
+ {
903
+ 'Active installs, past 7 days': usage.activeInstalls7d,
904
+ 'Active installs, past 30 days': usage.activeInstalls30d,
905
+ 'Ran init in this window': usage.initsInWindow,
906
+ 'Captured feedback (activated)': String(usage.activatedInstalls) + share(usage.activatedInstalls),
907
+ 'Came back on a second day': String(usage.returningInstalls) + share(usage.returningInstalls),
908
+ },
909
+ true,
910
+ );
911
+ parent.append(
912
+ element(
913
+ 'p',
914
+ 'An install is the anonymous id the CLI keeps in ~/.thumbgate. Your own machines, CI and flagged pings are left out (' +
915
+ usage.excludedInstalls +
916
+ ' excluded). Installs with telemetry turned off are not seen, so these are lower bounds. Gate blocks run locally and are not reported.',
917
+ 'muted',
918
+ ),
919
+ );
920
+ detail(parent, 'CLI commands run', usage.eventsByType);
921
+ detail(parent, 'Installs by version', usage.byVersion);
922
+ detail(parent, 'Installs by platform', usage.byPlatform);
923
+ }
760
924
  function render(parent, section, data) {
761
925
  if (section === 'money') {
926
+ alertsBlock(parent);
927
+ parent.append(element('h3', 'This week at a glance'));
928
+ const recurring = data.recurring30d;
929
+ const recurringWhy = data.reasons?.recurring || 'Source not available right now';
930
+ weekCards(parent, data.weekOverWeek, {
931
+ 'Monthly recurring revenue (list price)': data.mrr ? mrrWords(data.mrr) : (data.reasons?.mrr || 'Source not available right now'),
932
+ [recurring ? 'Renewal revenue, past 30 days (' + recurring.renewalInvoices + (recurring.renewalInvoices === 1 ? ' renewal)' : ' renewals)') : 'Renewal revenue, past 30 days']: recurring ? mrrWords(recurring.renewalRevenue) : recurringWhy,
933
+ [recurring ? 'Churn, past 30 days (' + recurring.churnedSubscriptions + ' cancelled)' : 'Churn, past 30 days']: recurring ? (Number.isFinite(recurring.churnRate) ? Math.round(recurring.churnRate * 1000) / 10 + '%' : 'N/A, no subscriptions') : recurringWhy,
934
+ 'Subscriptions cancelling at period end': data.cancellingAtPeriodEnd === null || data.cancellingAtPeriodEnd === undefined ? (data.reasons?.mrr || 'Source not available right now') : String(data.cancellingAtPeriodEnd),
935
+ });
936
+ usageBlock(parent, data.usage30d);
937
+ channelTable(parent, data.channels, data.reasons?.revenue || data.reasons?.checkouts);
938
+ parent.append(element('h3', 'Biggest evidenced obstacle'));
939
+ parent.append(element('p', describeObstacle({ 'money.paying_customers': { value: data.payingCustomers }, 'money.checkout_bot_check': { value: data.checkoutBotCheck } }, null)));
940
+ // Everything below is the evidence behind the headline numbers, folded away until asked for.
941
+ const outer = parent;
942
+ parent = element('details');
943
+ parent.append(element('summary', 'Money detail: customers, checkouts, revenue, traffic and leads'));
944
+ outer.append(parent);
945
+ parent.append(element('h3', 'Customers and traffic'));
762
946
  const checkouts = data.checkouts7d;
763
947
  const traffic = data.traffic30d;
764
948
  const why = data.reasons || {};
@@ -842,7 +1026,7 @@
842
1026
  '. Active Pro: ' +
843
1027
  basis(data.activeProBasis) +
844
1028
  '. Revenue is the total of completed Checkout Sessions created in the last 30 days, after refunds. ' +
845
- 'Subscription renewal invoices are not read, so recurring revenue is not included: subscription invoices are not collected yet.',
1029
+ 'Renewals are counted apart, as renewal revenue, from paid subscription renewal invoices.',
846
1030
  'muted',
847
1031
  ),
848
1032
  );
@@ -1024,7 +1208,7 @@
1024
1208
  'Checkout starts (30 days)': shown(traffic?.checkoutStarts, 'Telemetry store empty'),
1025
1209
  'Paid confirmations (30 days)': shown(traffic?.checkoutPaidConfirmations, 'Telemetry store empty'),
1026
1210
  'Email signups': shown(data.signups?.emailSignups, waiting),
1027
- 'External paid orders': shown(external.paidOrders, waiting),
1211
+ 'External paid orders': shown(external.paidOrders, waiting) + (external.paidOrders !== undefined && (data.reconciliation?.status !== 'ok' || data.reconciliation?.complete !== true) ? ' (partial)' : ''),
1028
1212
  },
1029
1213
  true,
1030
1214
  );
@@ -1070,6 +1254,7 @@
1070
1254
  [
1071
1255
  ['Day', (r) => r.date],
1072
1256
  ['Visitors', (r) => r.visitors],
1257
+ ['Active CLI installs', (r) => r.activeInstalls ?? 0],
1073
1258
  ['Page views', (r) => r.pageViews],
1074
1259
  ['Call to action clicks', (r) => r.ctaClicks],
1075
1260
  ['Checkout starts', (r) => r.checkoutStarts],
@@ -1078,6 +1263,14 @@
1078
1263
  [...data.daily].reverse(),
1079
1264
  );
1080
1265
  }
1266
+ if (data.weekOverWeek) {
1267
+ parent.append(element('h3', 'Past 7 days against the 7 days before'));
1268
+ weekCards(parent, data.weekOverWeek);
1269
+ }
1270
+ usageBlock(parent, data.usage);
1271
+ cohortTable(parent, data.cohorts);
1272
+ if (data.reconciliation?.status !== 'ok' || data.reconciliation?.complete !== true)
1273
+ parent.append(element('p', 'Provider reconciliation is incomplete (' + (data.reconciliation?.status || 'not reported') + '). Paid-order and revenue totals are partial ledger evidence, not verified payment outcomes. Local installations and successful first local use are not measured.', 'notice'));
1081
1274
  parent.append(
1082
1275
  element('h3', 'External booked revenue · past 30 days'),
1083
1276
  );
@@ -1098,6 +1291,13 @@
1098
1291
  'muted',
1099
1292
  ),
1100
1293
  );
1294
+ if (data.checkoutSessionDepth) {
1295
+ parent.append(element('h3', 'Checkout-session evidence coverage'));
1296
+ detail(parent, 'Existing checkout event IDs matched to Stripe session depth', data.checkoutSessionDepth, {
1297
+ sessionsCreated: 'Recorded checkout-created events', raw: 'No email or payment-attempt evidence', identified: 'Email present, not proof of a buyer', paymentAttempt: 'Payment intent present, not proof of payment', paid: 'Stripe payment status paid', unresolved: 'Session evidence not resolved', qualifiedCheckoutStarts: 'Identified or later, not unique people', basis: 'Count basis', lookupStatus: 'Provider lookup coverage',
1298
+ });
1299
+ parent.append(element('p', 'This joins existing checkout-event evidence IDs to Stripe sessions. It does not join site visitor IDs to people, prove a payment attempt was declined, or explain abandonment. Unresolved events stay unknown.', 'muted'));
1300
+ }
1101
1301
  funnelTable(parent, data.funnel);
1102
1302
  for (const key of [
1103
1303
  'funnel',
@@ -46,7 +46,7 @@
46
46
  "name": "How does ThumbGate help the Agent Manager?",
47
47
  "acceptedAnswer": {
48
48
  "@type": "Answer",
49
- "text": "ThumbGate is the pre-action enforcement layer under the role. It runs PreToolUse hooks, distills repeated thumbs-down feedback into CLAUDE.md rules, and shows the rule plus evidence on each block. Pro keeps personal recall, exports, personal dashboard proof, and adapters maintained. Enterprise service work is qualified after intake; an org-wide hosted rule library and hosted dashboard are not generally available."
49
+ "text": "ThumbGate is the pre-action enforcement layer under the role. It runs PreToolUse hooks, distills repeated thumbs-down feedback into CLAUDE.md rules, and shows the rule plus evidence on each block. Pro keeps every learned rule active and adds recall, lesson search, and exports. Enterprise service work is qualified after intake; an org-wide hosted rule library and hosted dashboard are not generally available."
50
50
  }
51
51
  },
52
52
  {
@@ -54,7 +54,7 @@
54
54
  "name": "Is ThumbGate free for the Agent Manager to start?",
55
55
  "acceptedAnswer": {
56
56
  "@type": "Answer",
57
- "text": "Yes. npx thumbgate init in one repo is free and MIT licensed, and gates work locally without a hosted account. Pro adds personal recall, personal dashboard proof, DPO/HuggingFace export, and managed adapters. Enterprise service work can add scoped rollout support after intake; a hosted org dashboard and org-wide hosted rule library are not generally available."
57
+ "text": "Yes. npx thumbgate init in one repo is free and MIT licensed, and gates work locally without a hosted account. Pro keeps every learned rule active and adds recall, lesson search, and DPO/HuggingFace export. Enterprise service work can add scoped rollout support after intake; a hosted org dashboard and org-wide hosted rule library are not generally available."
58
58
  }
59
59
  },
60
60
  {
@@ -131,7 +131,7 @@ npx thumbgate cost # see what the gates were worth</code></pre>
131
131
  <div class="quote">"The category isn't 'FinOps for AI' — it's 'gates that stop the spend so FinOps has less to report on.' One sits behind the other."</div>
132
132
 
133
133
  <div class="card">
134
- <p><strong>The free CLI is real. Pro adds the personal local dashboard, recall, exports, and managed adapters. Enterprise service work is qualified and signed after intake around local workflow controls; a hosted org dashboard and org-wide hosted rule library are not generally available.</strong></p>
134
+ <p><strong>The free CLI is real. Pro keeps every learned rule active and adds recall, lesson search, and exports. Enterprise service work is qualified and signed after intake around local workflow controls; a hosted org dashboard and org-wide hosted rule library are not generally available.</strong></p>
135
135
  <p>
136
136
  <a href="/diagnostic?utm_source=website&amp;utm_medium=agents_cost_savings_page&amp;utm_campaign=managed_workflow_gate&amp;cta_id=agents_cost_savings_managed_gate&amp;cta_placement=agents_cost_savings_page" class="cta">Get the managed workflow gate</a>
137
137
  <a href="/checkout/pro?utm_source=website&amp;utm_medium=agents_cost_savings_page&amp;utm_campaign=pro_upgrade&amp;cta_id=agents_cost_savings_pro_checkout&amp;cta_placement=agents_cost_savings_page&amp;plan_id=pro" class="secondary">Or install the free CLI →</a>
@@ -89,7 +89,7 @@
89
89
  <h2>Why this matters now</h2>
90
90
  <p>The Dell distribution channel changes who buys Codex. The individual-developer install is opt-in; the enterprise procurement install is policy-driven. The teams approving the Codex line item will ask three questions ThumbGate is built to answer:</p>
91
91
  <ol>
92
- <li><strong>What did the agent do?</strong> — capture, with evidence, on every tool call.</li>
92
+ <li><strong>What did the agent do?</strong> — capture, with evidence, on the tool calls the hook sees.</li>
93
93
  <li><strong>What did we stop it from doing?</strong> — PreToolUse gates with the rule that fired and why.</li>
94
94
  <li><strong>How do you keep this current as Codex updates?</strong> — adapter matrix that's CI-checked against upstream.</li>
95
95
  </ol>
@@ -101,7 +101,7 @@
101
101
  <p>This wires the Codex hook, sets up the local lesson DB, and gives you the capture/promote/block loop without a hosted account. If you want the standalone Codex plugin as a self-contained zip — for offline distribution to Dell-managed machines or for security review — grab it from <a href="https://github.com/IgorGanapolsky/ThumbGate/releases" target="_blank" rel="noopener" style="color:var(--cyan)">GitHub releases</a> (look for <code>codex-plugin-*.zip</code>).</p>
102
102
 
103
103
  <div class="card">
104
- <p><strong>The free CLI is real. Pro adds the personal local dashboard, recall, exports, and managed adapters. Enterprise service work is qualified and signed after intake around local workflow controls; a hosted org dashboard and org-wide hosted rule library are not generally available.</strong></p>
104
+ <p><strong>The free CLI is real. Pro keeps every learned rule active and adds recall, lesson search, and exports. Enterprise service work is qualified and signed after intake around local workflow controls; a hosted org dashboard and org-wide hosted rule library are not generally available.</strong></p>
105
105
  <p>
106
106
  <a href="/diagnostic?utm_source=website&amp;utm_medium=codex_enterprise_page&amp;utm_campaign=managed_workflow_gate&amp;cta_id=codex_enterprise_managed_gate&amp;cta_placement=codex_enterprise_page" class="cta">Get the managed workflow gate</a>
107
107
  <a href="/checkout/pro?utm_source=website&amp;utm_medium=codex_enterprise_page&amp;utm_campaign=pro_upgrade&amp;cta_id=codex_enterprise_pro_checkout&amp;cta_placement=codex_enterprise_page&amp;plan_id=pro" class="secondary">Or install the free CLI →</a>
@@ -46,7 +46,7 @@
46
46
  "name": "What is a pre-action check for AI coding agents?",
47
47
  "acceptedAnswer": {
48
48
  "@type": "Answer",
49
- "text": "A pre-action check is an enforcement layer that intercepts AI agent tool calls before they execute. Unlike prompt rules that agents can ignore, pre-action checks flag and log risky actions, and hard-block the most dangerous classes by default (secret exfiltration, supply-chain installs, and rm -rf-class deletes). Actions such as force-pushing to main, off-scope edits, or skipping tests warn by default and hard-block under strict enforcement mode (THUMBGATE_STRICT_ENFORCEMENT=1). ThumbGate implements pre-action checks via PreToolUse hooks that fire before every tool call."
49
+ "text": "A pre-action check is an enforcement layer that intercepts AI agent tool calls before they execute. Unlike prompt rules that agents can ignore, pre-action checks flag and log risky actions, and hard-block the most dangerous classes by default (secret exfiltration, supply-chain installs, and rm -rf-class deletes). Actions such as force-pushing to main, off-scope edits, or skipping tests warn by default and hard-block under strict enforcement mode (THUMBGATE_STRICT_ENFORCEMENT=1). ThumbGate implements pre-action checks via PreToolUse hooks that run before tool calls in supported integrations."
50
50
  }
51
51
  },
52
52
  {
@@ -210,7 +210,7 @@
210
210
  </tr>
211
211
  <tr>
212
212
  <td>Real-time pre-action checks</td>
213
- <td class="yes">Yes -- fires before every tool call</td>
213
+ <td class="yes">Yes -- runs before tool calls (Claude Code)</td>
214
214
  <td class="no">No -- asynchronous review</td>
215
215
  <td class="no">No -- reactive only</td>
216
216
  <td class="no">No -- prompt-time only</td>
@@ -337,7 +337,7 @@
337
337
  <div class="step-card">
338
338
  <div class="step-number">2</div>
339
339
  <h3>Check</h3>
340
- <p>Every tool call your agent makes passes through a pre-action check. Known-bad patterns are blocked before execution. Good actions pass through instantly.</p>
340
+ <p>In Claude Code, tool calls pass through a pre-action check. Known-bad patterns are blocked before execution. Good actions pass through instantly.</p>
341
341
  </div>
342
342
  <div class="step-card">
343
343
  <div class="step-number">3</div>
@@ -151,6 +151,8 @@ mark{background:#fbbf24;color:#000;font-weight:700;border-radius:2px;padding:0 3
151
151
  .export-section{margin-bottom:48px}
152
152
  .export-btn{background:var(--bg-raised);border:1px solid var(--border);border-radius:8px;padding:12px 20px;color:var(--text);font-size:14px;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:border-color .15s}
153
153
  .export-btn:hover{border-color:var(--cyan);color:var(--cyan)}
154
+ .section-sub{margin:4px 0 0;color:var(--text-muted,#a1a1aa);font-size:14px}
155
+ .tab-content{scroll-margin-top:72px}
154
156
  .tabs{display:flex;gap:0;border-bottom:1px solid var(--border);margin-bottom:24px}
155
157
  .tab{padding:12px 20px;font-size:14px;font-weight:500;color:var(--text-muted);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
156
158
  .tab:hover{color:var(--text)}.tab.active{color:var(--cyan);border-bottom-color:var(--cyan)}
@@ -193,7 +195,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
193
195
  .ob-btn.safe { border-color:rgba(74,222,128,0.35); background:rgba(74,222,128,0.04); }
194
196
  .ob-btn code { font-family:var(--mono); font-size:11px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
195
197
  </style>
196
- <script src="/project-switcher.js"></script>
198
+ <script src="/project-switcher.js?v=20261124"></script>
197
199
  </head>
198
200
  <body data-revenue-assist="off">
199
201
 
@@ -291,7 +293,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
291
293
  <span id="chipWarnedToday" class="g-chip w"><strong data-chip-count="warned-today">0</strong> WARNED TODAY</span>
292
294
  <span id="chipActiveGates" class="g-chip a"><strong data-chip-count="active-gates">0</strong> ACTIVE GATES</span>
293
295
  </div>
294
-
296
+ <p id="feedbackScopeNote" style="margin:0 0 8px;font-size:13px;color:var(--text-muted,#a1a1aa)"></p>
295
297
  <div class="stats-grid" id="statsGrid">
296
298
  <a class="stat-card" data-card-action="all" onclick="selectCard(this,'all')" href="/lessons?signal=all" style="cursor:pointer;text-decoration:none;color:inherit;display:block;" title="Click to view all feedback → Lessons page"><div class="stat-label">Total Feedback <span class="tooltip-trigger" onclick="event.stopPropagation(); event.preventDefault();">?<span class="tooltip-content">Total thumbs-up and thumbs-down signals captured from your AI agent interactions.</span></span></div><div class="stat-value cyan" id="statTotal">—</div></a>
297
299
  <a class="stat-card" data-card-action="up" onclick="selectCard(this,'up')" href="/lessons?signal=up" style="cursor:pointer;text-decoration:none;color:inherit;display:block;" title="Click to view positive feedback → Lessons page"><div class="stat-label">👍 Positive <span class="tooltip-trigger" onclick="event.stopPropagation(); event.preventDefault();">?<span class="tooltip-content">Successful outcomes where the agent's work met expectations (thumbs-up).</span></span></div><div class="stat-value green" id="statPositive">—</div></a>
@@ -396,7 +398,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
396
398
 
397
399
  <div class="tab-content" id="tab-gates">
398
400
  <div class="gates-section">
399
- <h2>Active Pre-Action Checks</h2>
401
+ <h2>Active Gates</h2><p class="section-sub">Pre-action checks that block or warn before an agent acts</p>
400
402
  <div id="gatesTabStatusChips" class="g-chips" style="margin-top:10px">
401
403
  <span class="g-chip b"><strong data-chip-count="blocked-today">0</strong> BLOCKED TODAY</span>
402
404
  <span class="g-chip w"><strong data-chip-count="warned-today">0</strong> WARNED TODAY</span>
@@ -434,7 +436,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
434
436
 
435
437
  <div class="tab-content" id="tab-team">
436
438
  <div class="team-section">
437
- <h2>Shared Team Reliability</h2>
439
+ <h2>Team</h2><p class="section-sub">Shared team reliability</p>
438
440
  <p class="template-summary">See which agents drift, which gates save the team the most time, and whether the shared workflow is getting safer.</p>
439
441
  <div class="team-grid" id="teamSummaryCards"><div class="loading">Loading team metrics...</div></div>
440
442
  <div class="team-grid" id="predictiveSummaryCards"><div class="loading">Loading predictive insights...</div></div>
@@ -530,7 +532,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
530
532
 
531
533
  <div class="tab-content" id="tab-ai-inventory">
532
534
  <div class="templates-section">
533
- <h2>AI Component Inventory</h2>
535
+ <h2>AI Inventory</h2><p class="section-sub">AI components found in your projects</p>
534
536
  <p class="template-summary">This API scans the dashboard server’s working directory. On the hosted dashboard it describes the server checkout, not projects on your machine. Run the CLI export below from your project for its inventory.</p>
535
537
  <p class="template-summary">Enterprise evidence for AI/ML usage: provider SDKs, agent frameworks, vector databases, Vertex/Gemini/Dialogflow CX references, and local model artifacts. Export this as ML-BOM proof before claiming an AI system is production-ready.</p>
536
538
  <div class="inventory-grid" id="aiInventorySummaryCards"><div class="loading">Scanning AI inventory...</div></div>
@@ -554,7 +556,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
554
556
 
555
557
  <div class="tab-content" id="tab-generated">
556
558
  <div class="templates-section">
557
- <h2>Generated Hosted Views</h2>
559
+ <h2>Generated Views</h2><p class="section-sub">Generated hosted views</p>
558
560
  <p class="template-summary" id="generatedViewSummary">A constrained JSON spec builds opinionated review dashboards from approved cards, lists, and callouts.</p>
559
561
  <div class="generated-toolbar" id="generatedViewToolbar"><div class="loading">Loading generated views...</div></div>
560
562
  <div class="generated-canvas" id="generatedViewCanvas"><div class="loading">Loading generated view...</div></div>
@@ -588,7 +590,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
588
590
 
589
591
  <div class="tab-content" id="tab-templates">
590
592
  <div class="templates-section">
591
- <h2>Curated Gate Templates</h2>
593
+ <h2>Gate Templates</h2><p class="section-sub">Curated gate templates you can adopt</p>
592
594
  <div class="template-summary" id="templateSummary">Loading template library...</div>
593
595
  <div class="template-grid" id="templateLibrary"><div class="loading">Loading templates...</div></div>
594
596
  </div>
@@ -597,7 +599,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
597
599
 
598
600
  <div class="tab-content" id="tab-insights">
599
601
  <div class="templates-section">
600
- <h2>📊 Feedback Insights &amp; Lesson Pipeline</h2>
602
+ <h2>Insights</h2><p class="section-sub">Feedback insights and the lesson pipeline</p>
601
603
  <p class="template-summary">How your thumbs-up/down signals turn into lessons that prevent repeat mistakes.</p>
602
604
 
603
605
 
@@ -680,7 +682,7 @@ h2{font-size:20px;font-weight:700;margin-bottom:16px;letter-spacing:-.02em}
680
682
 
681
683
  <div class="tab-content" id="tab-export">
682
684
  <div class="export-section">
683
- <h2>Export Training Data (DPO)</h2>
685
+ <h2>Export</h2><p class="section-sub">Export training data (DPO)</p>
684
686
  <div style="background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:24px;margin-bottom:24px;max-width:640px;">
685
687
  <h3 style="font-size:15px;margin-bottom:8px;">What is DPO?</h3>
686
688
  <p style="color:var(--text-muted);font-size:14px;line-height:1.65;margin-bottom:12px;"><strong style="color:var(--text);">Direct Preference Optimization</strong> is a technique for fine-tuning LLMs using human preference data. Your 👍/👎 feedback is converted into training pairs:</p>
@@ -1175,6 +1177,7 @@ async function connect(options) {
1175
1177
  }
1176
1178
  renderStats(data);
1177
1179
  setSelectedCard('all');
1180
+ window.ThumbGateProjects.refresh(getHeaders());
1178
1181
  var deepLinkedTab = getDeepLinkTab();
1179
1182
  if (deepLinkedTab && deepLinkedTab !== 'search') {
1180
1183
  switchTab(deepLinkedTab);
@@ -1266,7 +1269,23 @@ function markDashboardRefreshed() {
1266
1269
  refreshed.textContent = now.toLocaleString();
1267
1270
  }
1268
1271
 
1272
+ // Say where the headline numbers come from so they cannot silently disagree with a statusline or a per-project card.
1273
+ function renderFeedbackScope(data) {
1274
+ var note = document.getElementById('feedbackScopeNote');
1275
+ if (!note || isDemo) return;
1276
+ var agg = data.aggregate || {};
1277
+ var stores = Array.isArray(agg.stores) ? agg.stores.length : null;
1278
+ var parts = [];
1279
+ if (agg.enabled && stores != null) parts.push('Counts human-reviewed feedback merged from ' + stores + ' data folder' + (stores === 1 ? '' : 's') + ' on this machine');
1280
+ else if (window.ThumbGateProjects && window.ThumbGateProjects.selected) parts.push('Counts for the selected project only');
1281
+ else parts.push('Counts human-reviewed feedback from this data folder');
1282
+ var excluded = Number(data.excludedTotal || 0);
1283
+ if (excluded > 0) parts.push(excluded + ' automated or unreviewed event' + (excluded === 1 ? '' : 's') + ' not counted');
1284
+ note.textContent = parts.join('; ') + '. Pick a project above for its own numbers.';
1285
+ }
1286
+
1269
1287
  function renderStats(data) {
1288
+ renderFeedbackScope(data);
1270
1289
  const total = (data.totalFeedback || data.total || 0);
1271
1290
  const pos = (data.totalPositive || data.positive || data.thumbsUp || 0);
1272
1291
  const neg = (data.totalNegative || data.negative || data.thumbsDown || 0);
@@ -521,7 +521,7 @@ footer { padding: 32px 0 44px; color: var(--muted); }
521
521
  <p><strong>Two paths from here.</strong></p>
522
522
  <p><strong>Path one:</strong> close this tab and keep paying for the same repeat — you find it after it lands, you undo it by hand, and the rule stays written in a file the agent can skip.<br>
523
523
  <strong>Path two:</strong> send the one workflow that keeps failing and get it back as a configured gate with a regression test and written rollout and rollback proof, two business days after access.</p>
524
- <p class="hint" style="margin-top:10px;">Refunded if the failure cannot be reduced to one supported ThumbGate gate. Runs locally on your machine. Want the free path first? <code>npx thumbgate init</code> — no account, nothing sent to us. See the <a href="https://github.com/IgorGanapolsky/ThumbGate/blob/main/docs/VERIFICATION_EVIDENCE.md" target="_blank" rel="noopener">verification evidence</a>.</p>
524
+ <p class="hint" style="margin-top:10px;">Refunded if the failure cannot be reduced to one supported ThumbGate gate. Runs locally on your machine. Want the free path first? <code>npx thumbgate init</code> runs locally. Anonymous usage pings are on by default; <code>THUMBGATE_NO_TELEMETRY=1</code> turns them off. See the <a href="https://github.com/IgorGanapolsky/ThumbGate/blob/main/docs/VERIFICATION_EVIDENCE.md" target="_blank" rel="noopener">verification evidence</a>.</p>
525
525
  </div>
526
526
  <div class="actions">
527
527
  <a class="button primary" href="#top" data-revenue-cta data-cta-id="diagnostic_bottom_buy" data-cta-placement="bottom_band">Harden my workflow — $__SPRINT_DIAGNOSTIC_PRICE_DOLLARS__</a>
@@ -401,7 +401,7 @@ footer {
401
401
  </article>
402
402
  <article class="pain">
403
403
  <h3>Not sure yet?</h3>
404
- <p>Run the free local evaluate first. <code>npx thumbgate init</code> takes minutes, runs on your machine, and needs no card, no account, and no access to your repo. If it shows you the failure at the tool call, the managed diagnostic is just us doing the rest for you.</p>
404
+ <p>Run the free local evaluate first. <code>npx thumbgate init</code> takes minutes, runs on your machine, and needs no card and no access to your repo. If it shows you the failure at the tool call, the managed diagnostic is just us doing the rest for you.</p>
405
405
  <p style="margin-top:10px;"><a href="#buy" data-revenue-cta data-cta-id="founders_fit_buy" data-cta-placement="fit_section"><strong>Or skip ahead and gate my worst failure · $__SPRINT_DIAGNOSTIC_PRICE_DOLLARS__</strong></a></p>
406
406
  </article>
407
407
  </div>