thumbgate 1.27.12 → 1.27.14

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 (133) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.well-known/llms.txt +2 -1
  3. package/.well-known/mcp/server-card.json +1 -1
  4. package/README.md +2 -4
  5. package/adapters/claude/.mcp.json +2 -2
  6. package/adapters/mcp/server-stdio.js +1 -1
  7. package/adapters/opencode/opencode.json +1 -1
  8. package/adapters/policy-engine/ethicore-guardian-client.js +68 -0
  9. package/adapters/policy-engine/thumbgate-policy-engine-adapter.js +260 -0
  10. package/bin/cli.js +78 -259
  11. package/config/gate-templates.json +0 -228
  12. package/config/gates/claim-verification.json +0 -18
  13. package/package.json +35 -25
  14. package/public/assets/brand/thumbgate-logo-transparent.svg +22 -0
  15. package/public/assets/brand/thumbgate-mark-inline-v3.svg +19 -0
  16. package/public/assets/brand/thumbgate-mark.svg +11 -5
  17. package/public/blog.html +0 -30
  18. package/public/brand/thumbgate-mark.svg +9 -5
  19. package/public/chatgpt-app.html +2 -2
  20. package/public/compare.html +2 -1
  21. package/public/dashboard.html +1 -1
  22. package/public/federal.html +1 -1
  23. package/public/index.html +95 -216
  24. package/public/learn.html +59 -35
  25. package/public/lessons.html +1 -1
  26. package/public/numbers.html +2 -2
  27. package/public/pro.html +7 -7
  28. package/scripts/agent-readiness.js +142 -0
  29. package/scripts/aws-blocks-guardrails.js +228 -0
  30. package/scripts/cli-schema.js +22 -10
  31. package/scripts/dashboard-chat.js +2 -1
  32. package/scripts/document-intake.js +1 -49
  33. package/scripts/durability/step.js +3 -3
  34. package/scripts/gate-stats.js +5 -11
  35. package/scripts/gates-engine.js +0 -49
  36. package/scripts/gemini-embedding-policy.js +2 -1
  37. package/scripts/hook-stop-anti-claim.js +116 -184
  38. package/scripts/hosted-config.js +0 -12
  39. package/scripts/lesson-search.js +1 -15
  40. package/scripts/llm-client.js +187 -5
  41. package/scripts/plausible-domain-config.js +3 -1
  42. package/scripts/seo-gsd.js +240 -1
  43. package/scripts/tool-registry.js +2 -2
  44. package/scripts/vector-store.js +44 -0
  45. package/scripts/workspace-evolver.js +62 -2
  46. package/src/api/server.js +340 -131
  47. package/public/assets/brand/thumbgate-mark-inline.svg +0 -15
  48. package/public/compare/adopt-ai.html +0 -219
  49. package/public/compare/agentix-labs.html +0 -197
  50. package/public/compare/ai-experience-orchestration.html +0 -216
  51. package/public/compare/anthropic-claude-for-legal.html +0 -260
  52. package/public/compare/anthropic-containment.html +0 -280
  53. package/public/compare/arcade.html +0 -175
  54. package/public/compare/arcjet.html +0 -239
  55. package/public/compare/bumblebee.html +0 -307
  56. package/public/compare/claude-code-hooks.html +0 -294
  57. package/public/compare/databricks-unity-ai-gateway.html +0 -215
  58. package/public/compare/fallow.html +0 -351
  59. package/public/compare/heidi.html +0 -233
  60. package/public/compare/mem0.html +0 -342
  61. package/public/compare/oak-and-sparrow-gatekeeper.html +0 -289
  62. package/public/compare/rein.html +0 -236
  63. package/public/compare/sigmashake.html +0 -256
  64. package/public/compare/speclock.html +0 -342
  65. package/public/guides/agent-harness-optimization.html +0 -342
  66. package/public/guides/agentic-web-governance.html +0 -406
  67. package/public/guides/ai-agent-governance-sprint.html +0 -415
  68. package/public/guides/ai-agent-pre-action-approval-gates.html +0 -401
  69. package/public/guides/ai-agent-workflow-migration-checklist.html +0 -392
  70. package/public/guides/ai-deployment-readiness.html +0 -415
  71. package/public/guides/ai-mode-ads-agent-governance.html +0 -401
  72. package/public/guides/ai-search-topical-presence.html +0 -342
  73. package/public/guides/autoresearch-agent-safety.html +0 -342
  74. package/public/guides/background-agent-governance.html +0 -358
  75. package/public/guides/best-tools-stop-ai-agents-breaking-production.html +0 -363
  76. package/public/guides/browser-automation-safety.html +0 -342
  77. package/public/guides/chatgpt-ads-trust.html +0 -353
  78. package/public/guides/claude-code-feedback.html +0 -339
  79. package/public/guides/claude-code-prevent-repeated-mistakes.html +0 -161
  80. package/public/guides/claude-code-skills-guardrails.html +0 -343
  81. package/public/guides/claude-desktop.html +0 -356
  82. package/public/guides/code-knowledge-graph-guardrails.html +0 -365
  83. package/public/guides/codex-cli-guardrails.html +0 -339
  84. package/public/guides/cursor-agent-guardrails.html +0 -339
  85. package/public/guides/cursor-prevent-repeated-mistakes.html +0 -161
  86. package/public/guides/database-agent-safety.html +0 -406
  87. package/public/guides/deepseek-v4-runtime-guardrails.html +0 -346
  88. package/public/guides/developer-machine-supply-chain-guardrails.html +0 -358
  89. package/public/guides/gcp-mcp-guardrails.html +0 -147
  90. package/public/guides/gemini-cli-feedback-memory.html +0 -339
  91. package/public/guides/gpt-5-5-model-evaluation.html +0 -358
  92. package/public/guides/internal-ai-engineering-stack-guardrails.html +0 -348
  93. package/public/guides/long-running-agent-context-management.html +0 -346
  94. package/public/guides/mcp-tool-governance.html +0 -401
  95. package/public/guides/multica-thumbgate-setup.html +0 -134
  96. package/public/guides/native-messaging-host-security.html +0 -342
  97. package/public/guides/policy-engine-pre-action-gates.html +0 -346
  98. package/public/guides/pre-action-checks.html +0 -342
  99. package/public/guides/pretooluse-hooks-vs-advisory-prompt-rules.html +0 -342
  100. package/public/guides/prompt-tricks-to-workflow-rules.html +0 -365
  101. package/public/guides/proxy-pointer-rag-guardrails.html +0 -352
  102. package/public/guides/rag-precision-tuning-guardrails.html +0 -352
  103. package/public/guides/reasoning-compression-guardrails.html +0 -346
  104. package/public/guides/relational-knowledge-ai-recommendations.html +0 -342
  105. package/public/guides/roo-code-alternative-cline.html +0 -339
  106. package/public/guides/semantic-programmatic-seo-guardrails.html +0 -352
  107. package/public/guides/seo-agent-skills-guardrails.html +0 -344
  108. package/public/guides/stop-repeated-ai-agent-mistakes.html +0 -342
  109. package/public/learn/ac-dc-runtime-enforcement.html +0 -277
  110. package/public/learn/agent-harness-pattern.html +0 -181
  111. package/public/learn/agent-identity-connector-governance.html +0 -146
  112. package/public/learn/agent-swarms-shared-gates.html +0 -173
  113. package/public/learn/agentic-enterprise-context-brain.html +0 -117
  114. package/public/learn/agentic-os-team-governance.html +0 -146
  115. package/public/learn/ai-agent-governance.html +0 -158
  116. package/public/learn/ai-agent-persistent-memory.html +0 -211
  117. package/public/learn/anthropomorphic-claim-gates.html +0 -180
  118. package/public/learn/background-agent-control-layer.html +0 -184
  119. package/public/learn/claude-code-goal-with-rubrics.html +0 -205
  120. package/public/learn/codex-role-plugins-need-governance.html +0 -125
  121. package/public/learn/cost-aware-agent-gate-routing.html +0 -173
  122. package/public/learn/databricks-unity-ai-gateway-runtime-governance.html +0 -157
  123. package/public/learn/deterministic-agent-workflows.html +0 -185
  124. package/public/learn/feedback-loop-vs-decision-layer.html +0 -283
  125. package/public/learn/from-prototype-to-production.html +0 -223
  126. package/public/learn/learn.css +0 -51
  127. package/public/learn/mcp-pre-action-checks-explained.html +0 -172
  128. package/public/learn/pretix-stripe-connect-marketplaces.html +0 -161
  129. package/public/learn/regulated-agent-execution-boundary.html +0 -196
  130. package/public/learn/spec-driven-development.html +0 -168
  131. package/public/learn/stop-ai-agent-force-push.html +0 -134
  132. package/public/learn/vibe-coding-safety-net.html +0 -142
  133. package/scripts/reddit-browser-notification-watch.js +0 -230
package/public/learn.html CHANGED
@@ -115,18 +115,6 @@
115
115
  {
116
116
  "@type": "ListItem",
117
117
  "position": 13,
118
- "url": "https://thumbgate.ai/learn/anthropomorphic-claim-gates",
119
- "name": "Anthropomorphic Claim Gates for AI Agents"
120
- },
121
- {
122
- "@type": "ListItem",
123
- "position": 14,
124
- "url": "https://thumbgate.ai/learn/agent-identity-connector-governance",
125
- "name": "Agent Identity and Connector Governance"
126
- },
127
- {
128
- "@type": "ListItem",
129
- "position": 15,
130
118
  "url": "https://thumbgate.ai/learn/pretix-stripe-connect-marketplaces",
131
119
  "name": "Building a Pretix + Stripe Connect Plugin for Live-Music Venues"
132
120
  },
@@ -157,42 +145,54 @@
157
145
  {
158
146
  "@type": "ListItem",
159
147
  "position": 10,
148
+ "url": "https://thumbgate.ai/guides/hermes-agent-guardrails",
149
+ "name": "Hermes Agent Guardrails for Self-Improving Agents"
150
+ },
151
+ {
152
+ "@type": "ListItem",
153
+ "position": 11,
154
+ "url": "https://thumbgate.ai/guides/agent-context-governance",
155
+ "name": "Agent Context Governance for Long-Running Agents"
156
+ },
157
+ {
158
+ "@type": "ListItem",
159
+ "position": 12,
160
160
  "url": "https://thumbgate.ai/guides/roo-code-alternative-cline",
161
161
  "name": "Roo Code Alternative: Migrating to Cline with Portable Lesson Memory"
162
162
  },
163
163
  {
164
164
  "@type": "ListItem",
165
- "position": 11,
165
+ "position": 13,
166
166
  "url": "https://thumbgate.ai/guides/browser-automation-safety",
167
167
  "name": "Browser Automation Safety for AI Agents"
168
168
  },
169
169
  {
170
170
  "@type": "ListItem",
171
- "position": 12,
171
+ "position": 14,
172
172
  "url": "https://thumbgate.ai/guides/native-messaging-host-security",
173
173
  "name": "Native Messaging Host Security"
174
174
  },
175
175
  {
176
176
  "@type": "ListItem",
177
- "position": 13,
177
+ "position": 15,
178
178
  "url": "https://thumbgate.ai/guides/ai-search-topical-presence",
179
179
  "name": "AI Search Topical Presence"
180
180
  },
181
181
  {
182
182
  "@type": "ListItem",
183
- "position": 14,
183
+ "position": 16,
184
184
  "url": "https://thumbgate.ai/guides/relational-knowledge-ai-recommendations",
185
185
  "name": "Relational Knowledge in AI Recommendations"
186
186
  },
187
187
  {
188
188
  "@type": "ListItem",
189
- "position": 15,
189
+ "position": 17,
190
190
  "url": "https://thumbgate.ai/guides/ai-deployment-readiness",
191
191
  "name": "AI Deployment Readiness Before Production Rollout"
192
192
  },
193
193
  {
194
194
  "@type": "ListItem",
195
- "position": 16,
195
+ "position": 18,
196
196
  "url": "https://thumbgate.ai/guides/database-agent-safety",
197
197
  "name": "Database Safety for AI Agents"
198
198
  }
@@ -290,7 +290,7 @@
290
290
  <body>
291
291
 
292
292
  <nav>
293
- <a href="/" class="brand"><img src="/assets/brand/thumbgate-mark-inline.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate</span></a>
293
+ <a href="/" class="brand"><img src="/assets/brand/thumbgate-mark-inline-v3.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate</span></a>
294
294
  <a href="/guide">Setup Guide</a>
295
295
  <a href="/learn">Learn</a>
296
296
  <a href="/dashboard">Dashboard</a>
@@ -421,22 +421,6 @@
421
421
  <span class="article-tag">Cost Control</span>
422
422
  </a>
423
423
 
424
- <a href="/learn/anthropomorphic-claim-gates" class="article-card">
425
- <h3>Anthropomorphic Claim Gates for AI Agents</h3>
426
- <p>Do not let an agent say a model understands, knows, decides, or behaves human-like unless it can show the measurement criteria and evidence behind that claim.</p>
427
- <span class="article-tag">Claim Verification</span>
428
- <span class="article-tag">Research</span>
429
- <span class="article-tag">Proof Gates</span>
430
- </a>
431
-
432
- <a href="/learn/agent-identity-connector-governance" class="article-card">
433
- <h3>Agent Identity and Connector Governance</h3>
434
- <p>Agents connected to Merge, Glean, MCP gateways, and enterprise apps are identities. Gate owner, credential, connector scope, DLP, audit, and purpose before they act.</p>
435
- <span class="article-tag">Agent Identity</span>
436
- <span class="article-tag">MCP Connectors</span>
437
- <span class="article-tag">Least Privilege</span>
438
- </a>
439
-
440
424
  <a href="/learn/from-prototype-to-production" class="article-card">
441
425
  <h3>From git init to v1.17.0 in 70 days: an honest ThumbGate build log</h3>
442
426
  <p>70 days, 112 commits, 17 minor releases, 6k npm downloads, $0 cold-traffic revenue. The unedited story of taking ThumbGate from a one-line repo init to live production — including the part that's still broken.</p>
@@ -473,6 +457,14 @@
473
457
  <span class="article-tag">Sprint</span>
474
458
  </a>
475
459
 
460
+ <a href="/guides/aws-blocks-agent-guardrails" class="article-card">
461
+ <h3>AWS Blocks Agent Guardrails</h3>
462
+ <p>Guard the local-to-cloud jump before AWS Blocks agents deploy, destroy resources, mutate data, expand IAM, or call Bedrock tools.</p>
463
+ <span class="article-tag">AWS Blocks</span>
464
+ <span class="article-tag">Cloud Safety</span>
465
+ <span class="article-tag">Pre-action Gates</span>
466
+ </a>
467
+
476
468
  <a href="/guides/ai-search-topical-presence" class="article-card">
477
469
  <h3>AI Search Topical Presence</h3>
478
470
  <p>Why AI assistants recommend the tools they repeatedly see tied to a buyer problem, and how ThumbGate builds that association with proof-backed pages.</p>
@@ -489,6 +481,14 @@
489
481
  <span class="article-tag">Governance</span>
490
482
  </a>
491
483
 
484
+ <a href="/guides/vllm-serving-guardrails" class="article-card">
485
+ <h3>vLLM Serving Guardrails</h3>
486
+ <p>Gate self-hosted inference changes before agents route production work through PagedAttention, batching, prefix-cache, or model-swap optimizations.</p>
487
+ <span class="article-tag">vLLM</span>
488
+ <span class="article-tag">LLM Serving</span>
489
+ <span class="article-tag">Runtime Safety</span>
490
+ </a>
491
+
492
492
  <a href="/guides/relational-knowledge-ai-recommendations" class="article-card">
493
493
  <h3>Relational Knowledge in AI Recommendations</h3>
494
494
  <p>How stored brand-to-problem associations shape AI answers, and why ThumbGate should own the pre-action-checks category in those retrieval paths.</p>
@@ -529,6 +529,30 @@
529
529
  <span class="article-tag">Enforcement</span>
530
530
  </a>
531
531
 
532
+ <a href="/guides/hermes-agent-guardrails" class="article-card">
533
+ <h3>Hermes Agent Guardrails for Self-Improving Agents</h3>
534
+ <p>Hermes-style agents bring persistent memory, generated skills, gateways, automations, and sandboxes. ThumbGate adds the pre-action firewall before those agents touch real systems.</p>
535
+ <span class="article-tag">Hermes Agent</span>
536
+ <span class="article-tag">Persistent Agents</span>
537
+ <span class="article-tag">Execution Firewall</span>
538
+ </a>
539
+
540
+ <a href="/guides/safe-self-evolution" class="article-card">
541
+ <h3>Safe Self-Evolution: Prompt Optimization without Regression</h3>
542
+ <p>Hermes-style autonomous agents learn by observing failures and rewriting skills. ThumbGate introduces Safe Self-Evolution: weakness mining, automated prompt optimization, verification suites, and atomic git rollbacks.</p>
543
+ <span class="article-tag">Self-Evolution</span>
544
+ <span class="article-tag">Harness Optimizer</span>
545
+ <span class="article-tag">Verification Gate</span>
546
+ </a>
547
+
548
+ <a href="/guides/agent-context-governance" class="article-card">
549
+ <h3>Agent Context Governance for Long-Running Agents</h3>
550
+ <p>AdaCoM, tokenmaxxing backlash, Managed Agents, lockdown modes, and model-provenance scares all point to one need: clean context and tool gates before agents act.</p>
551
+ <span class="article-tag">Context Governance</span>
552
+ <span class="article-tag">Tool Lockdown</span>
553
+ <span class="article-tag">Model Provenance</span>
554
+ </a>
555
+
532
556
  <a href="/guides/roo-code-alternative-cline" class="article-card">
533
557
  <h3>Roo Code Alternative: Migrate to Cline Without Losing Agent Memory</h3>
534
558
  <p>Use the Roo shutdown window to pitch portable lesson memory and local-first enforcement instead of making operators re-teach the same failures after they switch.</p>
@@ -211,7 +211,7 @@
211
211
 
212
212
  <nav>
213
213
  <div class="container">
214
- <a href="/dashboard" class="nav-logo"><img src="/assets/brand/thumbgate-mark-inline.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate</span></a>
214
+ <a href="/dashboard" class="nav-logo"><img src="/assets/brand/thumbgate-mark-inline-v3.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate</span></a>
215
215
  <div class="nav-links">
216
216
  <a href="/dashboard">Dashboard</a>
217
217
  <a href="/lessons" class="active">Lessons</a>
@@ -25,7 +25,7 @@
25
25
  "alternateName": "thumbgate",
26
26
  "applicationCategory": "DeveloperApplication",
27
27
  "operatingSystem": "Cross-platform, Node.js >=18.18.0",
28
- "softwareVersion": "1.27.7",
28
+ "softwareVersion": "1.27.8",
29
29
  "url": "https://thumbgate.ai/numbers",
30
30
  "dateModified": "2026-05-07",
31
31
  "creator": {
@@ -202,7 +202,7 @@
202
202
  <main class="container">
203
203
  <h1>The Numbers</h1>
204
204
  <p class="subtitle">Generated first-party operational snapshot from the ThumbGate runtime. This is not customer traction, install volume, revenue, or proof that a configured gate has fired.</p>
205
- <div class="freshness">Updated: 2026-05-07 · Version 1.27.7</div>
205
+ <div class="freshness">Updated: 2026-05-07 · Version 1.27.8</div>
206
206
  <div class="truth-note"><strong>Read this first:</strong> configured checks are inventory. Recorded blocks and warnings are usage evidence. This snapshot currently reports 0 recorded hard-block event(s) and 0 recorded warning event(s).</div>
207
207
 
208
208
  <h2>Gate enforcement</h2>
package/public/pro.html CHANGED
@@ -37,7 +37,7 @@ __GA_BOOTSTRAP__
37
37
  <script type="application/ld+json">
38
38
  {
39
39
  "@context": "https://schema.org",
40
- "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "How is Pro different from the free install?", "acceptedAnswer": { "@type": "Answer", "text": "Free keeps local recall, checks, and MCP. Pro adds the personal dashboard, DPO export, auto-connect, and founder support." } }, { "@type": "Question", "name": "Does Pro require a cloud account?", "acceptedAnswer": { "@type": "Answer", "text": "No. Pro stays local-first; Team is the hosted rollout lane for shared lessons, org visibility, and reviews." } }, { "@type": "Question", "name": "What happens after checkout?", "acceptedAnswer": { "@type": "Answer", "text": "You activate Pro, connect the local dashboard, and inspect blocked actions, lessons, and exports." } }, { "@type": "Question", "name": "When should I choose Team instead of Pro?", "acceptedAnswer": { "@type": "Answer", "text": "Choose Team when one correction needs to protect multiple developers or agents across shared repositories." } }]
40
+ "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "How is Pro different from the free install?", "acceptedAnswer": { "@type": "Answer", "text": "Free keeps local recall, checks, and MCP. Pro adds the personal dashboard, DPO export, auto-connect, and founder support." } }, { "@type": "Question", "name": "Does Pro require a cloud account?", "acceptedAnswer": { "@type": "Answer", "text": "No. Pro stays local-first; Enterprise is the hosted rollout lane for shared lessons, org visibility, and reviews." } }, { "@type": "Question", "name": "What happens after checkout?", "acceptedAnswer": { "@type": "Answer", "text": "You activate Pro, connect the local dashboard, and inspect blocked actions, lessons, and exports." } }, { "@type": "Question", "name": "When should I choose Enterprise instead of Pro?", "acceptedAnswer": { "@type": "Answer", "text": "Choose Enterprise when one correction needs to protect multiple developers or agents across shared repositories." } }]
41
41
  }
42
42
  </script>
43
43
 
@@ -712,7 +712,7 @@ __GA_BOOTSTRAP__
712
712
  <body>
713
713
  <nav>
714
714
  <div class="container">
715
- <a href="/" class="nav-logo"><img src="/assets/brand/thumbgate-mark-inline.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate Pro</span></a>
715
+ <a href="/" class="nav-logo"><img src="/assets/brand/thumbgate-mark-inline-v3.svg" alt="ThumbGate" class="logo-mark" width="28" height="28"><span class="logo-text">ThumbGate Pro</span></a>
716
716
  <div class="nav-links">
717
717
  <a href="#why-pay">Why Pro</a>
718
718
  <a href="#proof">Proof</a>
@@ -731,7 +731,7 @@ __GA_BOOTSTRAP__
731
731
  <h1>Buy the operator loop that proves your AI agent stopped repeating the mistake.</h1>
732
732
  <p style="font-size:13px;opacity:0.8;margin-bottom:0.5rem;">Updated: <time datetime="2026-04-20">2026-04-20</time> · by <a href="https://github.com/IgorGanapolsky" style="color:inherit;">Igor Ganapolsky</a></p>
733
733
  <p>ThumbGate Pro is for one operator who already hit a repeated AI-agent failure and now needs proof: what was blocked, why it was blocked, and what changed before the next risky run.</p>
734
- <p>Start Pro when you want the local dashboard, DPO export, and a single proof lane for the repeated mistake you need to stop. Team diagnostics and custom services are handled through intake, not this buyer path.</p>
734
+ <p>Start Pro when you want the local dashboard, DPO export, and a single proof lane for the repeated mistake you need to stop. Enterprise diagnostics and custom services are handled through intake, not this buyer path.</p>
735
735
  <div class="hero-proof">
736
736
  <div class="proof-pill">Personal local dashboard</div>
737
737
  <div class="proof-pill">DPO export from real corrections</div>
@@ -951,15 +951,15 @@ __GA_BOOTSTRAP__
951
951
  </div>
952
952
  <div class="faq-item">
953
953
  <button class="faq-q" type="button" onclick="toggleFaq(this)" onkeydown="handleFaqKeydown(event)" aria-expanded="false">Does Pro require a cloud account?</button>
954
- <div class="faq-a">No. Pro is still local-first for the individual operator lane. Team is the hosted rollout lane for shared lessons, org visibility, and hosted review views.</div>
954
+ <div class="faq-a">No. Pro is still local-first for the individual operator lane. Enterprise is the hosted rollout lane for shared lessons, org visibility, and hosted review views.</div>
955
955
  </div>
956
956
  <div class="faq-item">
957
957
  <button class="faq-q" type="button" onclick="toggleFaq(this)" onkeydown="handleFaqKeydown(event)" aria-expanded="false">What happens after checkout?</button>
958
958
  <div class="faq-a">You activate Pro, connect the personal local dashboard, and your running agents can appear automatically so you can inspect blocked actions, active lessons, and exportable DPO pairs without adding a separate cloud dashboard dependency.</div>
959
959
  </div>
960
960
  <div class="faq-item">
961
- <button class="faq-q" type="button" onclick="toggleFaq(this)" onkeydown="handleFaqKeydown(event)" aria-expanded="false">When should I choose Team instead of Pro?</button>
962
- <div class="faq-a">Choose Team when one thumbs-down should protect multiple people or agents across shared repositories, or when you need shared hosted lessons, org dashboard visibility, and a workflow hardening pilot with rollout review views.</div>
961
+ <button class="faq-q" type="button" onclick="toggleFaq(this)" onkeydown="handleFaqKeydown(event)" aria-expanded="false">When should I choose Enterprise instead of Pro?</button>
962
+ <div class="faq-a">Choose Enterprise when one thumbs-down should protect multiple people or agents across shared repositories, or when you need shared hosted lessons, org dashboard visibility, and a workflow hardening pilot with rollout review views.</div>
963
963
  </div>
964
964
  </div>
965
965
  </div>
@@ -987,7 +987,7 @@ __GA_BOOTSTRAP__
987
987
  <a href="__VERIFICATION_URL__" target="_blank" rel="noopener">Verification Evidence</a>
988
988
  <a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub</a>
989
989
  </div>
990
- <div class="footer-copy">ThumbGate Pro for individual operators. Team stays intake-first.</div>
990
+ <div class="footer-copy">ThumbGate Pro for individual operators. Enterprise stays intake-first.</div>
991
991
  </div>
992
992
  </footer>
993
993
 
@@ -2,6 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  const fs = require('fs');
5
+ const os = require('os');
5
6
  const path = require('path');
6
7
  const {
7
8
  getActiveMcpProfile,
@@ -165,6 +166,136 @@ function summarizePermissionTier(profileName = getActiveMcpProfile()) {
165
166
  };
166
167
  }
167
168
 
169
+ function flattenHookCommands(value, commands = []) {
170
+ if (!value) return commands;
171
+ if (typeof value === 'string') {
172
+ commands.push(value);
173
+ return commands;
174
+ }
175
+ if (Array.isArray(value)) {
176
+ value.forEach((item) => flattenHookCommands(item, commands));
177
+ return commands;
178
+ }
179
+ if (typeof value === 'object') {
180
+ if (typeof value.command === 'string') commands.push(value.command);
181
+ Object.entries(value)
182
+ .filter(([key]) => key !== 'command')
183
+ .forEach(([, item]) => flattenHookCommands(item, commands));
184
+ }
185
+ return commands;
186
+ }
187
+
188
+ function readJsonIfExists(filePath) {
189
+ try {
190
+ if (!fs.existsSync(filePath)) return null;
191
+ return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
192
+ } catch (_) {
193
+ return null;
194
+ }
195
+ }
196
+
197
+ function detectHookAutoCapture(projectRoot) {
198
+ const effectiveRoot = projectRoot || findProjectRoot();
199
+ const settingsFiles = ['.claude/settings.json', '.claude/settings.local.json']
200
+ .map((file) => path.join(effectiveRoot, file))
201
+ .filter((file) => fs.existsSync(file));
202
+ const commands = settingsFiles.flatMap((file) => {
203
+ const parsed = readJsonIfExists(file);
204
+ return flattenHookCommands(parsed && parsed.hooks && parsed.hooks.UserPromptSubmit);
205
+ });
206
+ const wiredCommands = commands.filter((command) => /hook-auto-capture(\.sh)?\b/.test(command));
207
+
208
+ return {
209
+ ready: wiredCommands.length > 0,
210
+ settingsFiles: settingsFiles.map((file) => path.relative(effectiveRoot, file)),
211
+ wiredCommands,
212
+ recommendation: wiredCommands.length > 0
213
+ ? 'UserPromptSubmit auto-capture hook is wired for typed thumbs feedback.'
214
+ : 'Run `npx thumbgate init --wire-hooks` so typed thumbs up/down feedback is captured automatically.',
215
+ };
216
+ }
217
+
218
+ function probeFeedbackCapture(projectRoot) {
219
+ const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'thumbgate-doctor-feedback-'));
220
+ const previousFeedbackDir = process.env.THUMBGATE_FEEDBACK_DIR;
221
+ const previousProjectDir = process.env.THUMBGATE_PROJECT_DIR;
222
+ const previousNoNudge = process.env.THUMBGATE_NO_NUDGE;
223
+
224
+ process.env.THUMBGATE_FEEDBACK_DIR = tempDir;
225
+ process.env.THUMBGATE_PROJECT_DIR = projectRoot || findProjectRoot();
226
+ process.env.THUMBGATE_NO_NUDGE = '1';
227
+
228
+ try {
229
+ const {
230
+ captureFeedback,
231
+ getFeedbackPaths,
232
+ readJSONL,
233
+ } = require('./feedback-loop');
234
+ const result = captureFeedback({
235
+ signal: 'down',
236
+ context: 'doctor feedback loop probe: prove thumbs feedback persists to durable logs',
237
+ whatWentWrong: 'A runtime claimed thumbs feedback worked without verifying durable capture',
238
+ whatToChange: 'Run thumbgate doctor or feedback-self-test before claiming the loop is wired',
239
+ tags: 'doctor,feedback-loop-probe',
240
+ });
241
+ const paths = getFeedbackPaths();
242
+ const feedbackId = result.feedbackEvent && result.feedbackEvent.id;
243
+ const memoryId = result.memoryRecord && result.memoryRecord.id;
244
+ const feedbackStored = Boolean(feedbackId && readJSONL(paths.FEEDBACK_LOG_PATH).some((row) => row.id === feedbackId));
245
+ const memoryStored = Boolean(memoryId && readJSONL(paths.MEMORY_LOG_PATH).some((row) => row.id === memoryId));
246
+
247
+ return {
248
+ ready: Boolean(result.accepted && feedbackStored && memoryStored),
249
+ accepted: Boolean(result.accepted),
250
+ feedbackStored,
251
+ memoryStored,
252
+ feedbackId: feedbackId || null,
253
+ memoryId: memoryId || null,
254
+ mode: 'isolated-temp-store',
255
+ recommendation: (result.accepted && feedbackStored && memoryStored)
256
+ ? 'Feedback capture writes durable feedback and memory records.'
257
+ : 'Feedback capture did not persist both feedback and memory records; run `npx thumbgate feedback-self-test --json`.',
258
+ };
259
+ } catch (error) {
260
+ return {
261
+ ready: false,
262
+ accepted: false,
263
+ feedbackStored: false,
264
+ memoryStored: false,
265
+ feedbackId: null,
266
+ memoryId: null,
267
+ mode: 'isolated-temp-store',
268
+ error: error && error.message ? error.message : String(error),
269
+ recommendation: 'Feedback capture probe failed; run `npx thumbgate feedback-self-test --json` for details.',
270
+ };
271
+ } finally {
272
+ if (previousFeedbackDir === undefined) delete process.env.THUMBGATE_FEEDBACK_DIR;
273
+ else process.env.THUMBGATE_FEEDBACK_DIR = previousFeedbackDir;
274
+ if (previousProjectDir === undefined) delete process.env.THUMBGATE_PROJECT_DIR;
275
+ else process.env.THUMBGATE_PROJECT_DIR = previousProjectDir;
276
+ if (previousNoNudge === undefined) delete process.env.THUMBGATE_NO_NUDGE;
277
+ else process.env.THUMBGATE_NO_NUDGE = previousNoNudge;
278
+ try { fs.rmSync(tempDir, { recursive: true, force: true }); } catch (_) { /* ignore cleanup failure */ }
279
+ }
280
+ }
281
+
282
+ function assessFeedbackLoop(projectRoot) {
283
+ const hookAutoCapture = detectHookAutoCapture(projectRoot);
284
+ const captureProbe = probeFeedbackCapture(projectRoot);
285
+ const ready = hookAutoCapture.ready && captureProbe.ready;
286
+
287
+ return {
288
+ ready,
289
+ automatic: hookAutoCapture.ready,
290
+ durableCapture: captureProbe.ready,
291
+ hookAutoCapture,
292
+ captureProbe,
293
+ recommendation: ready
294
+ ? 'Typed thumbs feedback is automatically detected and durable capture is verified.'
295
+ : 'Install hooks and verify capture before claiming thumbs feedback improves future runs.',
296
+ };
297
+ }
298
+
168
299
  function generateAgentReadinessReport({
169
300
  projectRoot = PROJECT_ROOT,
170
301
  mcpProfile = null,
@@ -172,11 +303,13 @@ function generateAgentReadinessReport({
172
303
  const runtime = detectRuntimeIsolation();
173
304
  const bootstrap = collectBootstrapFiles(projectRoot);
174
305
  const permissions = summarizePermissionTier(mcpProfile || getActiveMcpProfile());
306
+ const feedbackLoop = assessFeedbackLoop(projectRoot);
175
307
 
176
308
  const warnings = [];
177
309
  if (!runtime.isolated) warnings.push(runtime.recommendation);
178
310
  if (!bootstrap.ready) warnings.push(bootstrap.recommendation);
179
311
  if (!permissions.ready) warnings.push(permissions.recommendation);
312
+ if (!feedbackLoop.ready) warnings.push(feedbackLoop.recommendation);
180
313
 
181
314
  return {
182
315
  generatedAt: new Date().toISOString(),
@@ -185,10 +318,12 @@ function generateAgentReadinessReport({
185
318
  runtime,
186
319
  bootstrap,
187
320
  permissions,
321
+ feedbackLoop,
188
322
  articleAlignment: {
189
323
  runtimeIsolation: runtime.isolated,
190
324
  contextConditioning: bootstrap.ready,
191
325
  permissionEnvelope: permissions.ready,
326
+ feedbackLoop: feedbackLoop.ready,
192
327
  },
193
328
  warnings,
194
329
  };
@@ -208,6 +343,10 @@ function reportToText(report) {
208
343
  lines.push(`Permissions: ${report.permissions.profile} (${report.permissions.tier})`);
209
344
  lines.push(` Write-capable tools: ${report.permissions.writeCapableTools.length}`);
210
345
  lines.push(` Recommendation: ${report.permissions.recommendation}`);
346
+ lines.push(`Feedback loop: ${report.feedbackLoop.ready ? 'ready' : 'needs_attention'}`);
347
+ lines.push(` Auto-capture hook: ${report.feedbackLoop.automatic ? 'wired' : 'missing'}`);
348
+ lines.push(` Durable capture: ${report.feedbackLoop.durableCapture ? 'verified' : 'failed'}`);
349
+ lines.push(` Recommendation: ${report.feedbackLoop.recommendation}`);
211
350
 
212
351
  if (report.warnings.length > 0) {
213
352
  lines.push('');
@@ -226,6 +365,9 @@ module.exports = {
226
365
  detectRuntimeIsolation,
227
366
  collectBootstrapFiles,
228
367
  summarizePermissionTier,
368
+ detectHookAutoCapture,
369
+ probeFeedbackCapture,
370
+ assessFeedbackLoop,
229
371
  generateAgentReadinessReport,
230
372
  reportToText,
231
373
  };