thumbgate 1.28.4 → 1.29.1

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 (65) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.well-known/llms.txt +18 -10
  3. package/.well-known/mcp/server-card.json +1 -1
  4. package/README.md +5 -2
  5. package/adapters/claude/.mcp.json +2 -2
  6. package/adapters/forge/forge.yaml +3 -3
  7. package/adapters/mcp/server-stdio.js +1 -1
  8. package/adapters/opencode/opencode.json +1 -1
  9. package/bin/cli.js +8 -8
  10. package/bin/postinstall.js +4 -13
  11. package/config/github-about.json +5 -4
  12. package/config/post-deploy-marketing-pages.json +6 -6
  13. package/docs/integrations/grafana/README.md +109 -0
  14. package/docs/integrations/grafana/thumbgate-revenue-evidence-dashboard.json +1930 -0
  15. package/openapi/openapi.yaml +240 -5
  16. package/package.json +59 -19
  17. package/public/agent-manager.html +10 -11
  18. package/public/agents-cost-savings.html +2 -2
  19. package/public/assets/brand/thumbgate-logo-transparent.svg +6 -11
  20. package/public/assets/brand/thumbgate-mark-inline-v3.svg +11 -10
  21. package/public/assets/brand/thumbgate-mark.svg +10 -11
  22. package/public/blog/inside-your-boundary.html +114 -0
  23. package/public/blog/process-over-outcome-gates.html +119 -0
  24. package/public/blog.html +296 -402
  25. package/public/brand/thumbgate-mark.svg +5 -9
  26. package/public/codex-enterprise.html +2 -2
  27. package/public/compare.html +12 -3
  28. package/public/diagnostic.html +79 -29
  29. package/public/guide.html +4 -4
  30. package/public/index.html +1088 -2098
  31. package/public/install.html +3 -3
  32. package/public/js/buyer-intent.js +33 -18
  33. package/public/numbers.html +2 -2
  34. package/public/pricing.html +268 -408
  35. package/public/pro.html +4 -4
  36. package/scripts/billing.js +456 -126
  37. package/scripts/buyer-paths.js +102 -0
  38. package/scripts/cli-feedback.js +2 -2
  39. package/scripts/commercial-offer.js +18 -10
  40. package/scripts/external-customer-audit.js +881 -0
  41. package/scripts/feedback-loop.js +26 -0
  42. package/scripts/gates-engine.js +123 -1
  43. package/scripts/grafana-revenue-evidence.js +856 -0
  44. package/scripts/jsonl-window.js +89 -0
  45. package/scripts/lesson-embedding-index.js +3 -7
  46. package/scripts/meta-agent-loop.js +20 -2
  47. package/scripts/observability-env.js +139 -0
  48. package/scripts/observability-setup.js +55 -0
  49. package/scripts/plausible-domain-config.js +4 -0
  50. package/scripts/provider-live-evidence.js +1290 -0
  51. package/scripts/provider-payment-reconciler.js +442 -0
  52. package/scripts/provider-revenue-evidence.js +249 -0
  53. package/scripts/rate-limiter.js +1 -5
  54. package/scripts/revenue-action-eligibility.js +414 -0
  55. package/scripts/revenue-evidence-remediation.js +694 -0
  56. package/scripts/revenue-offer-system.js +709 -0
  57. package/scripts/sales-pipeline.js +1117 -0
  58. package/scripts/seo-gsd.js +8 -4
  59. package/scripts/stripe-credentials.js +37 -0
  60. package/scripts/stripe-revenue-catalog-audit.js +363 -0
  61. package/scripts/stripe-revenue-catalog.js +164 -0
  62. package/scripts/telemetry-analytics.js +23 -3
  63. package/scripts/vector-store.js +83 -7
  64. package/scripts/workflow-intake-queue.js +483 -0
  65. package/src/api/server.js +521 -114
@@ -0,0 +1,102 @@
1
+ 'use strict';
2
+
3
+ const DEFAULT_APP_ORIGIN = 'https://thumbgate.ai';
4
+
5
+ function normalizeAppOrigin(value = DEFAULT_APP_ORIGIN) {
6
+ const parsed = new URL(String(value || DEFAULT_APP_ORIGIN));
7
+ if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {
8
+ throw new Error('Buyer-path app origin must use http or https.');
9
+ }
10
+ parsed.pathname = '/';
11
+ parsed.search = '';
12
+ parsed.hash = '';
13
+ return parsed.origin;
14
+ }
15
+
16
+ function buildBuyerUrl(pathname, params = {}, appOrigin = DEFAULT_APP_ORIGIN) {
17
+ const normalizedOrigin = normalizeAppOrigin(appOrigin);
18
+ const url = new URL(pathname, `${normalizedOrigin}/`);
19
+ if (url.origin !== normalizedOrigin) {
20
+ throw new Error('Buyer URL must remain on the configured first-party origin.');
21
+ }
22
+ for (const [key, value] of Object.entries(params || {})) {
23
+ if (value === undefined || value === null || String(value).trim() === '') continue;
24
+ url.searchParams.set(key, String(value).trim());
25
+ }
26
+ return url.toString();
27
+ }
28
+
29
+ function buildProBuyerUrl({
30
+ billingCycle = 'monthly',
31
+ appOrigin = DEFAULT_APP_ORIGIN,
32
+ source = null,
33
+ medium = null,
34
+ campaign = null,
35
+ content = null,
36
+ } = {}) {
37
+ return buildBuyerUrl('/go/pro', {
38
+ plan_id: 'pro',
39
+ billing_cycle: billingCycle === 'annual' ? 'annual' : 'monthly',
40
+ utm_source: source,
41
+ utm_medium: medium,
42
+ utm_campaign: campaign,
43
+ utm_content: content,
44
+ }, appOrigin);
45
+ }
46
+
47
+ function buildDiagnosticBuyerUrl({
48
+ appOrigin = DEFAULT_APP_ORIGIN,
49
+ source = null,
50
+ medium = null,
51
+ campaign = null,
52
+ content = null,
53
+ } = {}) {
54
+ return buildBuyerUrl('/diagnostic', {
55
+ plan_id: 'sprint_diagnostic',
56
+ utm_source: source,
57
+ utm_medium: medium,
58
+ utm_campaign: campaign,
59
+ utm_content: content,
60
+ }, appOrigin);
61
+ }
62
+
63
+ function buildSprintBuyerUrl({
64
+ appOrigin = DEFAULT_APP_ORIGIN,
65
+ source = null,
66
+ medium = null,
67
+ campaign = null,
68
+ content = null,
69
+ } = {}) {
70
+ return buildBuyerUrl('/go/sprint', {
71
+ plan_id: 'workflow_sprint',
72
+ utm_source: source,
73
+ utm_medium: medium,
74
+ utm_campaign: campaign,
75
+ utm_content: content,
76
+ }, appOrigin);
77
+ }
78
+
79
+ function buildEnterpriseBuyerUrl({ appOrigin = DEFAULT_APP_ORIGIN } = {}) {
80
+ const url = new URL('/', `${normalizeAppOrigin(appOrigin)}/`);
81
+ url.hash = 'workflow-sprint-intake';
82
+ return url.toString();
83
+ }
84
+
85
+ function isFirstPartyBuyerUrl(value, appOrigin = DEFAULT_APP_ORIGIN) {
86
+ try {
87
+ return new URL(value).origin === normalizeAppOrigin(appOrigin);
88
+ } catch {
89
+ return false;
90
+ }
91
+ }
92
+
93
+ module.exports = {
94
+ DEFAULT_APP_ORIGIN,
95
+ buildBuyerUrl,
96
+ buildDiagnosticBuyerUrl,
97
+ buildEnterpriseBuyerUrl,
98
+ buildProBuyerUrl,
99
+ buildSprintBuyerUrl,
100
+ isFirstPartyBuyerUrl,
101
+ normalizeAppOrigin,
102
+ };
@@ -98,13 +98,13 @@ function formatCliOutput(result) {
98
98
  const isDown = ['down', 'negative', 'thumbs_down'].includes(feedbackSignal);
99
99
 
100
100
  // Header
101
- if (feedbackResult?.duplicate) {
101
+ if (feedbackResult?.duplicate && feedbackResult.accepted === true) {
102
102
  lines.push(`${Y}${BD}Feedback already captured${RST}`);
103
103
  const feedbackId = feedbackResult.feedbackEvent?.id;
104
104
  const memoryId = feedbackResult.memoryRecord?.id;
105
105
  if (feedbackId) lines.push(`${D} Feedback ID: ${feedbackId}${RST}`);
106
106
  if (memoryId) lines.push(`${D} Memory ID : ${memoryId}${RST}`);
107
- } else if (feedbackResult && feedbackResult.accepted !== false) {
107
+ } else if (feedbackResult?.accepted === true) {
108
108
  lines.push(`${isDown ? R : G}${BD}${isDown ? '👎 Thumbs down recorded' : '👍 Thumbs up recorded'}${RST}`);
109
109
  const feedbackId = feedbackResult.feedbackEvent?.id || feedbackResult.id;
110
110
  const memoryId = feedbackResult.memoryRecord?.id || feedbackResult.memoryId;
@@ -1,7 +1,15 @@
1
1
  'use strict';
2
2
 
3
- const PRO_MONTHLY_PAYMENT_LINK = 'https://thumbgate.ai/go/pro?utm_source=offer';
4
- const PRO_ANNUAL_PAYMENT_LINK = 'https://buy.stripe.com/3cI8wPfCYaPs2dzdKz3sI07';
3
+ const { buildProBuyerUrl } = require('./buyer-paths');
4
+
5
+ const PRO_MONTHLY_PAYMENT_LINK = buildProBuyerUrl({
6
+ billingCycle: 'monthly',
7
+ source: 'offer',
8
+ });
9
+ const PRO_ANNUAL_PAYMENT_LINK = buildProBuyerUrl({
10
+ billingCycle: 'annual',
11
+ source: 'offer',
12
+ });
5
13
 
6
14
  const PRO_MONTHLY_PRICE_ID = 'price_1THQY7GGBpd520QYHoS7RG0J';
7
15
  const PRO_ANNUAL_PRICE_ID = 'price_1THQZ7GGBpd520QYxzDRnxhB';
@@ -14,12 +22,11 @@ const TEAM_ANNUAL_PRICE_DOLLARS = 588;
14
22
  const TEAM_MIN_SEATS = 3;
15
23
 
16
24
  const PRO_PRICE_LABEL = '$19/mo or $149/yr (individual)';
17
- // Enterprise is the contact-sales tier (absorbs the former Team workflow + the
18
- // regulated-industry lane). Pricing is scoped after intake — no self-serve seat
19
- // price is surfaced. The dormant TEAM_* Stripe constants below remain only as
20
- // inert billing plumbing pending a dedicated cleanup; they are no longer a
21
- // customer-facing tier.
22
- const ENTERPRISE_PRICE_LABEL = 'Custom pricing, scoped after intake — Enterprise agent governance';
25
+ // The Enterprise Workflow Gate is the one promoted public service offer. The
26
+ // dormant TEAM_* Stripe constants below remain only as inert billing plumbing
27
+ // pending a dedicated cleanup; they are no longer a customer-facing tier.
28
+ const ENTERPRISE_PRICE_LABEL = 'Enterprise Workflow Gate — $499 one-time for one supported workflow';
29
+ const ENTERPRISE_ENTRY_URL = 'https://thumbgate.ai/pricing';
23
30
 
24
31
  function normalizePlanId(value) {
25
32
  const text = String(value || '').trim().toLowerCase();
@@ -74,7 +81,7 @@ function buildCaptureReceipt({ signal, feedbackId, memoryId, actionType } = {})
74
81
  ` Solo Pro : ${PRO_PRICE_LABEL} for recall, dashboard, adapters, and exports`,
75
82
  ` Upgrade : ${trackedProUrl('cli_capture_receipt', actionType || normalizedSignal.toLowerCase())}`,
76
83
  ` Enterprise : ${ENTERPRISE_PRICE_LABEL}; start with one repeated workflow failure`,
77
- ' https://thumbgate.ai/#workflow-sprint-intake',
84
+ ` ${ENTERPRISE_ENTRY_URL}`,
78
85
  '',
79
86
  ];
80
87
  return lines.join('\n');
@@ -107,7 +114,7 @@ function buildStatsReceipt(stats = {}) {
107
114
  lines.push(' Show the buyer : npx thumbgate cost');
108
115
  lines.push(' Pro recall value : keep lessons/rules searchable, exportable, and visible');
109
116
  lines.push(` Solo Pro : ${trackedProUrl('cli_stats_receipt', 'proof_seen')}`);
110
- lines.push(' Enterprise : https://thumbgate.ai/#workflow-sprint-intake');
117
+ lines.push(` Enterprise : ${ENTERPRISE_ENTRY_URL}`);
111
118
  lines.push('');
112
119
  return lines.join('\n');
113
120
  }
@@ -125,6 +132,7 @@ module.exports = {
125
132
  TEAM_MIN_SEATS,
126
133
  PRO_PRICE_LABEL,
127
134
  ENTERPRISE_PRICE_LABEL,
135
+ ENTERPRISE_ENTRY_URL,
128
136
  normalizePlanId,
129
137
  normalizeBillingCycle,
130
138
  normalizeSeatCount,