thumbgate 0.9.10 → 0.9.11

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 (113) hide show
  1. package/.claude-plugin/README.md +2 -2
  2. package/.claude-plugin/marketplace.json +4 -2
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.well-known/mcp/server-card.json +1 -1
  5. package/README.md +115 -312
  6. package/adapters/README.md +1 -1
  7. package/adapters/claude/.mcp.json +2 -2
  8. package/adapters/codex/config.toml +4 -4
  9. package/adapters/mcp/server-stdio.js +61 -1
  10. package/adapters/opencode/opencode.json +4 -2
  11. package/bin/cli.js +156 -8
  12. package/bin/memory.sh +3 -3
  13. package/config/e2e-critical-flows.json +4 -0
  14. package/config/gates/default.json +74 -2
  15. package/config/github-about.json +1 -1
  16. package/config/mcp-allowlists.json +27 -0
  17. package/package.json +22 -5
  18. package/plugins/amp-skill/INSTALL.md +1 -0
  19. package/plugins/amp-skill/SKILL.md +1 -0
  20. package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +1 -1
  21. package/plugins/claude-codex-bridge/.mcp.json +4 -2
  22. package/plugins/claude-skill/INSTALL.md +1 -0
  23. package/plugins/codex-profile/.codex-plugin/plugin.json +1 -1
  24. package/plugins/codex-profile/.mcp.json +4 -2
  25. package/plugins/codex-profile/INSTALL.md +1 -1
  26. package/plugins/codex-profile/README.md +1 -1
  27. package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +1 -1
  28. package/plugins/cursor-marketplace/README.md +3 -3
  29. package/plugins/cursor-marketplace/mcp.json +3 -1
  30. package/plugins/cursor-marketplace/scripts/gate-check.sh +15 -5
  31. package/plugins/gemini-extension/INSTALL.md +3 -3
  32. package/plugins/opencode-profile/INSTALL.md +1 -1
  33. package/public/dashboard.html +15 -8
  34. package/public/index.html +125 -185
  35. package/public/js/buyer-intent.js +252 -0
  36. package/public/pro.html +1085 -0
  37. package/scripts/__pycache__/train_from_feedback.cpython-312.pyc +0 -0
  38. package/scripts/adk-consolidator.js +14 -2
  39. package/scripts/agent-readiness.js +3 -1
  40. package/scripts/agent-security-hardening.js +4 -4
  41. package/scripts/auto-promote-gates.js +2 -0
  42. package/scripts/auto-wire-hooks.js +105 -17
  43. package/scripts/behavioral-extraction.js +2 -6
  44. package/scripts/billing.js +107 -3
  45. package/scripts/budget-guard.js +2 -2
  46. package/scripts/build-metadata.js +14 -0
  47. package/scripts/context-engine.js +1 -0
  48. package/scripts/deploy-policy.js +3 -17
  49. package/scripts/dpo-optimizer.js +3 -6
  50. package/scripts/ensure-repo-bootstrap.js +129 -0
  51. package/scripts/export-dpo-pairs.js +2 -3
  52. package/scripts/export-kto-pairs.js +3 -4
  53. package/scripts/export-training.js +8 -6
  54. package/scripts/feedback-attribution.js +23 -11
  55. package/scripts/feedback-loop.js +40 -2
  56. package/scripts/feedback-to-rules.js +2 -1
  57. package/scripts/filesystem-search.js +3 -2
  58. package/scripts/gates-engine.js +760 -29
  59. package/scripts/generate-pretool-hook.sh +0 -0
  60. package/scripts/gtm-revenue-loop.js +20 -1
  61. package/scripts/hook-auto-capture.sh +8 -3
  62. package/scripts/hook-runtime.js +89 -0
  63. package/scripts/hook-stop-self-score.sh +3 -3
  64. package/scripts/hook-thumbgate-cache-updater.js +99 -38
  65. package/scripts/hosted-config.js +4 -16
  66. package/scripts/hybrid-feedback-context.js +54 -14
  67. package/scripts/install-mcp.js +13 -0
  68. package/scripts/intent-router.js +2 -2
  69. package/scripts/license.js +52 -14
  70. package/scripts/local-model-profile.js +3 -2
  71. package/scripts/mcp-config.js +68 -6
  72. package/scripts/meta-policy.js +4 -8
  73. package/scripts/money-watcher.js +166 -16
  74. package/scripts/obsidian-export.js +1 -0
  75. package/scripts/operational-integrity.js +480 -0
  76. package/scripts/post-everywhere.js +7 -12
  77. package/scripts/pr-manager.js +14 -11
  78. package/scripts/profile-router.js +2 -0
  79. package/scripts/prompt-dlp.js +1 -0
  80. package/scripts/publish-decision.js +10 -0
  81. package/scripts/published-cli.js +34 -0
  82. package/scripts/risk-scorer.js +3 -2
  83. package/scripts/rlhf_session_start.sh +32 -0
  84. package/scripts/skill-quality-tracker.js +3 -5
  85. package/scripts/social-analytics/db/social-analytics.db-shm +0 -0
  86. package/scripts/social-analytics/db/social-analytics.db-wal +0 -0
  87. package/scripts/social-analytics/engagement-audit.js +202 -0
  88. package/scripts/social-analytics/instagram-thumbgate-post.js +45 -7
  89. package/scripts/social-analytics/install-growth-automation.js +114 -0
  90. package/scripts/social-analytics/load-env.js +46 -0
  91. package/scripts/social-analytics/poll-all.js +3 -18
  92. package/scripts/social-analytics/pollers/zernio.js +3 -0
  93. package/scripts/social-analytics/publish-instagram-thumbgate.js +22 -3
  94. package/scripts/social-analytics/publish-thumbgate-launch.js +316 -0
  95. package/scripts/social-analytics/publishers/reddit.js +7 -12
  96. package/scripts/social-analytics/publishers/zernio.js +210 -22
  97. package/scripts/social-analytics/reconcile-thumbgate-campaign.js +165 -0
  98. package/scripts/social-analytics/schedule-thumbgate-campaign.js +275 -0
  99. package/scripts/social-analytics/sync-launch-assets.js +185 -0
  100. package/scripts/social-post-hourly.js +185 -0
  101. package/scripts/social-quality-gate.js +119 -3
  102. package/scripts/social-reply-monitor.js +148 -32
  103. package/scripts/statusline-cache-path.js +27 -0
  104. package/scripts/statusline-meta.js +22 -0
  105. package/scripts/statusline.sh +24 -32
  106. package/scripts/sync-version.js +11 -3
  107. package/scripts/test-coverage.js +20 -13
  108. package/scripts/tool-registry.js +97 -0
  109. package/scripts/train_from_feedback.py +32 -9
  110. package/scripts/validate-feedback.js +3 -2
  111. package/scripts/vector-store.js +2 -3
  112. package/scripts/verify-obsidian-setup.sh +3 -3
  113. package/src/api/server.js +281 -33
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: thumbgate-feedback
3
+ name: rlhf-feedback
3
4
  description: Dual-write feedback to Amp MCP memory AND thumbgate for DPO export, analytics, and cross-platform portability
4
5
  ---
5
6
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-bridge",
3
- "version": "0.9.10",
3
+ "version": "0.9.11",
4
4
  "description": "Run Codex review, adversarial review, and second-pass handoffs from Claude Code while keeping ThumbGate reliability memory in the loop.",
5
5
  "author": {
6
6
  "name": "Igor Ganapolsky",
@@ -3,8 +3,10 @@
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
5
  "args": [
6
- "-y",
7
- "thumbgate@0.9.10",
6
+ "--yes",
7
+ "--package",
8
+ "thumbgate@0.9.11",
9
+ "thumbgate",
8
10
  "serve"
9
11
  ]
10
12
  }
@@ -13,6 +13,7 @@ Or from the published npm package:
13
13
  ```bash
14
14
  npx thumbgate init
15
15
  cp node_modules/thumbgate/plugins/claude-skill/SKILL.md .claude/skills/thumbgate-feedback.md
16
+ cp node_modules/thumbgate/plugins/claude-skill/SKILL.md .claude/skills/rlhf-feedback.md
16
17
  ```
17
18
 
18
19
  ## What This Does
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-profile",
3
- "version": "0.9.10",
3
+ "version": "0.9.11",
4
4
  "description": "ThumbGate for Codex: pre-action gates, skill packs, hallucination detection, PII scanning, progressive disclosure (82% token savings), and MCP-backed reliability memory.",
5
5
  "author": {
6
6
  "name": "Igor Ganapolsky",
@@ -3,8 +3,10 @@
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
5
  "args": [
6
- "-y",
7
- "thumbgate@0.9.10",
6
+ "--yes",
7
+ "--package",
8
+ "thumbgate@0.9.11",
9
+ "thumbgate",
8
10
  "serve"
9
11
  ]
10
12
  }
@@ -31,7 +31,7 @@ The following block is appended to `~/.codex/config.toml`:
31
31
  ```toml
32
32
  [mcp_servers.thumbgate]
33
33
  command = "npx"
34
- args = ["-y", "thumbgate@0.9.10", "serve"]
34
+ args = ["--yes", "--package", "thumbgate@0.9.11", "thumbgate", "serve"]
35
35
  ```
36
36
 
37
37
  The repo-local Codex app plugin ships the same runtime path through `plugins/codex-profile/.mcp.json`, so the manual config and plugin metadata stay aligned.
@@ -29,7 +29,7 @@ That profile launches:
29
29
  ```toml
30
30
  [mcp_servers.thumbgate]
31
31
  command = "npx"
32
- args = ["-y", "thumbgate@0.9.10", "serve"]
32
+ args = ["--yes", "--package", "thumbgate@0.9.11", "thumbgate", "serve"]
33
33
  ```
34
34
 
35
35
  ## Why this exists
@@ -2,7 +2,7 @@
2
2
  "name": "thumbgate",
3
3
  "displayName": "ThumbGate",
4
4
  "description": "👍👎 Thumbs down a mistake — your AI agent won't repeat it. Thumbs up good work — it remembers the pattern.",
5
- "version": "0.9.10",
5
+ "version": "0.9.11",
6
6
  "author": {
7
7
  "name": "Igor Ganapolsky"
8
8
  },
@@ -53,13 +53,13 @@ How it works:
53
53
 
54
54
  | Hook | Trigger | Description |
55
55
  |------|---------|-------------|
56
- | `beforeShellExecution` | `git push`, `rm -rf`, `npm publish`, `deploy` | Runs `scripts/gate-check.sh` to perform a pre-action health check via `thumbgate doctor`. |
56
+ | `beforeShellExecution` | `git push`, `rm -rf`, `npm publish`, `deploy` | Runs `scripts/gate-check.sh` to evaluate the command through ThumbGate `gate-check` before execution. |
57
57
 
58
58
  ### MCP Server
59
59
 
60
60
  | Server | Command |
61
61
  |--------|---------|
62
- | `thumbgate` | `npx -y thumbgate@latest serve` |
62
+ | `thumbgate` | `npx --yes --package thumbgate@latest thumbgate serve` |
63
63
 
64
64
  ## Install
65
65
 
@@ -92,7 +92,7 @@ Or copy the plugin MCP config into `.cursor/mcp.json`:
92
92
  "mcpServers": {
93
93
  "thumbgate": {
94
94
  "command": "npx",
95
- "args": ["-y", "thumbgate@latest", "serve"]
95
+ "args": ["--yes", "--package", "thumbgate@latest", "thumbgate", "serve"]
96
96
  }
97
97
  }
98
98
  }
@@ -3,8 +3,10 @@
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
5
  "args": [
6
- "-y",
6
+ "--yes",
7
+ "--package",
7
8
  "thumbgate@latest",
9
+ "thumbgate",
8
10
  "serve"
9
11
  ]
10
12
  }
@@ -1,11 +1,21 @@
1
1
  #!/usr/bin/env bash
2
2
  # Pre-action gate check — runs before risky shell commands.
3
3
  # Called by hooks/hooks.json beforeShellExecution hook.
4
- # Performs a quick health check via thumbgate doctor.
4
+ # Delegates to the published ThumbGate gate-check entrypoint.
5
5
 
6
6
  set -euo pipefail
7
7
 
8
- npx -y thumbgate@latest doctor 2>/dev/null || {
9
- echo "[gate-check] thumbgate doctor returned non-zero review before proceeding." >&2
10
- exit 1
11
- }
8
+ INPUT=$(cat)
9
+ RESULT=$(echo "$INPUT" | npx --yes --package thumbgate@latest thumbgate gate-check 2>/dev/null) || true
10
+
11
+ if [ -z "$RESULT" ]; then
12
+ exit 0
13
+ fi
14
+
15
+ echo "$RESULT"
16
+
17
+ if echo "$RESULT" | grep -q '"permissionDecision":\s*"deny"'; then
18
+ exit 2
19
+ fi
20
+
21
+ exit 0
@@ -15,14 +15,14 @@ cp adapters/gemini/function-declarations.json .gemini/thumbgate-tools.json
15
15
  const fs = require('fs');
16
16
 
17
17
  // Load ThumbGate tool declarations
18
- const rlhfTools = JSON.parse(
18
+ const thumbgateTools = JSON.parse(
19
19
  fs.readFileSync('adapters/gemini/function-declarations.json', 'utf8')
20
20
  );
21
21
 
22
22
  // Pass to Gemini SDK
23
23
  const model = genAI.getGenerativeModel({
24
24
  model: 'gemini-pro',
25
- tools: [{ functionDeclarations: rlhfTools.tools }],
25
+ tools: [{ functionDeclarations: thumbgateTools.tools }],
26
26
  });
27
27
  ```
28
28
 
@@ -43,7 +43,7 @@ Set the base URL in your Gemini function handler:
43
43
  const THUMBGATE_API_URL = process.env.THUMBGATE_API_URL || 'http://localhost:3000';
44
44
  const THUMBGATE_API_KEY = process.env.THUMBGATE_API_KEY;
45
45
 
46
- async function callRlhfTool(name, params) {
46
+ async function callThumbGateTool(name, params) {
47
47
  const endpoints = {
48
48
  capture_memory_feedback: { method: 'POST', path: '/v1/feedback/capture' },
49
49
  get_reliability_rules: { method: 'POST', path: '/v1/feedback/rules' },
@@ -25,7 +25,7 @@ The portable profile adds this MCP server entry:
25
25
  "mcp": {
26
26
  "thumbgate": {
27
27
  "type": "local",
28
- "command": ["npx", "-y", "thumbgate@0.9.10", "serve"],
28
+ "command": ["npx", "--yes", "--package", "thumbgate@0.9.11", "thumbgate", "serve"],
29
29
  "enabled": true
30
30
  }
31
31
  }
@@ -45,8 +45,9 @@
45
45
 
46
46
  /* STATS */
47
47
  .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
48
- .stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: border-color 0.15s, transform 0.1s; }
48
+ .stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: border-color 0.15s, background 0.15s, transform 0.1s; }
49
49
  .stat-card:hover { border-color: rgba(34,211,238,0.4); transform: translateY(-2px); }
50
+ .stat-card.selected { border-color: rgba(34,211,238,0.6); background: rgba(34,211,238,0.05); }
50
51
  .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
51
52
  .stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
52
53
  .stat-value.green { color: var(--green); }
@@ -211,10 +212,10 @@
211
212
 
212
213
  <!-- STATS -->
213
214
  <div class="stats-grid" id="statsGrid">
214
- <div class="stat-card" onclick="selectCard(this,'all')" style="cursor:pointer;" title="Show all feedback"><div class="stat-label">Total Feedback</div><div class="stat-value cyan" id="statTotal">—</div></div>
215
- <div class="stat-card" onclick="selectCard(this,'up')" style="cursor:pointer;" title="Show positive feedback"><div class="stat-label">👍 Positive</div><div class="stat-value green" id="statPositive">—</div></div>
216
- <div class="stat-card" onclick="selectCard(this,'down')" style="cursor:pointer;" title="Show negative feedback"><div class="stat-label">👎 Negative</div><div class="stat-value red" id="statNegative">—</div></div>
217
- <div class="stat-card" onclick="selectCard(this,'gates')" style="cursor:pointer;" title="View active gates"><div class="stat-label">Active Gates</div><div class="stat-value cyan" id="statGates">—</div></div>
215
+ <div class="stat-card" data-card-action="all" onclick="selectCard(this,'all')" style="cursor:pointer;" title="Show all feedback"><div class="stat-label">Total Feedback</div><div class="stat-value cyan" id="statTotal">—</div></div>
216
+ <div class="stat-card" data-card-action="up" onclick="selectCard(this,'up')" style="cursor:pointer;" title="Show positive feedback"><div class="stat-label">👍 Positive</div><div class="stat-value green" id="statPositive">—</div></div>
217
+ <div class="stat-card" data-card-action="down" onclick="selectCard(this,'down')" style="cursor:pointer;" title="Show negative feedback"><div class="stat-label">👎 Negative</div><div class="stat-value red" id="statNegative">—</div></div>
218
+ <div class="stat-card" data-card-action="gates" onclick="selectCard(this,'gates')" style="cursor:pointer;" title="View active gates"><div class="stat-label">Active Gates</div><div class="stat-value cyan" id="statGates">—</div></div>
218
219
  </div>
219
220
 
220
221
  <!-- TABS -->
@@ -385,6 +386,7 @@ async function connect(options) {
385
386
  document.getElementById('authHelp').textContent = 'Local Pro is active on this machine. Your personal dashboard is using the saved license key automatically.';
386
387
  }
387
388
  renderStats(data);
389
+ setSelectedCard('all');
388
390
  await loadDashboardData();
389
391
  } catch (e) {
390
392
  status.className = 'auth-status err';
@@ -407,6 +409,12 @@ function renderStats(data) {
407
409
  document.getElementById('statNegative').textContent = neg;
408
410
  }
409
411
 
412
+ function setSelectedCard(action) {
413
+ document.querySelectorAll('.stat-card').forEach(function(card) {
414
+ card.classList.toggle('selected', card.dataset.cardAction === action);
415
+ });
416
+ }
417
+
410
418
  async function search() {
411
419
  const query = document.getElementById('searchQuery').value.trim();
412
420
  if (!query) return;
@@ -506,9 +514,7 @@ function highlightText(text) {
506
514
 
507
515
  function selectCard(el, action) {
508
516
  currentHighlightTerms = [];
509
- // Highlight clicked card, clear all others
510
- document.querySelectorAll('.stat-card').forEach(function(c) { c.style.borderColor = ''; });
511
- el.style.borderColor = 'var(--cyan)';
517
+ setSelectedCard(action);
512
518
 
513
519
  if (action === 'gates') {
514
520
  switchTab('gates');
@@ -920,6 +926,7 @@ function loadDemo() {
920
926
  document.getElementById('statPositive').textContent = '37';
921
927
  document.getElementById('statNegative').textContent = '260';
922
928
  document.getElementById('statGates').textContent = '21';
929
+ setSelectedCard('all');
923
930
  // Sample memories — realistic scenarios from real agent-driven development
924
931
  var demoResults = [
925
932
  { signal: 'down', title: 'Claimed fix worked without running tests', context: 'Agent announced "fixed and pushed" but never ran the test suite. CI failed on 3 tests. Gate now requires test evidence before any completion claim.', tags: ['anti-lying', 'verification-gap', 'ci', 'trust-breach'], timestamp: '2025-06-22T10:20:00Z' },