thumbgate 1.4.3 → 1.4.4

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 (266) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.well-known/mcp/server-card.json +1 -1
  4. package/adapters/README.md +1 -1
  5. package/adapters/claude/.mcp.json +2 -2
  6. package/adapters/codex/config.toml +2 -2
  7. package/adapters/mcp/server-stdio.js +1 -1
  8. package/adapters/opencode/opencode.json +1 -1
  9. package/package.json +157 -9
  10. package/scripts/statusline.sh +1 -0
  11. package/src/api/server.js +113 -16
  12. package/src/index.js +3 -0
  13. package/.claude-plugin/bundle/icon.png +0 -0
  14. package/.claude-plugin/bundle/icon.svg +0 -18
  15. package/.claude-plugin/bundle/server/index.js +0 -24
  16. package/adapters/chatgpt/INSTALL.md +0 -158
  17. package/adapters/perplexity/.mcp.json +0 -36
  18. package/adapters/perplexity/config.toml +0 -16
  19. package/adapters/perplexity/opencode.json +0 -29
  20. package/bin/memory.sh +0 -64
  21. package/bin/obsidian-sync.sh +0 -20
  22. package/plugins/amp-skill/INSTALL.md +0 -52
  23. package/plugins/amp-skill/SKILL.md +0 -64
  24. package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +0 -22
  25. package/plugins/claude-codex-bridge/.mcp.json +0 -14
  26. package/plugins/claude-codex-bridge/INSTALL.md +0 -43
  27. package/plugins/claude-codex-bridge/README.md +0 -46
  28. package/plugins/claude-codex-bridge/scripts/codex-bridge.js +0 -286
  29. package/plugins/claude-codex-bridge/skills/adversarial-review/SKILL.md +0 -24
  30. package/plugins/claude-codex-bridge/skills/result/SKILL.md +0 -22
  31. package/plugins/claude-codex-bridge/skills/review/SKILL.md +0 -28
  32. package/plugins/claude-codex-bridge/skills/second-pass/SKILL.md +0 -27
  33. package/plugins/claude-codex-bridge/skills/setup/SKILL.md +0 -21
  34. package/plugins/claude-codex-bridge/skills/status/SKILL.md +0 -19
  35. package/plugins/claude-skill/INSTALL.md +0 -55
  36. package/plugins/claude-skill/SKILL.md +0 -46
  37. package/plugins/codex-profile/.codex-plugin/plugin.json +0 -43
  38. package/plugins/codex-profile/.mcp.json +0 -14
  39. package/plugins/codex-profile/AGENTS.md +0 -20
  40. package/plugins/codex-profile/INSTALL.md +0 -89
  41. package/plugins/codex-profile/README.md +0 -61
  42. package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +0 -23
  43. package/plugins/cursor-marketplace/CHANGELOG.md +0 -30
  44. package/plugins/cursor-marketplace/LICENSE +0 -21
  45. package/plugins/cursor-marketplace/README.md +0 -124
  46. package/plugins/cursor-marketplace/agents/reliability-reviewer.md +0 -31
  47. package/plugins/cursor-marketplace/assets/logo-400x400.png +0 -0
  48. package/plugins/cursor-marketplace/commands/capture-feedback.md +0 -33
  49. package/plugins/cursor-marketplace/commands/check-gates.md +0 -25
  50. package/plugins/cursor-marketplace/commands/show-lessons.md +0 -27
  51. package/plugins/cursor-marketplace/hooks/hooks.json +0 -10
  52. package/plugins/cursor-marketplace/mcp.json +0 -14
  53. package/plugins/cursor-marketplace/rules/feedback-capture.mdc +0 -34
  54. package/plugins/cursor-marketplace/rules/pre-action-gates.mdc +0 -30
  55. package/plugins/cursor-marketplace/rules/session-continuity.mdc +0 -28
  56. package/plugins/cursor-marketplace/scripts/gate-check.sh +0 -21
  57. package/plugins/cursor-marketplace/skills/capture-feedback/SKILL.md +0 -48
  58. package/plugins/cursor-marketplace/skills/prevention-rules/SKILL.md +0 -31
  59. package/plugins/cursor-marketplace/skills/recall-context/SKILL.md +0 -30
  60. package/plugins/cursor-marketplace/skills/search-lessons/SKILL.md +0 -33
  61. package/plugins/gemini-extension/INSTALL.md +0 -92
  62. package/plugins/gemini-extension/gemini_prompt.txt +0 -14
  63. package/plugins/gemini-extension/tool_contract.json +0 -45
  64. package/plugins/opencode-profile/INSTALL.md +0 -57
  65. package/public/assets/instagram-card.png +0 -0
  66. package/public/assets/tiktok-agent-memory.mp4 +0 -0
  67. package/public/blog.html +0 -474
  68. package/public/compare/mem0.html +0 -189
  69. package/public/compare/speclock.html +0 -180
  70. package/public/compare.html +0 -310
  71. package/public/dashboard.html +0 -1100
  72. package/public/guide.html +0 -317
  73. package/public/guides/claude-code-prevent-repeated-mistakes.html +0 -161
  74. package/public/guides/codex-cli-guardrails.html +0 -158
  75. package/public/guides/cursor-prevent-repeated-mistakes.html +0 -161
  76. package/public/guides/pre-action-gates.html +0 -162
  77. package/public/guides/stop-repeated-ai-agent-mistakes.html +0 -159
  78. package/public/index.html +0 -1225
  79. package/public/js/buyer-intent.js +0 -252
  80. package/public/learn/agent-harness-pattern.html +0 -180
  81. package/public/learn/ai-agent-persistent-memory.html +0 -203
  82. package/public/learn/learn.css +0 -45
  83. package/public/learn/mcp-pre-action-gates-explained.html +0 -172
  84. package/public/learn/stop-ai-agent-force-push.html +0 -134
  85. package/public/learn/vibe-coding-safety-net.html +0 -142
  86. package/public/learn.html +0 -274
  87. package/public/lessons.html +0 -967
  88. package/public/llm-context.md +0 -156
  89. package/public/pro.html +0 -1087
  90. package/public/vercel.json +0 -8
  91. package/scripts/a2ui-engine.js +0 -73
  92. package/scripts/adk-consolidator.js +0 -274
  93. package/scripts/agent-security-hardening.js +0 -225
  94. package/scripts/ai-search-visibility.js +0 -116
  95. package/scripts/autonomous-sales-agent.js +0 -39
  96. package/scripts/autoresearch-runner.js +0 -216
  97. package/scripts/background-agent-governance.js +0 -229
  98. package/scripts/behavioral-extraction.js +0 -93
  99. package/scripts/budget-enforcer.js +0 -173
  100. package/scripts/budget-guard.js +0 -173
  101. package/scripts/build-claude-mcpb.js +0 -255
  102. package/scripts/build-codex-plugin.js +0 -152
  103. package/scripts/capture-railway-diagnostics.sh +0 -97
  104. package/scripts/changeset-check.js +0 -372
  105. package/scripts/check-congruence.js +0 -443
  106. package/scripts/computer-use-firewall.js +0 -280
  107. package/scripts/content-engine/linkedin-content-generator.js +0 -154
  108. package/scripts/content-engine/output/linkedin-memento-validation.md +0 -17
  109. package/scripts/content-engine/output/linkedin-posts-2026-04-09.md +0 -175
  110. package/scripts/content-engine/reddit-thread-finder.js +0 -154
  111. package/scripts/context-engine.js +0 -710
  112. package/scripts/daily-digest.js +0 -11
  113. package/scripts/data-governance.js +0 -173
  114. package/scripts/deploy-gcp.sh +0 -44
  115. package/scripts/deploy-policy.js +0 -249
  116. package/scripts/disagreement-mining.js +0 -315
  117. package/scripts/dpo-optimizer.js +0 -206
  118. package/scripts/ensure-repo-bootstrap.js +0 -130
  119. package/scripts/ephemeral-agent-store.js +0 -212
  120. package/scripts/eval-harness.js +0 -56
  121. package/scripts/export-kto-pairs.js +0 -309
  122. package/scripts/export-training.js +0 -446
  123. package/scripts/feedback-fallback.js +0 -111
  124. package/scripts/feedback-inbox-read.js +0 -162
  125. package/scripts/feedback-root-consolidator.js +0 -233
  126. package/scripts/feedback-to-memory.js +0 -185
  127. package/scripts/gate-satisfy.js +0 -42
  128. package/scripts/generate-paperbanana-diagrams.sh +0 -99
  129. package/scripts/generate-pretool-hook.sh +0 -40
  130. package/scripts/github-about.js +0 -430
  131. package/scripts/github-outreach.js +0 -65
  132. package/scripts/gtm-revenue-loop.js +0 -535
  133. package/scripts/hallucination-detector.js +0 -226
  134. package/scripts/hf-papers.js +0 -317
  135. package/scripts/hook-auto-capture.sh +0 -100
  136. package/scripts/hook-stop-pr-thread-check.sh +0 -68
  137. package/scripts/hook-stop-self-score.sh +0 -51
  138. package/scripts/hook-stop-verify-deploy.sh +0 -31
  139. package/scripts/hook-verify-before-done.sh +0 -20
  140. package/scripts/managed-dpo-export.js +0 -91
  141. package/scripts/markdown-escape.js +0 -12
  142. package/scripts/marketing-experiment.js +0 -657
  143. package/scripts/memalign-recall.js +0 -111
  144. package/scripts/memory-migration.js +0 -296
  145. package/scripts/meta-policy.js +0 -190
  146. package/scripts/metered-billing.js +0 -16
  147. package/scripts/model-tier-router.js +0 -310
  148. package/scripts/money-watcher.js +0 -218
  149. package/scripts/multi-hop-recall.js +0 -240
  150. package/scripts/per-step-scoring.js +0 -163
  151. package/scripts/perplexity-command-center.js +0 -644
  152. package/scripts/perplexity-marketing.js +0 -454
  153. package/scripts/pii-scanner.js +0 -153
  154. package/scripts/plan-gate.js +0 -154
  155. package/scripts/post-everywhere.js +0 -341
  156. package/scripts/post-to-x-retry.sh +0 -22
  157. package/scripts/post-to-x.js +0 -369
  158. package/scripts/pr-manager.js +0 -421
  159. package/scripts/principle-extractor.js +0 -162
  160. package/scripts/pro-features.js +0 -41
  161. package/scripts/prompt-dlp.js +0 -222
  162. package/scripts/prove-adapters.js +0 -860
  163. package/scripts/prove-attribution.js +0 -361
  164. package/scripts/prove-automation.js +0 -651
  165. package/scripts/prove-autoresearch.js +0 -304
  166. package/scripts/prove-claim-verification.js +0 -277
  167. package/scripts/prove-cloudflare-sandbox.js +0 -161
  168. package/scripts/prove-data-pipeline.js +0 -408
  169. package/scripts/prove-data-quality.js +0 -227
  170. package/scripts/prove-evolution.js +0 -352
  171. package/scripts/prove-harnesses.js +0 -287
  172. package/scripts/prove-intelligence.js +0 -257
  173. package/scripts/prove-lancedb.js +0 -425
  174. package/scripts/prove-local-intelligence.js +0 -340
  175. package/scripts/prove-loop-closure.js +0 -263
  176. package/scripts/prove-packaged-runtime.js +0 -327
  177. package/scripts/prove-predictive-insights.js +0 -355
  178. package/scripts/prove-runtime.js +0 -363
  179. package/scripts/prove-seo-gsd.js +0 -234
  180. package/scripts/prove-settings.js +0 -279
  181. package/scripts/prove-subway-upgrades.js +0 -277
  182. package/scripts/prove-tessl.js +0 -229
  183. package/scripts/prove-training-export.js +0 -325
  184. package/scripts/prove-workflow-contract.js +0 -112
  185. package/scripts/prove-xmemory.js +0 -332
  186. package/scripts/publish-decision.js +0 -159
  187. package/scripts/ralph-loop.js +0 -376
  188. package/scripts/ralph-mode-ci.js +0 -434
  189. package/scripts/reddit-dm-outreach.js +0 -192
  190. package/scripts/reddit-monitor-cron.sh +0 -26
  191. package/scripts/reminder-engine.js +0 -132
  192. package/scripts/revenue-status.js +0 -472
  193. package/scripts/rotate-stripe-webhook-secret.js +0 -314
  194. package/scripts/schedule-manager.js +0 -249
  195. package/scripts/self-healing-check.js +0 -193
  196. package/scripts/session-analyzer.js +0 -533
  197. package/scripts/shieldcortex-memory-firewall-runner.mjs +0 -53
  198. package/scripts/skill-exporter.js +0 -260
  199. package/scripts/skill-materializer.js +0 -134
  200. package/scripts/skill-packs.js +0 -136
  201. package/scripts/skill-proposer.js +0 -99
  202. package/scripts/skill-quality-tracker.js +0 -282
  203. package/scripts/slow-loop.js +0 -72
  204. package/scripts/social-analytics/db/marketing-db.js +0 -179
  205. package/scripts/social-analytics/db/schema.sql +0 -55
  206. package/scripts/social-analytics/digest.js +0 -256
  207. package/scripts/social-analytics/engagement-audit.js +0 -185
  208. package/scripts/social-analytics/generate-instagram-card.js +0 -123
  209. package/scripts/social-analytics/generate-slides.js +0 -268
  210. package/scripts/social-analytics/instagram-thumbgate-post.js +0 -111
  211. package/scripts/social-analytics/install-growth-automation.js +0 -114
  212. package/scripts/social-analytics/load-env.js +0 -77
  213. package/scripts/social-analytics/mcp-server.js +0 -289
  214. package/scripts/social-analytics/normalizer.js +0 -580
  215. package/scripts/social-analytics/notify.js +0 -162
  216. package/scripts/social-analytics/poll-all.js +0 -107
  217. package/scripts/social-analytics/pollers/github.js +0 -195
  218. package/scripts/social-analytics/pollers/instagram.js +0 -253
  219. package/scripts/social-analytics/pollers/linkedin.js +0 -340
  220. package/scripts/social-analytics/pollers/plausible.js +0 -245
  221. package/scripts/social-analytics/pollers/reddit.js +0 -306
  222. package/scripts/social-analytics/pollers/threads.js +0 -233
  223. package/scripts/social-analytics/pollers/tiktok.js +0 -203
  224. package/scripts/social-analytics/pollers/x.js +0 -227
  225. package/scripts/social-analytics/pollers/youtube.js +0 -304
  226. package/scripts/social-analytics/pollers/zernio.js +0 -183
  227. package/scripts/social-analytics/post-video.js +0 -316
  228. package/scripts/social-analytics/publish-instagram-thumbgate.js +0 -104
  229. package/scripts/social-analytics/publish-thumbgate-launch.js +0 -322
  230. package/scripts/social-analytics/publishers/devto.js +0 -122
  231. package/scripts/social-analytics/publishers/instagram.js +0 -317
  232. package/scripts/social-analytics/publishers/linkedin.js +0 -294
  233. package/scripts/social-analytics/publishers/reddit.js +0 -385
  234. package/scripts/social-analytics/publishers/threads.js +0 -275
  235. package/scripts/social-analytics/publishers/tiktok.js +0 -217
  236. package/scripts/social-analytics/publishers/x.js +0 -259
  237. package/scripts/social-analytics/publishers/youtube.js +0 -223
  238. package/scripts/social-analytics/publishers/zernio.js +0 -568
  239. package/scripts/social-analytics/reconcile-thumbgate-campaign.js +0 -165
  240. package/scripts/social-analytics/run-digest.js +0 -34
  241. package/scripts/social-analytics/schedule-thumbgate-campaign.js +0 -275
  242. package/scripts/social-analytics/store.js +0 -455
  243. package/scripts/social-analytics/sync-launch-assets.js +0 -185
  244. package/scripts/social-analytics/utm.js +0 -143
  245. package/scripts/social-pipeline.js +0 -2626
  246. package/scripts/social-post-hourly.js +0 -228
  247. package/scripts/social-quality-gate.js +0 -134
  248. package/scripts/social-reply-monitor.js +0 -592
  249. package/scripts/status-dashboard.js +0 -155
  250. package/scripts/stripe-live-status.js +0 -115
  251. package/scripts/subagent-profiles.js +0 -79
  252. package/scripts/sync-branch-protection.js +0 -340
  253. package/scripts/sync-gh-secrets-from-env.sh +0 -70
  254. package/scripts/sync-github-about.js +0 -55
  255. package/scripts/sync-version.js +0 -479
  256. package/scripts/synthetic-dpo.js +0 -234
  257. package/scripts/tessl-export.js +0 -369
  258. package/scripts/test-coverage.js +0 -128
  259. package/scripts/thumbgate-bench.js +0 -494
  260. package/scripts/thumbgate_session_start.sh +0 -32
  261. package/scripts/train_from_feedback.py +0 -929
  262. package/scripts/validate-feedback.js +0 -581
  263. package/scripts/verify-obsidian-setup.sh +0 -269
  264. package/scripts/verify-run.js +0 -269
  265. package/scripts/weekly-auto-post.js +0 -124
  266. package/scripts/x-autonomous-marketing.js +0 -139
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate-marketplace",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "owner": {
5
5
  "name": "Igor Ganapolsky",
6
6
  "email": "ig5973700@gmail.com"
@@ -13,7 +13,7 @@
13
13
  "source": "npm",
14
14
  "package": "thumbgate"
15
15
  },
16
- "version": "1.4.3",
16
+ "version": "1.4.4",
17
17
  "author": {
18
18
  "name": "Igor Ganapolsky"
19
19
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "thumbgate",
3
3
  "description": "Type 👍 or 👎 on any agent action. ThumbGate captures it, distills a lesson, and blocks the pattern from repeating. One thumbs-down = the agent physically cannot make that mistake again. 33 pre-action gates, budget enforcement, self-protection, and NIST/SOC2 compliance tags.",
4
- "version": "1.4.3",
4
+ "version": "1.4.4",
5
5
  "author": {
6
6
  "name": "Igor Ganapolsky"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "ThumbGate — 👍👎 feedback that teaches your AI agent. Thumbs down a mistake, it never happens again.",
5
5
  "homepage": "https://github.com/IgorGanapolsky/thumbgate",
6
6
  "transport": "stdio",
@@ -3,7 +3,7 @@
3
3
  - `chatgpt/openapi.yaml`: import into GPT Actions.
4
4
  - `gemini/function-declarations.json`: Gemini function-calling definitions.
5
5
  - `mcp/server-stdio.js`: underlying local MCP stdio server implementation.
6
- - `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@1.4.3 thumbgate serve`.
6
+ - `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@1.4.4 thumbgate serve`.
7
7
  - `codex/config.toml`: example Codex MCP profile section using the same version-pinned portable launcher.
8
8
  - `amp/skills/thumbgate-feedback/SKILL.md`: Amp skill template.
9
9
  - `opencode/opencode.json`: portable OpenCode MCP profile using the same version-pinned portable launcher.
@@ -2,13 +2,13 @@
2
2
  "mcpServers": {
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
- "args": ["--yes", "--package", "thumbgate@1.4.3", "thumbgate", "serve"]
5
+ "args": ["--yes", "--package", "thumbgate@1.4.4", "thumbgate", "serve"]
6
6
  }
7
7
  },
8
8
  "hooks": {
9
9
  "preToolUse": {
10
10
  "command": "npx",
11
- "args": ["--yes", "--package", "thumbgate@1.4.3", "thumbgate", "gate-check"]
11
+ "args": ["--yes", "--package", "thumbgate@1.4.4", "thumbgate", "gate-check"]
12
12
  }
13
13
  }
14
14
  }
@@ -1,9 +1,9 @@
1
1
  # Codex MCP profile (copy into ~/.codex/config.toml or merge section)
2
2
  [mcp_servers.thumbgate]
3
3
  command = "npx"
4
- args = ["--yes", "--package", "thumbgate@1.4.3", "thumbgate", "serve"]
4
+ args = ["--yes", "--package", "thumbgate@1.4.4", "thumbgate", "serve"]
5
5
 
6
6
  # Hard PreToolUse hook for Codex
7
7
  [hooks.pre_tool_use]
8
8
  command = "npx"
9
- args = ["--yes", "--package", "thumbgate@1.4.3", "thumbgate", "gate-check"]
9
+ args = ["--yes", "--package", "thumbgate@1.4.4", "thumbgate", "gate-check"]
@@ -124,7 +124,7 @@ const {
124
124
  finalizeSession: finalizeFeedbackSession,
125
125
  } = require('../../scripts/feedback-session');
126
126
 
127
- const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.4.3' };
127
+ const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.4.4' };
128
128
  const COMMERCE_CATEGORIES = [
129
129
  'product_recommendation',
130
130
  'brand_compliance',
@@ -7,7 +7,7 @@
7
7
  "npx",
8
8
  "--yes",
9
9
  "--package",
10
- "thumbgate@1.4.3",
10
+ "thumbgate@1.4.4",
11
11
  "thumbgate",
12
12
  "serve"
13
13
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Self-improving agent governance: type thumbs-up or thumbs-down on any AI agent action. ThumbGate turns every mistake into a prevention rule and blocks the pattern from repeating. One thumbs-down, never again. 33 pre-action gates, budget enforcement, and self-protection for Claude Code, Cursor, Codex, Gemini CLI, and Amp.",
5
5
  "homepage": "https://thumbgate-production.up.railway.app",
6
6
  "repository": {
@@ -10,24 +10,172 @@
10
10
  "bugs": {
11
11
  "url": "https://github.com/IgorGanapolsky/ThumbGate/issues"
12
12
  },
13
- "main": "scripts/feedback-loop.js",
13
+ "main": "src/index.js",
14
14
  "bin": {
15
15
  "thumbgate": "bin/cli.js"
16
16
  },
17
17
  "files": [
18
- "bin/",
18
+ "bin/cli.js",
19
+ "bin/postinstall.js",
19
20
  "src/",
20
- "scripts/",
21
- "adapters/",
21
+ "adapters/mcp/server-stdio.js",
22
+ "adapters/chatgpt/openapi.yaml",
23
+ "adapters/gemini/function-declarations.json",
24
+ "adapters/claude/.mcp.json",
25
+ "adapters/codex/config.toml",
26
+ "adapters/opencode/opencode.json",
27
+ "adapters/amp/skills/thumbgate-feedback/SKILL.md",
28
+ "adapters/forge/forge.yaml",
22
29
  "config/",
23
- "plugins/",
24
30
  "skills/",
25
31
  "openapi/",
26
- "public/",
27
32
  ".well-known/",
28
- ".claude-plugin/",
33
+ ".claude-plugin/plugin.json",
34
+ ".claude-plugin/marketplace.json",
35
+ ".claude-plugin/README.md",
29
36
  "README.md",
30
- "LICENSE"
37
+ "LICENSE",
38
+ "scripts/agent-readiness.js",
39
+ "scripts/access-anomaly-detector.js",
40
+ "scripts/agentic-data-pipeline.js",
41
+ "scripts/analytics-report.js",
42
+ "scripts/analytics-window.js",
43
+ "scripts/async-job-runner.js",
44
+ "scripts/audit-trail.js",
45
+ "scripts/auto-promote-gates.js",
46
+ "scripts/auto-wire-hooks.js",
47
+ "scripts/belief-update.js",
48
+ "scripts/billing-setup.js",
49
+ "scripts/billing.js",
50
+ "scripts/bot-detector.js",
51
+ "scripts/build-metadata.js",
52
+ "scripts/claude-feedback-sync.js",
53
+ "scripts/cli-demo.js",
54
+ "scripts/cli-feedback.js",
55
+ "scripts/cli-schema.js",
56
+ "scripts/cli-status.js",
57
+ "scripts/cli-telemetry.js",
58
+ "scripts/cloudflare-dynamic-sandbox.js",
59
+ "scripts/code-reasoning.js",
60
+ "scripts/codegraph-context.js",
61
+ "scripts/commercial-offer.js",
62
+ "scripts/context-manager.js",
63
+ "scripts/contextfs.js",
64
+ "scripts/conversation-context.js",
65
+ "scripts/creator-campaigns.js",
66
+ "scripts/cross-encoder-reranker.js",
67
+ "scripts/daemon-manager.js",
68
+ "scripts/dashboard-render-spec.js",
69
+ "scripts/dashboard.js",
70
+ "scripts/decision-journal.js",
71
+ "scripts/delegation-runtime.js",
72
+ "scripts/dispatch-brief.js",
73
+ "scripts/distribution-surfaces.js",
74
+ "scripts/docker-sandbox-planner.js",
75
+ "scripts/document-intake.js",
76
+ "scripts/evolution-state.js",
77
+ "scripts/experiment-tracker.js",
78
+ "scripts/explore-subcommands.js",
79
+ "scripts/explore.js",
80
+ "scripts/export-databricks-bundle.js",
81
+ "scripts/export-dpo-pairs.js",
82
+ "scripts/export-hf-dataset.js",
83
+ "scripts/failure-diagnostics.js",
84
+ "scripts/feedback-attribution.js",
85
+ "scripts/feedback-history-distiller.js",
86
+ "scripts/feedback-loop.js",
87
+ "scripts/feedback-paths.js",
88
+ "scripts/feedback-quality.js",
89
+ "scripts/feedback-schema.js",
90
+ "scripts/feedback-session.js",
91
+ "scripts/feedback-to-rules.js",
92
+ "scripts/filesystem-search.js",
93
+ "scripts/fs-utils.js",
94
+ "scripts/funnel-analytics.js",
95
+ "scripts/gate-stats.js",
96
+ "scripts/gate-templates.js",
97
+ "scripts/gates-engine.js",
98
+ "scripts/harness-selector.js",
99
+ "scripts/history-distiller.js",
100
+ "scripts/hook-runtime.js",
101
+ "scripts/hook-thumbgate-cache-updater.js",
102
+ "scripts/hosted-config.js",
103
+ "scripts/hosted-job-launcher.js",
104
+ "scripts/hybrid-feedback-context.js",
105
+ "scripts/install-mcp.js",
106
+ "scripts/intent-router.js",
107
+ "scripts/internal-agent-bootstrap.js",
108
+ "scripts/intervention-policy.js",
109
+ "scripts/jsonl-watcher.js",
110
+ "scripts/lesson-db.js",
111
+ "scripts/lesson-inference.js",
112
+ "scripts/lesson-reranker.js",
113
+ "scripts/lesson-retrieval.js",
114
+ "scripts/lesson-rotation.js",
115
+ "scripts/lesson-search.js",
116
+ "scripts/lesson-synthesis.js",
117
+ "scripts/license.js",
118
+ "scripts/llm-client.js",
119
+ "scripts/local-model-profile.js",
120
+ "scripts/managed-lesson-agent.js",
121
+ "scripts/mcp-config.js",
122
+ "scripts/mcp-policy.js",
123
+ "scripts/memory-firewall.js",
124
+ "scripts/meta-agent-loop.js",
125
+ "scripts/natural-language-harness.js",
126
+ "scripts/obsidian-export.js",
127
+ "scripts/operational-dashboard.js",
128
+ "scripts/operational-integrity.js",
129
+ "scripts/operational-summary.js",
130
+ "scripts/optimize-context.js",
131
+ "scripts/org-dashboard.js",
132
+ "scripts/partner-orchestration.js",
133
+ "scripts/perplexity-client.js",
134
+ "scripts/predictive-insights.js",
135
+ "scripts/pro-local-dashboard.js",
136
+ "scripts/problem-detail.js",
137
+ "scripts/product-feedback.js",
138
+ "scripts/profile-router.js",
139
+ "scripts/prompt-guard.js",
140
+ "scripts/published-cli.js",
141
+ "scripts/pulse.js",
142
+ "scripts/rate-limiter.js",
143
+ "scripts/reflector-agent.js",
144
+ "scripts/risk-scorer.js",
145
+ "scripts/rlaif-self-audit.js",
146
+ "scripts/rubric-engine.js",
147
+ "scripts/secret-scanner.js",
148
+ "scripts/security-scanner.js",
149
+ "scripts/self-distill-agent.js",
150
+ "scripts/self-heal.js",
151
+ "scripts/semantic-dedup.js",
152
+ "scripts/semantic-layer.js",
153
+ "scripts/seo-gsd.js",
154
+ "scripts/settings-hierarchy.js",
155
+ "scripts/skill-generator.js",
156
+ "scripts/slo-alert-engine.js",
157
+ "scripts/statusline-cache-path.js",
158
+ "scripts/statusline-lesson.js",
159
+ "scripts/statusline-links.js",
160
+ "scripts/statusline-local-stats.js",
161
+ "scripts/statusline-meta.js",
162
+ "scripts/statusline.sh",
163
+ "scripts/statusline-tower.js",
164
+ "scripts/telemetry-analytics.js",
165
+ "scripts/thompson-sampling.js",
166
+ "scripts/thumbgate-search.js",
167
+ "scripts/tool-registry.js",
168
+ "scripts/tool-kpi-tracker.js",
169
+ "scripts/user-profile.js",
170
+ "scripts/validate-workflow-contract.js",
171
+ "scripts/vector-store.js",
172
+ "scripts/verification-loop.js",
173
+ "scripts/webhook-delivery.js",
174
+ "scripts/workflow-runs.js",
175
+ "scripts/workflow-sentinel.js",
176
+ "scripts/workflow-sprint-intake.js",
177
+ "scripts/workspace-evolver.js",
178
+ "scripts/xmemory-lite.js"
31
179
  ],
32
180
  "scripts": {
33
181
  "postinstall": "node bin/postinstall.js || true",
@@ -155,6 +155,7 @@ osc_link() {
155
155
  *localhost*|*127.0.0.1*|"") printf '%s' "$label" ;;
156
156
  *) printf '\033]8;;%s\007%s\033]8;;\007' "$url" "$label" ;;
157
157
  esac
158
+ return 0
158
159
  }
159
160
 
160
161
  UP_ICON="👍"
package/src/api/server.js CHANGED
@@ -1063,38 +1063,131 @@ function loadProPageHtml(runtimeConfig, pageContext = {}) {
1063
1063
  return loadPublicMarketingTemplateHtml(PRO_PAGE_PATH, runtimeConfig, pageContext);
1064
1064
  }
1065
1065
 
1066
- function loadDashboardPageHtml(req, expectedApiKey) {
1067
- const template = fs.readFileSync(DASHBOARD_PAGE_PATH, 'utf-8');
1066
+ function readOptionalPublicTemplate(filePath) {
1067
+ try {
1068
+ return fs.readFileSync(filePath, 'utf-8');
1069
+ } catch (error) {
1070
+ if (error?.code === 'ENOENT') return null;
1071
+ throw error;
1072
+ }
1073
+ }
1074
+
1075
+ function resolveLocalPageBootstrap(req, expectedApiKey) {
1068
1076
  const forwardedHost = req.headers['x-forwarded-host'];
1069
1077
  const hostHeader = Array.isArray(forwardedHost)
1070
1078
  ? forwardedHost[0]
1071
1079
  : forwardedHost || req.headers.host || '';
1072
1080
  const localProBootstrap = process.env.THUMBGATE_PRO_MODE === '1' && Boolean(expectedApiKey) && isLoopbackHost(hostHeader);
1073
- // Developer override: auth is disabled (expectedApiKey===null), auto-connect with dummy key
1074
1081
  const devOverride = expectedApiKey === null && isLoopbackHost(hostHeader);
1075
1082
  const bootstrapActive = localProBootstrap || devOverride;
1076
1083
  const serializedBootstrapKey = JSON.stringify(localProBootstrap ? expectedApiKey : devOverride ? 'dev-override' : '').replace(/</g, '\\u003c');
1077
1084
 
1085
+ return {
1086
+ bootstrapActive,
1087
+ serializedBootstrapKey,
1088
+ };
1089
+ }
1090
+
1091
+ function renderPackagedDashboardHtml({ bootstrapActive, serializedBootstrapKey }) {
1092
+ return `<!doctype html>
1093
+ <html lang="en">
1094
+ <head>
1095
+ <meta charset="utf-8">
1096
+ <meta name="viewport" content="width=device-width, initial-scale=1">
1097
+ <title>ThumbGate Dashboard</title>
1098
+ <style>
1099
+ :root { color-scheme: light dark; --bg:#0f172a; --panel:#111827; --text:#f8fafc; --muted:#94a3b8; --line:#334155; --accent:#22c55e; }
1100
+ body { margin:0; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:linear-gradient(135deg,#020617,#111827); color:var(--text); }
1101
+ main { max-width:920px; margin:0 auto; padding:48px 20px; }
1102
+ .panel { border:1px solid var(--line); border-radius:20px; background:rgba(15,23,42,.86); padding:28px; box-shadow:0 24px 80px rgba(0,0,0,.32); }
1103
+ .eyebrow { color:var(--accent); font-size:13px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
1104
+ h1 { font-size:clamp(32px,5vw,54px); line-height:1; margin:14px 0; }
1105
+ p { color:var(--muted); font-size:18px; line-height:1.6; }
1106
+ .grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-top:26px; }
1107
+ a { color:var(--text); text-decoration:none; }
1108
+ .card { display:block; border:1px solid var(--line); border-radius:16px; padding:18px; background:rgba(30,41,59,.7); }
1109
+ .card strong { display:block; margin-bottom:8px; }
1110
+ .card span { color:var(--muted); font-size:14px; line-height:1.5; }
1111
+ </style>
1112
+ <script>
1113
+ window.THUMBGATE_DASHBOARD_BOOTSTRAP = { enabled: ${bootstrapActive ? 'true' : 'false'}, apiKey: ${serializedBootstrapKey} };
1114
+ </script>
1115
+ </head>
1116
+ <body>
1117
+ <main>
1118
+ <section class="panel">
1119
+ <div class="eyebrow">Packaged runtime</div>
1120
+ <h1>ThumbGate is running locally.</h1>
1121
+ <p>This lightweight npm dashboard is bundled without marketing assets, so installs stay small while core feedback, lessons, and API routes remain available.</p>
1122
+ <div class="grid">
1123
+ <a class="card" href="/v1/dashboard"><strong>Dashboard JSON</strong><span>Inspect feedback totals, lesson counts, and Reliability Gateway health.</span></a>
1124
+ <a class="card" href="/lessons"><strong>Lessons</strong><span>Review remembered thumbs-up/down lessons and enforcement context.</span></a>
1125
+ <a class="card" href="/health"><strong>Health</strong><span>Verify the installed package version and runtime status.</span></a>
1126
+ </div>
1127
+ </section>
1128
+ </main>
1129
+ </body>
1130
+ </html>`;
1131
+ }
1132
+
1133
+ function renderPackagedLessonsHtml({ bootstrapActive, serializedBootstrapKey }) {
1134
+ return `<!doctype html>
1135
+ <html lang="en">
1136
+ <head>
1137
+ <meta charset="utf-8">
1138
+ <meta name="viewport" content="width=device-width, initial-scale=1">
1139
+ <title>ThumbGate Lessons</title>
1140
+ <style>
1141
+ :root { color-scheme: light dark; --bg:#0f172a; --panel:#111827; --text:#f8fafc; --muted:#94a3b8; --line:#334155; --accent:#38bdf8; }
1142
+ body { margin:0; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:linear-gradient(135deg,#020617,#0f172a); color:var(--text); }
1143
+ main { max-width:920px; margin:0 auto; padding:48px 20px; }
1144
+ .panel { border:1px solid var(--line); border-radius:20px; background:rgba(15,23,42,.86); padding:28px; box-shadow:0 24px 80px rgba(0,0,0,.32); }
1145
+ .eyebrow { color:var(--accent); font-size:13px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
1146
+ h1 { font-size:clamp(32px,5vw,54px); line-height:1; margin:14px 0; }
1147
+ p { color:var(--muted); font-size:18px; line-height:1.6; }
1148
+ .actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:26px; }
1149
+ a { color:var(--text); text-decoration:none; border:1px solid var(--line); border-radius:999px; padding:12px 16px; background:rgba(30,41,59,.7); }
1150
+ </style>
1151
+ <script>
1152
+ window.THUMBGATE_LESSONS_BOOTSTRAP = { enabled: ${bootstrapActive ? 'true' : 'false'}, apiKey: ${serializedBootstrapKey} };
1153
+ </script>
1154
+ </head>
1155
+ <body>
1156
+ <main>
1157
+ <section class="panel">
1158
+ <div class="eyebrow">Packaged runtime</div>
1159
+ <h1>ThumbGate lessons are available.</h1>
1160
+ <p>The full hosted lessons UI is excluded from the npm tarball, but installed packages still expose the lesson APIs and detail pages needed for local agent feedback loops.</p>
1161
+ <div class="actions">
1162
+ <a href="/v1/lessons/search">Search lessons JSON</a>
1163
+ <a href="/v1/feedback/stats">Feedback stats JSON</a>
1164
+ <a href="/dashboard">Back to dashboard</a>
1165
+ </div>
1166
+ </section>
1167
+ </main>
1168
+ </body>
1169
+ </html>`;
1170
+ }
1171
+
1172
+ function loadDashboardPageHtml(req, expectedApiKey) {
1173
+ const bootstrap = resolveLocalPageBootstrap(req, expectedApiKey);
1174
+ const template = readOptionalPublicTemplate(DASHBOARD_PAGE_PATH);
1175
+ if (!template) return renderPackagedDashboardHtml(bootstrap);
1176
+
1078
1177
  return fillTemplate(template, {
1079
- '__DASHBOARD_BOOTSTRAP_KEY__': serializedBootstrapKey,
1080
- '__DASHBOARD_BOOTSTRAP_ENABLED__': bootstrapActive ? 'true' : 'false',
1178
+ '__DASHBOARD_BOOTSTRAP_KEY__': bootstrap.serializedBootstrapKey,
1179
+ '__DASHBOARD_BOOTSTRAP_ENABLED__': bootstrap.bootstrapActive ? 'true' : 'false',
1081
1180
  });
1082
1181
  }
1083
1182
 
1084
1183
  function loadLessonsPageHtml(req, expectedApiKey) {
1085
- const template = fs.readFileSync(LESSONS_PAGE_PATH, 'utf-8');
1086
- const forwardedHost = req.headers['x-forwarded-host'];
1087
- const hostHeader = Array.isArray(forwardedHost)
1088
- ? forwardedHost[0]
1089
- : forwardedHost || req.headers.host || '';
1090
- const localProBootstrap = process.env.THUMBGATE_PRO_MODE === '1' && Boolean(expectedApiKey) && isLoopbackHost(hostHeader);
1091
- const devOverride = expectedApiKey === null && isLoopbackHost(hostHeader);
1092
- const bootstrapActive = localProBootstrap || devOverride;
1093
- const serializedBootstrapKey = JSON.stringify(localProBootstrap ? expectedApiKey : devOverride ? 'dev-override' : '').replace(/</g, '\\u003c');
1184
+ const bootstrap = resolveLocalPageBootstrap(req, expectedApiKey);
1185
+ const template = readOptionalPublicTemplate(LESSONS_PAGE_PATH);
1186
+ if (!template) return renderPackagedLessonsHtml(bootstrap);
1094
1187
 
1095
1188
  return fillTemplate(template, {
1096
- '__LESSONS_BOOTSTRAP_KEY__': serializedBootstrapKey,
1097
- '__LESSONS_BOOTSTRAP_ENABLED__': bootstrapActive ? 'true' : 'false',
1189
+ '__LESSONS_BOOTSTRAP_KEY__': bootstrap.serializedBootstrapKey,
1190
+ '__LESSONS_BOOTSTRAP_ENABLED__': bootstrap.bootstrapActive ? 'true' : 'false',
1098
1191
  });
1099
1192
  }
1100
1193
 
@@ -5079,6 +5172,10 @@ module.exports = {
5079
5172
  getPosthogProxyPath,
5080
5173
  isAllowedPosthogProxyPath,
5081
5174
  renderSitemapXml,
5175
+ renderPackagedDashboardHtml,
5176
+ renderPackagedLessonsHtml,
5177
+ readOptionalPublicTemplate,
5178
+ resolveLocalPageBootstrap,
5082
5179
  },
5083
5180
  };
5084
5181
 
package/src/index.js ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = require('../scripts/feedback-loop');
Binary file
@@ -1,18 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-labelledby="title desc">
2
- <title>ThumbGate</title>
3
- <desc>Gateway icon for the Claude Desktop workflow hardening extension.</desc>
4
- <defs>
5
- <linearGradient id="bg" x1="0%" x2="100%" y1="0%" y2="100%">
6
- <stop offset="0%" stop-color="#111827"/>
7
- <stop offset="100%" stop-color="#1f2937"/>
8
- </linearGradient>
9
- <linearGradient id="gate" x1="0%" x2="100%" y1="0%" y2="100%">
10
- <stop offset="0%" stop-color="#f97316"/>
11
- <stop offset="100%" stop-color="#fb7185"/>
12
- </linearGradient>
13
- </defs>
14
- <rect width="512" height="512" rx="96" fill="url(#bg)"/>
15
- <path fill="url(#gate)" d="M152 128h208c17.7 0 32 14.3 32 32v64h-64v-32H184v128h144v-32h64v64c0 17.7-14.3 32-32 32H152c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32Z"/>
16
- <path fill="#fff4ed" d="M248 180h96v48h-48v56h48v48h-96z"/>
17
- <circle cx="196" cy="256" r="26" fill="#fef3c7"/>
18
- </svg>
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
-
4
- const path = require('path');
5
- const { spawn } = require('child_process');
6
-
7
- const cliPath = path.join(__dirname, '..', '..', 'bin', 'cli.js');
8
- const child = spawn(process.execPath, [cliPath, 'serve'], {
9
- stdio: 'inherit',
10
- env: process.env,
11
- });
12
-
13
- child.on('exit', (code, signal) => {
14
- if (signal) {
15
- process.kill(process.pid, signal);
16
- return;
17
- }
18
- process.exit(code ?? 1);
19
- });
20
-
21
- child.on('error', (error) => {
22
- console.error(`[thumbgate] Failed to launch Claude Desktop bundle runtime: ${error.message}`);
23
- process.exit(1);
24
- });
@@ -1,158 +0,0 @@
1
- # ChatGPT GPT Actions: ThumbGate Install
2
-
3
- Open the published ThumbGate GPT directly:
4
-
5
- https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate
6
-
7
- Use the GPT as the public front door: paste an AI action to check, save a thumbs-up/down lesson, write a Pre-Action Gate, install ThumbGate for an agent, or export proof.
8
-
9
- Users do **not** have to keep chatting inside the ThumbGate GPT for enforcement. The GPT is the fast demo, guided setup path, and ChatGPT memory surface. Real enforcement for coding agents still runs locally through ThumbGate hooks after `npx thumbgate init`.
10
-
11
- Marketing rule: every landing page, README, social post, and plugin listing should point to the live GPT before asking a cold user to read OpenAPI docs.
12
-
13
- ## GPT Store path
14
-
15
- 1. Open the direct GPT URL: https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate
16
- 2. If ChatGPT does not open it for your account, open **Explore GPTs**.
17
- 3. Search for `ThumbGate`.
18
- 4. Choose the GPT by **Igor Ganapolsky** in the **Programming** category.
19
-
20
- ## 30-second user flow
21
-
22
- 1. Paste a proposed AI action, command, merge, deploy, file edit, email, payment, or API call.
23
- 2. ThumbGate evaluates whether to allow, block, or require a checkpoint before the action runs.
24
- 3. After any answer or agent run, reply with `thumbs up:` or `thumbs down:` plus one concrete sentence.
25
- 4. ThumbGate saves the lesson, refreshes prevention rules when patterns repeat, and can show what it remembers.
26
- 5. When the user is ready to enforce outside ChatGPT, send them to `npx thumbgate init` for Claude Code, Cursor, Codex, Gemini CLI, Amp, OpenCode, or another MCP-compatible agent.
27
-
28
- Regular users should never need to know MCP, OpenAPI, Actions, DPO, Thompson Sampling, or schema validation. The GPT should explain the loop as: "One signal becomes one remembered rule."
29
-
30
- ## GPT profile card
31
-
32
- Use this copy in GPT Builder instead of the generic "AI safety gate" framing:
33
-
34
- Short description:
35
-
36
- ```text
37
- Turn thumbs-down into prevention gates
38
- ```
39
-
40
- Full description:
41
-
42
- ```text
43
- Paste a proposed AI action or reply thumbs up/down after an answer. ThumbGate captures the lesson, searches prior mistakes, writes Pre-Action Gates, and tells you when to allow, block, or checkpoint. Built for developers using AI agents and proof-backed Reliability Gateway workflows.
44
- ```
45
-
46
- Conversation starters:
47
-
48
- 1. `Check this agent action before it runs: git push --force --tags`
49
- 2. `Turn this mistake into a ThumbGate rule: the agent edited generated files again.`
50
- 3. `Install ThumbGate for Claude Code or Codex in this repo.`
51
- 4. `Search my saved lessons before you answer.`
52
-
53
- Use typed chat replies. ChatGPT's native feedback buttons may send feedback to OpenAI, but they should not be described as the ThumbGate capture path unless OpenAI exposes them to GPT Actions.
54
-
55
- ## Pre-action gate flow
56
-
57
- Use this when the user asks whether an AI agent should run a proposed action, command, file edit, deployment, merge, or publish step:
58
-
59
- 1. The GPT calls `evaluateDecision` (`POST /v1/decisions/evaluate`) before answering.
60
- 2. If the response has `decisionControl.executionMode: "blocked"`, the GPT says the action is blocked and explains the returned reason.
61
- 3. If the response has `decisionControl.executionMode: "checkpoint_required"`, the GPT asks for explicit confirmation before proceeding.
62
- 4. If the response has `decisionControl.executionMode: "auto_execute"`, the GPT can say the action is allowed and summarize why.
63
-
64
- Plain thumbs-up/down feedback is the memory loop. The decision endpoint is the gate loop. Do not claim hard blocking unless the decision endpoint, a saved lesson, or a prevention rule was actually applied.
65
-
66
- ## Best first GPT message
67
-
68
- Use this as the first response:
69
-
70
- ```text
71
- Paste an AI action to check, or tell me what went right/wrong. I can block risky actions, save the lesson, write a prevention gate, or show what ThumbGate already remembers.
72
- ```
73
-
74
- ## Prerequisites
75
-
76
- - A ChatGPT Plus or Team account (Custom GPTs require a paid plan)
77
- - ThumbGate API running at `https://thumbgate-production.up.railway.app`
78
- - Privacy policy URL: `https://thumbgate-production.up.railway.app/privacy`
79
- - Owner-managed `THUMBGATE_API_KEY` for one-time GPT Builder Actions auth
80
-
81
- Regular GPT users should not need an API key, JSON payload, OpenAPI knowledge, or developer setup. They should only see the thumbs-up/down memory loop.
82
-
83
- ## Step 1 — Open GPT Builder
84
-
85
- 1. Go to [https://chat.openai.com/gpts/editor](https://chat.openai.com/gpts/editor)
86
- 2. Click **Create a GPT**
87
- 3. Switch to the **Configure** tab
88
-
89
- ## Step 2 — Add Actions
90
-
91
- 1. Scroll to the **Actions** section
92
- 2. Click **Create new action**
93
- 3. Click **Import from URL** — paste your hosted spec URL:
94
- ```
95
- https://thumbgate-production.up.railway.app/openapi.yaml
96
- ```
97
- Or click **Upload file** and select:
98
- ```
99
- adapters/chatgpt/openapi.yaml
100
- ```
101
-
102
- ## Step 3 — Set Authentication
103
-
104
- In the Actions panel:
105
-
106
- 1. Select **Authentication type: API Key**
107
- 2. **Auth type**: Bearer
108
- 3. **API Key**: paste your `THUMBGATE_API_KEY` value
109
-
110
- This is an owner setup field. Do not ask regular GPT users to provide an API key.
111
-
112
- ## Step 4 — Update the Server URL
113
-
114
- In the imported spec, confirm the `servers.url` points to your deployed API:
115
-
116
- ```yaml
117
- servers:
118
- - url: https://thumbgate-production.up.railway.app
119
- ```
120
-
121
- If you uploaded the file, edit the server URL in the GPT Actions editor.
122
-
123
- ## Step 5 — Verify
124
-
125
- Click **Test** on the `captureFeedback` action:
126
-
127
- ```json
128
- {
129
- "signal": "up",
130
- "context": "GPT Actions install verified with a successful test call",
131
- "whatWorked": "The hosted action returned accepted=true and a promoted status"
132
- }
133
- ```
134
-
135
- Expected response: `200 OK` with `{ "accepted": true, "status": "promoted" }`.
136
-
137
- If you only send a bare `thumbs up/down` style payload, expect `422` with `status: "clarification_required"` and a follow-up `prompt`.
138
-
139
- ## Available Actions
140
-
141
- | Action | Method | Path | Description |
142
- |---|---|---|---|
143
- | `captureFeedback` | POST | `/v1/feedback/capture` | Capture up/down signal plus one-line why |
144
- | `getFeedbackStats` | GET | `/v1/feedback/stats` | Aggregated feedback statistics |
145
- | `getFeedbackSummary` | GET | `/v1/feedback/summary` | Recent feedback summary |
146
- | `generatePreventionRules` | POST | `/v1/feedback/rules` | Generate prevention rules |
147
- | `exportDpoPairs` | POST | `/v1/dpo/export` | Export DPO preference pairs |
148
- | `listIntentCatalog` | GET | `/v1/intents/catalog` | List available intents |
149
- | `planIntent` | POST | `/v1/intents/plan` | Generate policy-scoped plan |
150
- | `constructContextPack` | POST | `/v1/context/construct` | Build context pack |
151
-
152
- Full spec: `adapters/chatgpt/openapi.yaml`
153
-
154
- ## Troubleshooting
155
-
156
- - **401 Unauthorized**: Verify `THUMBGATE_API_KEY` is set and matches the Bearer token
157
- - **Connection refused**: Confirm Railway deployment is live (`curl https://<domain>/health`)
158
- - **Schema errors**: Ensure you are using the latest `openapi.yaml` (version 1.1.0+)