@triedotdev/mcp 1.0.16 → 1.0.18
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/README.md +156 -34
- package/dist/{agent-smith-LBQ5PNAK.js → agent-smith-PRK7TYEI.js} +2 -2
- package/dist/{chunk-ENCH27CT.js → chunk-TBCXJNH4.js} +2 -2
- package/dist/chunk-WSBTQJMH.js +1549 -0
- package/dist/chunk-WSBTQJMH.js.map +1 -0
- package/dist/cli/yolo-daemon.js +2 -2
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-4OGYWKMD.js +0 -953
- package/dist/chunk-4OGYWKMD.js.map +0 -1
- /package/dist/{agent-smith-LBQ5PNAK.js.map → agent-smith-PRK7TYEI.js.map} +0 -0
- /package/dist/{chunk-ENCH27CT.js.map → chunk-TBCXJNH4.js.map} +0 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
- **20 Built-in Agents** - Security, Privacy, SOC 2, Legal, Architecture, Performance, E2E, Visual QA, Data Flow, Agent Smith, and more
|
|
10
10
|
- **Super Reviewer** - Interactive PR reviews: walks through changes file-by-file with AI guidance
|
|
11
|
-
- **Agent Smith** -
|
|
11
|
+
- **Agent Smith v2.0** - Ultimate vibe code enforcer: 38 hunters targeting AI-generated anti-patterns, file-level analysis, cross-file detection, persistent memory
|
|
12
12
|
- **Parallel Execution** - All agents run simultaneously for fast scans
|
|
13
13
|
- **YOLO Mode** - Autonomous auto-fixing as you code
|
|
14
14
|
- **Custom Agents** - Create agents from PDFs, docs, or style guides
|
|
@@ -90,55 +90,175 @@ Use trie_pr_review with pr:"12345"
|
|
|
90
90
|
|
|
91
91
|
**Manually invoked** - Use `trie_agent_smith` directly. Not included in `trie_scan`.
|
|
92
92
|
|
|
93
|
-
*"I'm going to be honest with you... I hate this code."*
|
|
93
|
+
*"I'm going to be honest with you... I hate this vibe code."*
|
|
94
94
|
|
|
95
|
-
Agent Smith is the
|
|
95
|
+
Agent Smith v2.0 is the **ultimate vibe code enforcer** — specifically designed to hunt down AI-generated code anti-patterns from Cursor, v0, Lovable, Bolt, and other AI tools.
|
|
96
96
|
|
|
97
97
|
```
|
|
98
98
|
Use trie_agent_smith
|
|
99
99
|
Use trie_smith
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
### 38 Specialized Hunters
|
|
103
|
+
|
|
104
|
+
| Category | Count | Hunters |
|
|
105
|
+
|----------|-------|---------|
|
|
106
|
+
| **Security** | 5 | `exposed-secret`, `frontend-env`, `hardcoded-localhost`, `sql-injection`, `dangeroushtml` |
|
|
107
|
+
| **AI Code Smells** | 6 | `console`, `any`, `ts-ignore`, `eslint-disable`, `debugger`, `force-flag` |
|
|
108
|
+
| **Async/Promise Bugs** | 5 | `async-useeffect`, `async-foreach`, `missing-await`, `empty-catch`, `floating-promise` |
|
|
109
|
+
| **React Anti-patterns** | 5 | `useeffect-abuse`, `usestate-explosion`, `index-key`, `inline-object`, `prop-drilling` |
|
|
110
|
+
| **Missing UX** | 4 | `missing-loading`, `missing-error`, `missing-empty`, `page-reload` |
|
|
111
|
+
| **Backend Issues** | 3 | `no-validation`, `raw-error`, `n-plus-one` |
|
|
112
|
+
| **Incomplete Code** | 5 | `todo`, `vibe-comment`, `placeholder`, `sleep-hack`, `fallback` |
|
|
113
|
+
| **AI Slop Aesthetic** | 5 | `purple-gradient`, `star-icon`, `generic-hero`, `emoji-overflow`, `inter-font` |
|
|
114
|
+
|
|
115
|
+
### Hunter Details
|
|
116
|
+
|
|
117
|
+
#### Security Hunters (Inevitability: 90-99)
|
|
118
|
+
| Hunter | Detects | Fix |
|
|
119
|
+
|--------|---------|-----|
|
|
120
|
+
| `exposed-secret-hunter` | API keys in code (`sk-...`, `AKIA...`, `ghp_...`) | Use environment variables on server-side only |
|
|
121
|
+
| `frontend-env-hunter` | Secrets in `NEXT_PUBLIC_`, `VITE_`, `REACT_APP_` | Move to server-side API routes |
|
|
122
|
+
| `hardcoded-localhost-hunter` | `http://localhost:3000` URLs | Use relative URLs or env vars |
|
|
123
|
+
| `sql-injection-hunter` | String concatenation in SQL queries | Use parameterized queries |
|
|
124
|
+
| `dangeroushtml-hunter` | `dangerouslySetInnerHTML`, `innerHTML` | Sanitize with DOMPurify |
|
|
125
|
+
|
|
126
|
+
#### AI Code Smell Hunters (Inevitability: 40-85)
|
|
127
|
+
| Hunter | Detects | Fix |
|
|
128
|
+
|--------|---------|-----|
|
|
129
|
+
| `console-hunter` | `console.log` left in code | Remove debug statements |
|
|
130
|
+
| `any-hunter` | TypeScript `any` type | Define proper types |
|
|
131
|
+
| `ts-ignore-hunter` | `@ts-ignore`, `@ts-nocheck` | Fix the actual type error |
|
|
132
|
+
| `eslint-disable-hunter` | `eslint-disable` comments | Fix the underlying issue |
|
|
133
|
+
| `debugger-hunter` | `debugger` statements | Remove before deploying |
|
|
134
|
+
| `force-flag-hunter` | `force: true`, `--no-verify` | Understand why checks exist |
|
|
135
|
+
|
|
136
|
+
#### Async/Promise Hunters (Inevitability: 70-80)
|
|
137
|
+
| Hunter | Detects | Fix |
|
|
138
|
+
|--------|---------|-----|
|
|
139
|
+
| `async-useeffect-hunter` | `useEffect(async () =>` | Define async function inside, then call it |
|
|
140
|
+
| `async-foreach-hunter` | `forEach(async` | Use `for...of` or `Promise.all(map())` |
|
|
141
|
+
| `missing-await-hunter` | `fetch()` without `await` | Add await or handle with `.then()` |
|
|
142
|
+
| `empty-catch-hunter` | `catch (e) {}` | Handle errors properly |
|
|
143
|
+
| `floating-promise-hunter` | Promises not awaited | Add await or void operator |
|
|
144
|
+
|
|
145
|
+
#### React Anti-pattern Hunters (Inevitability: 25-55)
|
|
146
|
+
| Hunter | Detects | Fix |
|
|
147
|
+
|--------|---------|-----|
|
|
148
|
+
| `useeffect-abuse-hunter` | Too many useEffects | Use event handlers or derived state |
|
|
149
|
+
| `usestate-explosion-hunter` | 10+ useState in one component | Use useReducer or group state |
|
|
150
|
+
| `index-key-hunter` | `key={index}` in lists | Use unique ID from data |
|
|
151
|
+
| `inline-object-hunter` | `style={{}}` in JSX | Define styles outside component |
|
|
152
|
+
| `prop-drilling-hunter` | Same prop through 5+ levels | Use Context or Zustand |
|
|
153
|
+
|
|
154
|
+
#### Missing UX Hunters (Inevitability: 45-65)
|
|
155
|
+
| Hunter | Detects | Fix |
|
|
156
|
+
|--------|---------|-----|
|
|
157
|
+
| `missing-loading-hunter` | Data fetching without loading state | Show spinner while loading |
|
|
158
|
+
| `missing-error-hunter` | `fetch` without error handling | Wrap in try/catch |
|
|
159
|
+
| `missing-empty-hunter` | `.map()` without empty state | Show "No items found" |
|
|
160
|
+
| `page-reload-hunter` | `location.reload()` for state | Fix state management properly |
|
|
161
|
+
|
|
162
|
+
#### Backend Hunters (Inevitability: 70-85)
|
|
163
|
+
| Hunter | Detects | Fix |
|
|
164
|
+
|--------|---------|-----|
|
|
165
|
+
| `no-validation-hunter` | `req.body` used without validation | Validate with Zod/Yup |
|
|
166
|
+
| `raw-error-hunter` | Error messages exposed to client | Return generic errors |
|
|
167
|
+
| `n-plus-one-hunter` | Database queries in loops | Use batch queries or DataLoader |
|
|
168
|
+
|
|
169
|
+
#### Incomplete Code Hunters (Inevitability: 30-75)
|
|
170
|
+
| Hunter | Detects | Fix |
|
|
171
|
+
|--------|---------|-----|
|
|
172
|
+
| `todo-hunter` | `TODO`, `FIXME`, `HACK` comments | Implement or remove |
|
|
173
|
+
| `vibe-comment-hunter` | "idk why", "don't touch" | Understand the code |
|
|
174
|
+
| `placeholder-hunter` | `test@test.com`, `example.com` | Replace with real data |
|
|
175
|
+
| `sleep-hack-hunter` | `setTimeout` to fix timing | Fix the race condition |
|
|
176
|
+
| `fallback-hunter` | `return null/[]/{}` hiding errors | Handle errors properly |
|
|
177
|
+
|
|
178
|
+
#### AI Slop Aesthetic Hunters (Inevitability: 10-35)
|
|
179
|
+
| Hunter | Detects | Fix |
|
|
180
|
+
|--------|---------|-----|
|
|
181
|
+
| `purple-gradient-hunter` | Purple/violet gradients (`from-purple-500`) | Pick a distinctive color palette |
|
|
182
|
+
| `star-icon-hunter` | Star icons everywhere (`<StarIcon />`) | Use contextual icons |
|
|
183
|
+
| `generic-hero-hunter` | "Welcome to", "Transform your" | Write specific copy |
|
|
184
|
+
| `emoji-overflow-hunter` | Any emoji usage | Use proper icons (Lucide, Heroicons) |
|
|
185
|
+
| `inter-font-hunter` | Inter/system-ui font | Try Space Grotesk, DM Sans, Outfit |
|
|
186
|
+
|
|
187
|
+
### 3-Phase Analysis
|
|
188
|
+
|
|
189
|
+
1. **Pattern Hunting** - 38 sub-agents scan every file in parallel
|
|
190
|
+
2. **File-Level Analysis** - Detects structural issues:
|
|
191
|
+
- Giant files (500+ lines)
|
|
192
|
+
- State explosion (10+ useState)
|
|
193
|
+
- Effect hell (5+ useEffect)
|
|
194
|
+
- Any explosion (5+ `any` types)
|
|
195
|
+
- Console flood (10+ console.log)
|
|
196
|
+
- Import chaos (30+ imports)
|
|
197
|
+
3. **Cross-File Detection** - Patterns appearing in 5+ files flagged as codebase-wide issues
|
|
198
|
+
|
|
199
|
+
### What Makes Agent Smith Different
|
|
200
|
+
|
|
201
|
+
| Feature | Description |
|
|
202
|
+
|---------|-------------|
|
|
203
|
+
| **Vibe Code Focus** | Specifically targets patterns AI tools commonly get wrong |
|
|
204
|
+
| **Multiplier Effect** | Finds one issue → searches for EVERY similar instance |
|
|
205
|
+
| **Persistent Memory** | Remembers dismissed issues, brings them back if they multiply |
|
|
206
|
+
| **Inevitability Score** | 0-100 rating of how likely to cause production problems |
|
|
207
|
+
| **Philosophical Quotes** | 114 unique quotes explaining WHY the AI got it wrong |
|
|
208
|
+
| **Cross-File Severity** | Security issues become CRITICAL when widespread |
|
|
108
209
|
|
|
109
|
-
|
|
210
|
+
### Memory Management
|
|
110
211
|
|
|
111
|
-
Agent Smith stores issue history in `.trie/smith-memory.json
|
|
212
|
+
Agent Smith stores issue history in `.trie/smith-memory.json`:
|
|
112
213
|
- Max 500 tracked issues (oldest pruned first)
|
|
113
214
|
- Old resolved issues auto-pruned after 30 days
|
|
114
215
|
- Locations limited to 5 per issue
|
|
115
216
|
|
|
116
217
|
| Command | Description |
|
|
117
218
|
|---------|-------------|
|
|
118
|
-
| `trie_agent_smith show_stats:true` | Show memory statistics
|
|
119
|
-
| `trie_agent_smith clear_memory:true` | Clear all memory
|
|
219
|
+
| `trie_agent_smith show_stats:true` | Show memory statistics |
|
|
220
|
+
| `trie_agent_smith clear_memory:true` | Clear all memory |
|
|
221
|
+
|
|
222
|
+
### Example Output
|
|
120
223
|
|
|
121
|
-
**Example output:**
|
|
122
224
|
```
|
|
123
|
-
|
|
225
|
+
"The AI wrote this, didn't it? I can always tell."
|
|
226
|
+
|
|
227
|
+
🕴️ Deploying 38 specialized hunters...
|
|
228
|
+
28 hunters found targets
|
|
229
|
+
|
|
230
|
+
VIOLATIONS: 142 instances across 12 categories
|
|
124
231
|
|
|
125
|
-
|
|
232
|
+
Security (Inevitability: 95+):
|
|
233
|
+
├── exposed-secret-hunter: 2 instances [CRITICAL]
|
|
234
|
+
├── frontend-env-hunter: 5 instances
|
|
235
|
+
└── hardcoded-localhost-hunter: 8 instances
|
|
126
236
|
|
|
127
|
-
|
|
237
|
+
AI Code Smells:
|
|
238
|
+
├── console-hunter: 47 instances (score: 72)
|
|
239
|
+
├── any-hunter: 23 instances (score: 85)
|
|
240
|
+
└── ts-ignore-hunter: 12 instances
|
|
128
241
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
│ empty-catch-hunter: 4 instances (85) ⚠️ │
|
|
134
|
-
└─────────────────────────────────────────┘
|
|
242
|
+
AI Slop Aesthetic:
|
|
243
|
+
├── purple-gradient-hunter: 8 instances
|
|
244
|
+
├── emoji-overflow-hunter: 15 instances
|
|
245
|
+
└── inter-font-hunter: 3 instances
|
|
135
246
|
|
|
136
|
-
|
|
247
|
+
File-Level Issues:
|
|
248
|
+
├── giant-file: src/App.tsx (1,247 lines)
|
|
249
|
+
├── state-explosion: 18 useState hooks
|
|
250
|
+
└── effect-hell: 9 useEffect hooks
|
|
251
|
+
|
|
252
|
+
Cross-File Pattern:
|
|
253
|
+
└── CODEBASE-WIDE: "any" type across 12 files, 67 total instances
|
|
254
|
+
"The pattern spreads... like a virus. It is... inevitable."
|
|
255
|
+
|
|
256
|
+
"Vibe coding. The illusion of productivity. The reality of technical debt."
|
|
137
257
|
```
|
|
138
258
|
|
|
139
259
|
## Visual QA Browser
|
|
140
260
|
|
|
141
|
-
**Screenshot-based visual testing** - Captures your app at 3 viewports and
|
|
261
|
+
**Screenshot-based visual testing** - Captures your app at 3 viewports and returns images for your AI model to analyze.
|
|
142
262
|
|
|
143
263
|
```
|
|
144
264
|
Use trie_visual_qa_browser
|
|
@@ -149,9 +269,9 @@ Use trie_visual_qa_browser url:"http://localhost:3000"
|
|
|
149
269
|
1. Auto-detects running dev server (checks ports 3000, 5173, 8080, etc.)
|
|
150
270
|
2. Launches headless Playwright browser
|
|
151
271
|
3. Captures screenshots at mobile (375px), tablet (768px), and desktop (1440px)
|
|
152
|
-
4. Returns images for
|
|
272
|
+
4. Returns images for your AI model to analyze
|
|
153
273
|
|
|
154
|
-
**What
|
|
274
|
+
**What gets analyzed:**
|
|
155
275
|
- Broken layouts, overlapping elements
|
|
156
276
|
- Responsive design issues
|
|
157
277
|
- Color contrast and accessibility
|
|
@@ -168,12 +288,13 @@ Use trie_visual_qa_browser url:"http://localhost:3000"
|
|
|
168
288
|
|
|
169
289
|
**First run:** If Playwright browsers aren't installed, run: `npx playwright install chromium`
|
|
170
290
|
|
|
171
|
-
**Vision model required:** This tool returns screenshots
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
291
|
+
**Vision model required:** This tool returns screenshots as images. Your AI model must support vision to analyze them:
|
|
292
|
+
- **Claude** (Opus, Sonnet, Haiku 3.5+) - Full vision support
|
|
293
|
+
- **GPT-4o, GPT-4V** - Full vision support
|
|
294
|
+
- **Gemini Pro/Ultra** - Full vision support
|
|
295
|
+
- **Models without vision** - Will receive images but cannot analyze them
|
|
175
296
|
|
|
176
|
-
|
|
297
|
+
Works in Cursor, Claude Code, and OpenCode - whichever model you have configured. No API key needed; Trie runs locally.
|
|
177
298
|
|
|
178
299
|
## YOLO Mode
|
|
179
300
|
|
|
@@ -272,7 +393,7 @@ docker-compose up
|
|
|
272
393
|
| Agent | Command | What It Does |
|
|
273
394
|
|-------|---------|--------------|
|
|
274
395
|
| **Super Reviewer** | `trie_pr_review` | Interactive PR review: walks through changes, explains code, finds issues |
|
|
275
|
-
| **Agent Smith** | `trie_agent_smith` |
|
|
396
|
+
| **Agent Smith** | `trie_agent_smith` | Ultimate vibe code enforcer: 38 hunters, file analysis, cross-file detection |
|
|
276
397
|
| **Comprehension** | `trie_explain` | Plain-language explanations of code, issues, or risks |
|
|
277
398
|
|
|
278
399
|
**Note:** Super Reviewer and Agent Smith are manually invoked agents. They don't run during `trie_scan`; use their dedicated commands directly.
|
|
@@ -293,7 +414,7 @@ Custom agents automatically activate during scans based on their rules.
|
|
|
293
414
|
|------|-------------|
|
|
294
415
|
| `trie_scan` | Intelligent scan with automatic agent selection |
|
|
295
416
|
| `trie_pr_review` | Interactive PR review - walks through changes file-by-file |
|
|
296
|
-
| `trie_agent_smith` |
|
|
417
|
+
| `trie_agent_smith` | Ultimate vibe code enforcer - 38 hunters, file analysis, cross-file detection |
|
|
297
418
|
| `trie_fix` | Apply high-confidence fixes |
|
|
298
419
|
| `trie_explain` | Plain-language explanations |
|
|
299
420
|
| `trie_watch` | Continuous scanning mode |
|
|
@@ -342,6 +463,7 @@ Create `.trie/config.json` to customize:
|
|
|
342
463
|
}
|
|
343
464
|
}
|
|
344
465
|
```
|
|
466
|
+
|
|
345
467
|
## License
|
|
346
468
|
|
|
347
469
|
MIT
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSmithAgent,
|
|
3
3
|
SUB_AGENT_PATTERNS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WSBTQJMH.js";
|
|
5
5
|
import "./chunk-DGUM43GV.js";
|
|
6
6
|
export {
|
|
7
7
|
AgentSmithAgent,
|
|
8
8
|
SUB_AGENT_PATTERNS
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=agent-smith-
|
|
10
|
+
//# sourceMappingURL=agent-smith-PRK7TYEI.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
AgentSmithAgent,
|
|
8
8
|
BaseAgent,
|
|
9
9
|
ProgressReporter
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WSBTQJMH.js";
|
|
11
11
|
import {
|
|
12
12
|
getVulnerabilityStats,
|
|
13
13
|
getVulnerabilityTrie,
|
|
@@ -9585,4 +9585,4 @@ export {
|
|
|
9585
9585
|
getSystemPrompt,
|
|
9586
9586
|
TrieFixTool
|
|
9587
9587
|
};
|
|
9588
|
-
//# sourceMappingURL=chunk-
|
|
9588
|
+
//# sourceMappingURL=chunk-TBCXJNH4.js.map
|