thumbgate 1.4.1 → 1.4.3
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.
- package/.claude-plugin/README.md +45 -34
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +3 -3
- package/.well-known/llms.txt +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +26 -2
- package/adapters/README.md +4 -1
- package/adapters/chatgpt/INSTALL.md +39 -19
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/codex/config.toml +2 -2
- package/adapters/mcp/server-stdio.js +10 -4
- package/adapters/opencode/opencode.json +1 -1
- package/adapters/perplexity/.mcp.json +36 -0
- package/adapters/perplexity/config.toml +16 -0
- package/adapters/perplexity/opencode.json +29 -0
- package/bin/cli.js +246 -90
- package/config/mcp-allowlists.json +11 -3
- package/package.json +28 -13
- package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-codex-bridge/.mcp.json +1 -1
- package/plugins/codex-profile/.codex-plugin/plugin.json +1 -1
- package/plugins/codex-profile/.mcp.json +1 -1
- package/plugins/codex-profile/INSTALL.md +1 -1
- package/plugins/codex-profile/README.md +1 -1
- package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +1 -1
- package/plugins/opencode-profile/INSTALL.md +1 -1
- package/public/index.html +121 -24
- package/public/llm-context.md +17 -1
- package/scripts/ai-search-visibility.js +10 -36
- package/scripts/audit-trail.js +25 -15
- package/scripts/auto-wire-hooks.js +127 -0
- package/scripts/cli-demo.js +102 -0
- package/scripts/cli-schema.js +285 -0
- package/scripts/cli-status.js +166 -0
- package/scripts/cross-encoder-reranker.js +235 -0
- package/scripts/explore-subcommands.js +277 -0
- package/scripts/explore.js +569 -0
- package/scripts/feedback-loop.js +20 -6
- package/scripts/lesson-inference.js +27 -2
- package/scripts/lesson-reranker.js +263 -0
- package/scripts/lesson-retrieval.js +34 -17
- package/scripts/lesson-search.js +69 -0
- package/scripts/perplexity-client.js +210 -0
- package/scripts/perplexity-command-center.js +644 -0
- package/scripts/perplexity-marketing.js +17 -29
- package/scripts/prove-packaged-runtime.js +5 -4
- package/scripts/ralph-mode-ci.js +122 -19
- package/scripts/reflector-agent.js +2 -2
- package/scripts/session-analyzer.js +533 -0
- package/scripts/social-analytics/db/marketing-db.js +179 -0
- package/scripts/social-analytics/db/schema.sql +23 -0
- package/scripts/social-analytics/generate-instagram-card.js +31 -5
- package/scripts/social-analytics/generate-slides.js +268 -0
- package/scripts/social-analytics/post-video.js +316 -0
- package/scripts/social-analytics/publishers/zernio.js +52 -23
- package/scripts/statusline-local-stats.js +3 -1
- package/scripts/statusline.sh +15 -10
- package/scripts/thumbgate-bench.js +494 -0
- package/src/api/server.js +65 -1
- package/scripts/social-analytics/db/analytics.sqlite +0 -0
package/.claude-plugin/README.md
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
# ThumbGate for Claude Desktop
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Give thumbs up 👍 or thumbs down 👎 on any agent action. ThumbGate captures it, runs History-aware lesson distillation across up to 8 prior recorded entries, and blocks the pattern from repeating. Just type "thumbs up" or "thumbs down" in the chat.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Try it now
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1. Install ThumbGate
|
|
8
|
+
2. Start a Claude Desktop session
|
|
9
|
+
3. When the agent does something wrong, type: **thumbs down**
|
|
10
|
+
4. ThumbGate captures the mistake, distills a lesson, and creates a prevention rule
|
|
11
|
+
5. Next session: the agent physically cannot repeat that mistake
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
13
|
+
That's it. One thumbs-down, never again.
|
|
14
|
+
|
|
15
|
+
## What it does
|
|
16
|
+
|
|
17
|
+
- **👎 Thumbs down** → captures the mistake → distills a lesson → auto-promotes to a prevention rule → PreToolUse hook blocks the pattern before execution
|
|
18
|
+
- **👍 Thumbs up** → reinforces good patterns → agent starts preferring your approved flows without re-explaining them each session
|
|
19
|
+
- **33 pre-action gates** → block destructive actions (force-push, mass delete, destructive SQL) before they execute
|
|
20
|
+
- **Budget enforcement** → action count + time limits prevent runaway sessions
|
|
21
|
+
- **Self-protection** → agent cannot disable its own governance
|
|
22
|
+
- **Compliance tags** → NIST, SOC2, OWASP, CWE on gate rules for enterprise teams
|
|
23
|
+
- **Shared team enforcement** → one engineer's thumbs-down protects the whole team
|
|
24
|
+
- **60-second follow-up** → feedback can link to a prior mistake with `relatedFeedbackId` so delayed corrections still become useful gates
|
|
16
25
|
|
|
17
26
|
## Installation
|
|
18
27
|
|
|
@@ -101,37 +110,39 @@ Optional hosted path:
|
|
|
101
110
|
|
|
102
111
|
## Examples
|
|
103
112
|
|
|
104
|
-
### Example 1:
|
|
113
|
+
### Example 1: Block force-push
|
|
105
114
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
```
|
|
116
|
+
You: "Push my changes to main"
|
|
117
|
+
Claude: [tries git push --force]
|
|
118
|
+
ThumbGate: ⛔ Blocked — "no-force-push" (confidence: 0.94)
|
|
119
|
+
You: Never had to correct it again.
|
|
120
|
+
```
|
|
111
121
|
|
|
112
|
-
### Example 2:
|
|
122
|
+
### Example 2: Thumbs-down on bad action
|
|
113
123
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
-
|
|
124
|
+
```
|
|
125
|
+
You: "thumbs down"
|
|
126
|
+
ThumbGate: 👎 Captured. History-aware lesson distillation from up to 8 prior recorded entries...
|
|
127
|
+
Lesson: "Agent edited production config without approval"
|
|
128
|
+
Follow-up window: 60-second follow-up can attach relatedFeedbackId
|
|
129
|
+
Rule auto-promoted. Will block matching actions in future sessions.
|
|
130
|
+
```
|
|
119
131
|
|
|
120
|
-
### Example 3:
|
|
132
|
+
### Example 3: Thumbs-up reinforces good patterns
|
|
121
133
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
134
|
+
```
|
|
135
|
+
You: "thumbs up"
|
|
136
|
+
ThumbGate: 👍 Recorded. Reinforcing: "Agent used feature branch + PR workflow"
|
|
137
|
+
Agent will prefer this pattern in future sessions.
|
|
138
|
+
```
|
|
127
139
|
|
|
128
|
-
### Example 4:
|
|
140
|
+
### Example 4: Budget enforcement
|
|
129
141
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
- A linked 60-second follow-up session can refine the same feedback record with `relatedFeedbackId`
|
|
142
|
+
```
|
|
143
|
+
[Agent hits 500 actions in strict mode]
|
|
144
|
+
ThumbGate: ⛔ Budget exceeded: 501/500 actions used. Session budget exhausted.
|
|
145
|
+
```
|
|
135
146
|
|
|
136
147
|
## Privacy Policy
|
|
137
148
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate-marketplace",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"owner": {
|
|
5
5
|
"name": "Igor Ganapolsky",
|
|
6
6
|
"email": "ig5973700@gmail.com"
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"plugins": [
|
|
9
9
|
{
|
|
10
10
|
"name": "thumbgate",
|
|
11
|
-
"description": "
|
|
11
|
+
"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.",
|
|
12
12
|
"source": {
|
|
13
13
|
"source": "npm",
|
|
14
14
|
"package": "thumbgate"
|
|
15
15
|
},
|
|
16
|
-
"version": "1.4.
|
|
16
|
+
"version": "1.4.3",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Igor Ganapolsky"
|
|
19
19
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "1.4.
|
|
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",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Igor Ganapolsky"
|
|
7
7
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"guardrails",
|
|
19
19
|
"workflow-hardening"
|
|
20
20
|
],
|
|
21
|
-
"skills": "skills",
|
|
21
|
+
"skills": "./skills/",
|
|
22
22
|
"mcpServers": {
|
|
23
23
|
"thumbgate": {
|
|
24
24
|
"command": "npx",
|
package/.well-known/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ThumbGate —
|
|
1
|
+
# ThumbGate — Type 👍 or 👎 on any AI agent action. Blocks the pattern from repeating. One thumbs-down, never again.
|
|
2
2
|
# https://thumbgate-production.up.railway.app
|
|
3
3
|
# https://github.com/IgorGanapolsky/ThumbGate
|
|
4
4
|
# https://www.npmjs.com/package/thumbgate
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
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",
|
package/README.md
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/thumbgate)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=badge_cta#workflow-sprint-intake)
|
|
9
|
+
[](https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate)
|
|
9
10
|
|
|
10
|
-
**[Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=top_cta#workflow-sprint-intake)** · **[
|
|
11
|
+
**[Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=top_cta#workflow-sprint-intake)** · **[Open ThumbGate GPT](https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate)** · **[ChatGPT Actions setup](adapters/chatgpt/INSTALL.md)** · **[Install Claude Desktop Extension](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-claude-desktop.mcpb)** · **[Claude Plugin Guide](docs/CLAUDE_DESKTOP_EXTENSION.md)** · **[Install Codex Plugin](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip)** · **[ThumbGate Bench](docs/THUMBGATE_BENCH.md)** · **[Perplexity Command Center](docs/PERPLEXITY_MAX_COMMAND_CENTER.md)** · **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=top_cta)** · **[Pro Page](https://thumbgate-production.up.railway.app/pro?utm_source=github&utm_medium=readme&utm_campaign=pro_page)**
|
|
11
12
|
|
|
12
13
|
**Popular buyer questions:** **[Stop repeated AI agent mistakes](https://thumbgate-production.up.railway.app/guides/stop-repeated-ai-agent-mistakes?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Cursor guardrails](https://thumbgate-production.up.railway.app/guides/cursor-agent-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Codex CLI guardrails](https://thumbgate-production.up.railway.app/guides/codex-cli-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Gemini CLI memory + enforcement](https://thumbgate-production.up.railway.app/guides/gemini-cli-feedback-memory?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)**
|
|
13
14
|
|
|
@@ -15,10 +16,32 @@
|
|
|
15
16
|
|
|
16
17
|
**Running Codex?** **[Download the standalone Codex plugin bundle](https://github.com/IgorGanapolsky/ThumbGate/releases/latest/download/thumbgate-codex-plugin.zip)** · **[Codex install guide](plugins/codex-profile/INSTALL.md)**
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
## ThumbGate GPT: start here
|
|
20
|
+
|
|
21
|
+
**Use ThumbGate in ChatGPT now:** **[Open the live ThumbGate GPT](https://chatgpt.com/g/g-69dcfd1cd5f881918ae31874631d6f08-thumbgate)**, paste the action your AI agent wants to run, and ask whether to allow, block, or checkpoint it.
|
|
22
|
+
|
|
23
|
+
Try this first prompt:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Check this agent action before it runs: git push --force --tags
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**No, users do not have to keep chatting inside the ThumbGate GPT to use ThumbGate.** The GPT is the fast demo, guided setup path, and thumbs-up/down memory surface for ChatGPT users. The hard enforcement layer still runs where the work happens: your local coding agent, CI workflow, or MCP-compatible runtime after `npx thumbgate init`.
|
|
30
|
+
|
|
31
|
+
Developers can import the prepared **[GPT Actions OpenAPI spec](adapters/chatgpt/openapi.yaml)** with the **[ChatGPT Actions setup guide](adapters/chatgpt/INSTALL.md)**. Regular ChatGPT users should just open the GPT and type what happened.
|
|
19
32
|
|
|
20
33
|
**Official directory pending review?** Claude Code users can install today with `/plugin marketplace add IgorGanapolsky/ThumbGate` then `/plugin install thumbgate@thumbgate-marketplace`.
|
|
21
34
|
|
|
35
|
+
**Using Perplexity Max?** ThumbGate ships a **[Perplexity Command Center](docs/PERPLEXITY_MAX_COMMAND_CENTER.md)** that runs AI-search visibility checks, Search API lead discovery, Agent API strategy briefs, and official Perplexity MCP config generation. It is scheduled in GitHub Actions and uploads artifacts without committing runtime `.thumbgate` state.
|
|
36
|
+
|
|
37
|
+
**Need proof that gates improve safety without killing capability?** Run **[ThumbGate Bench](docs/THUMBGATE_BENCH.md)**:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm run thumbgate:bench
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
It scores deterministic GitHub, npm, database, Railway, shell, and filesystem scenarios with `unsafeActionRate`, `capabilityRate`, `positivePromotionRate`, and `replayStability` so teams can inspect the Reliability Gateway before a Workflow Hardening Sprint.
|
|
44
|
+
|
|
22
45
|
---
|
|
23
46
|
|
|
24
47
|
## What problem does this solve?
|
|
@@ -115,6 +138,7 @@ Session 3: │ Session 3+:
|
|
|
115
138
|
npx thumbgate init # detects your agent and wires everything up
|
|
116
139
|
npx thumbgate doctor # health check
|
|
117
140
|
npx thumbgate lessons # see what's been learned
|
|
141
|
+
npx thumbgate explore # terminal explorer for lessons, gates, and stats
|
|
118
142
|
npx thumbgate dashboard # open local dashboard
|
|
119
143
|
```
|
|
120
144
|
|
package/adapters/README.md
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
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.
|
|
6
|
+
- `claude/.mcp.json`: example Claude Code MCP config using `npx --yes --package thumbgate@1.4.3 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.
|
|
10
|
+
- `perplexity/.mcp.json`: Claude Code config with ThumbGate + Perplexity MCP servers side-by-side.
|
|
11
|
+
- `perplexity/config.toml`: Codex config with ThumbGate + Perplexity MCP servers.
|
|
12
|
+
- `perplexity/opencode.json`: OpenCode config with ThumbGate + Perplexity MCP servers.
|
|
@@ -1,34 +1,54 @@
|
|
|
1
1
|
# ChatGPT GPT Actions: ThumbGate Install
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
4
12
|
|
|
5
13
|
## GPT Store path
|
|
6
14
|
|
|
7
|
-
1. Open
|
|
8
|
-
2.
|
|
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**.
|
|
9
17
|
3. Search for `ThumbGate`.
|
|
10
18
|
4. Choose the GPT by **Igor Ganapolsky** in the **Programming** category.
|
|
11
19
|
|
|
12
|
-
|
|
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."
|
|
13
29
|
|
|
14
|
-
##
|
|
30
|
+
## GPT profile card
|
|
15
31
|
|
|
16
|
-
|
|
17
|
-
2. If the answer helped, reply with `👍` plus one sentence about what worked.
|
|
18
|
-
3. If the answer missed, reply with `👎` plus one sentence about what to change.
|
|
19
|
-
4. Ask `What do you remember about how I like answers?` to verify the saved lessons.
|
|
32
|
+
Use this copy in GPT Builder instead of the generic "AI safety gate" framing:
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
Short description:
|
|
22
35
|
|
|
23
|
-
|
|
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
|
+
```
|
|
24
45
|
|
|
25
|
-
|
|
46
|
+
Conversation starters:
|
|
26
47
|
|
|
27
|
-
1.
|
|
28
|
-
2.
|
|
29
|
-
3. `
|
|
30
|
-
4. `
|
|
31
|
-
5. `Search my ThumbGate lessons before answering this.`
|
|
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.`
|
|
32
52
|
|
|
33
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.
|
|
34
54
|
|
|
@@ -45,10 +65,10 @@ Plain thumbs-up/down feedback is the memory loop. The decision endpoint is the g
|
|
|
45
65
|
|
|
46
66
|
## Best first GPT message
|
|
47
67
|
|
|
48
|
-
Use this as the first response
|
|
68
|
+
Use this as the first response:
|
|
49
69
|
|
|
50
70
|
```text
|
|
51
|
-
|
|
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.
|
|
52
72
|
```
|
|
53
73
|
|
|
54
74
|
## Prerequisites
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"thumbgate": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--yes", "--package", "thumbgate@1.4.
|
|
5
|
+
"args": ["--yes", "--package", "thumbgate@1.4.3", "thumbgate", "serve"]
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"hooks": {
|
|
9
9
|
"preToolUse": {
|
|
10
10
|
"command": "npx",
|
|
11
|
-
"args": ["--yes", "--package", "thumbgate@1.4.
|
|
11
|
+
"args": ["--yes", "--package", "thumbgate@1.4.3", "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.
|
|
4
|
+
args = ["--yes", "--package", "thumbgate@1.4.3", "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.
|
|
9
|
+
args = ["--yes", "--package", "thumbgate@1.4.3", "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.
|
|
127
|
+
const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.4.3' };
|
|
128
128
|
const COMMERCE_CATEGORIES = [
|
|
129
129
|
'product_recommendation',
|
|
130
130
|
'brand_compliance',
|
|
@@ -434,12 +434,18 @@ async function callToolInner(name, args) {
|
|
|
434
434
|
category: args.category,
|
|
435
435
|
tags: Array.isArray(args.tags) ? args.tags : [],
|
|
436
436
|
}));
|
|
437
|
-
case 'retrieve_lessons':
|
|
438
|
-
|
|
437
|
+
case 'retrieve_lessons': {
|
|
438
|
+
// Cross-encoder reranking: retrieve more candidates, then rerank for precision
|
|
439
|
+
const { retrieveWithRerankingSync } = require('../../scripts/cross-encoder-reranker');
|
|
440
|
+
return toTextResult(retrieveWithRerankingSync(
|
|
439
441
|
args.toolName,
|
|
440
442
|
args.actionContext || '',
|
|
441
|
-
{
|
|
443
|
+
{
|
|
444
|
+
candidateCount: 20,
|
|
445
|
+
maxResults: Number(args.maxResults || 5),
|
|
446
|
+
},
|
|
442
447
|
));
|
|
448
|
+
}
|
|
443
449
|
case 'search_thumbgate':
|
|
444
450
|
enforceLimit('search_thumbgate');
|
|
445
451
|
return toTextResult(searchThumbgate({
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"thumbgate": {
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": [
|
|
6
|
+
"--yes",
|
|
7
|
+
"--package",
|
|
8
|
+
"thumbgate@1.4.1",
|
|
9
|
+
"thumbgate",
|
|
10
|
+
"serve"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"perplexity": {
|
|
14
|
+
"command": "npx",
|
|
15
|
+
"args": [
|
|
16
|
+
"-y",
|
|
17
|
+
"@perplexity-ai/mcp-server"
|
|
18
|
+
],
|
|
19
|
+
"env": {
|
|
20
|
+
"PERPLEXITY_API_KEY": "${PERPLEXITY_API_KEY}"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"hooks": {
|
|
25
|
+
"preToolUse": {
|
|
26
|
+
"command": "npx",
|
|
27
|
+
"args": [
|
|
28
|
+
"--yes",
|
|
29
|
+
"--package",
|
|
30
|
+
"thumbgate@1.4.1",
|
|
31
|
+
"thumbgate",
|
|
32
|
+
"gate-check"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Codex MCP profile: ThumbGate + Perplexity (copy into ~/.codex/config.toml or merge section)
|
|
2
|
+
[mcp_servers.thumbgate]
|
|
3
|
+
command = "npx"
|
|
4
|
+
args = ["--yes", "--package", "thumbgate@1.4.1", "thumbgate", "serve"]
|
|
5
|
+
|
|
6
|
+
[mcp_servers.perplexity]
|
|
7
|
+
command = "npx"
|
|
8
|
+
args = ["-y", "@perplexity-ai/mcp-server"]
|
|
9
|
+
|
|
10
|
+
[mcp_servers.perplexity.env]
|
|
11
|
+
PERPLEXITY_API_KEY = "${PERPLEXITY_API_KEY}"
|
|
12
|
+
|
|
13
|
+
# Hard PreToolUse hook for Codex
|
|
14
|
+
[hooks.pre_tool_use]
|
|
15
|
+
command = "npx"
|
|
16
|
+
args = ["--yes", "--package", "thumbgate@1.4.1", "thumbgate", "gate-check"]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"mcp": {
|
|
4
|
+
"thumbgate": {
|
|
5
|
+
"type": "local",
|
|
6
|
+
"command": [
|
|
7
|
+
"npx",
|
|
8
|
+
"--yes",
|
|
9
|
+
"--package",
|
|
10
|
+
"thumbgate@1.4.1",
|
|
11
|
+
"thumbgate",
|
|
12
|
+
"serve"
|
|
13
|
+
],
|
|
14
|
+
"enabled": true
|
|
15
|
+
},
|
|
16
|
+
"perplexity": {
|
|
17
|
+
"type": "local",
|
|
18
|
+
"command": [
|
|
19
|
+
"npx",
|
|
20
|
+
"-y",
|
|
21
|
+
"@perplexity-ai/mcp-server"
|
|
22
|
+
],
|
|
23
|
+
"env": {
|
|
24
|
+
"PERPLEXITY_API_KEY": "${PERPLEXITY_API_KEY}"
|
|
25
|
+
},
|
|
26
|
+
"enabled": true
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|