@triedotdev/mcp 1.0.32 → 1.0.33
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 +221 -100
- package/dist/{chunk-3724RQC3.js → chunk-IYWVUUJU.js} +422 -14
- package/dist/chunk-IYWVUUJU.js.map +1 -0
- package/dist/{chunk-B6MTR6IG.js → chunk-RAN27XKJ.js} +2 -2
- package/dist/cli/yolo-daemon.js +2 -2
- package/dist/index.js +2 -2
- package/dist/workers/agent-worker.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3724RQC3.js.map +0 -1
- /package/dist/{chunk-B6MTR6IG.js.map → chunk-RAN27XKJ.js.map} +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Customizable Parallel Agents for AI Code Review**
|
|
4
4
|
|
|
5
|
-
20
|
|
5
|
+
20 specialized agents scan your code for security, privacy, compliance, and bugs—all running in parallel with intelligent caching and real-time streaming.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -11,14 +11,15 @@
|
|
|
11
11
|
- [Features](#features)
|
|
12
12
|
- [Quick Start](#quick-start)
|
|
13
13
|
- [Usage](#usage)
|
|
14
|
+
- [MCP Tools](#mcp-tools)
|
|
14
15
|
- [CLI](#cli)
|
|
15
|
-
- [CI/CD Integration](#cicd-integration)
|
|
16
|
-
- [VS Code Extension](#vs-code-extension)
|
|
17
16
|
- [Built-in Agents](#built-in-agents)
|
|
18
17
|
- [Special Agents](#special-agents)
|
|
19
18
|
- [Custom Agents](#custom-agents)
|
|
19
|
+
- [AI-Enhanced Mode](#ai-enhanced-mode)
|
|
20
|
+
- [CI/CD Integration](#cicd-integration)
|
|
21
|
+
- [VS Code Extension](#vs-code-extension)
|
|
20
22
|
- [Configuration](#configuration)
|
|
21
|
-
- [Team Collaboration](#team-collaboration)
|
|
22
23
|
- [License](#license)
|
|
23
24
|
|
|
24
25
|
---
|
|
@@ -29,12 +30,11 @@
|
|
|
29
30
|
|
|
30
31
|
| Feature | Description |
|
|
31
32
|
|---------|-------------|
|
|
32
|
-
| **20
|
|
33
|
+
| **20 Built-in Agents** | Security, Privacy, SOC 2, Legal, Architecture, Performance, E2E, Visual QA, Data Flow, and more |
|
|
33
34
|
| **Parallel Execution** | True parallel execution with worker threads—3-5x faster scans |
|
|
34
35
|
| **Result Caching** | File-based caching with SHA256 hashing—70% faster repeated scans |
|
|
35
|
-
| **Streaming Progress** | Real-time progress updates as agents complete |
|
|
36
36
|
| **Smart Triaging** | Only activates relevant agents based on code context |
|
|
37
|
-
| **
|
|
37
|
+
| **Streaming Progress** | Real-time progress updates as agents complete |
|
|
38
38
|
|
|
39
39
|
### Developer Experience
|
|
40
40
|
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
| Feature | Description |
|
|
51
51
|
|---------|-------------|
|
|
52
52
|
| **CI/CD Integration** | GitHub Actions, pre-commit hooks, SARIF output |
|
|
53
|
-
| **Team Collaboration** | Issue assignment, Slack notifications, expertise-based routing |
|
|
54
53
|
| **VS Code Extension** | Inline diagnostics, quick-fix code actions, scan on save |
|
|
55
54
|
|
|
56
55
|
---
|
|
@@ -96,14 +95,10 @@ Trie works with any MCP-compatible AI tool (OpenCode, Windsurf, etc.). Configure
|
|
|
96
95
|
npx @triedotdev/mcp
|
|
97
96
|
```
|
|
98
97
|
|
|
99
|
-
Trie auto-detects which tool is running and adapts its output format accordingly.
|
|
100
|
-
|
|
101
98
|
---
|
|
102
99
|
|
|
103
100
|
## Usage
|
|
104
101
|
|
|
105
|
-
### Basic Scanning
|
|
106
|
-
|
|
107
102
|
Once configured, ask your AI assistant:
|
|
108
103
|
|
|
109
104
|
```
|
|
@@ -117,76 +112,70 @@ Run trie_security on this file
|
|
|
117
112
|
Run trie_soc2 to check compliance
|
|
118
113
|
```
|
|
119
114
|
|
|
120
|
-
###
|
|
115
|
+
### How It Works
|
|
121
116
|
|
|
122
|
-
Trie
|
|
123
|
-
|
|
124
|
-
| Mode | Description |
|
|
125
|
-
|------|-------------|
|
|
126
|
-
| **Pattern-Only** (default) | Fast regex matching for specific patterns (exposed secrets, async forEach, etc.). Limited coverage without AI. |
|
|
127
|
-
| **AI-Enhanced** | Full analysis: pattern detection + AI validation + deeper issue discovery. **Recommended for comprehensive scanning.** |
|
|
128
|
-
|
|
129
|
-
> **Note:** Pattern-only mode catches specific high-confidence issues (AWS keys, GitHub tokens, common anti-patterns) but won't find logic bugs, architectural issues, or context-dependent problems. For thorough analysis, enable AI mode.
|
|
130
|
-
|
|
131
|
-
**Enable AI mode:**
|
|
132
|
-
|
|
133
|
-
**For MCP usage (Cursor/Claude Code):**
|
|
134
|
-
|
|
135
|
-
Add the API key to your MCP configuration:
|
|
136
|
-
|
|
137
|
-
```json
|
|
138
|
-
{
|
|
139
|
-
"mcpServers": {
|
|
140
|
-
"Trie": {
|
|
141
|
-
"command": "npx",
|
|
142
|
-
"args": ["@triedotdev/mcp"],
|
|
143
|
-
"env": {
|
|
144
|
-
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
```
|
|
117
|
+
Trie generates **actionable reports** with high-confidence issues. It does not auto-fix code. Instead:
|
|
150
118
|
|
|
151
|
-
**
|
|
119
|
+
1. **Trie scans** your code and generates a report with prioritized issues
|
|
120
|
+
2. **You review** the issues in the report
|
|
121
|
+
3. **You (or Cursor/Claude Code)** apply fixes based on Trie's recommendations
|
|
152
122
|
|
|
153
|
-
|
|
123
|
+
---
|
|
154
124
|
|
|
155
|
-
|
|
156
|
-
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
|
|
157
|
-
```
|
|
125
|
+
## MCP Tools
|
|
158
126
|
|
|
159
|
-
|
|
127
|
+
These tools are available when using Trie via MCP (Cursor, Claude Code, etc.).
|
|
160
128
|
|
|
161
|
-
|
|
162
|
-
# Load environment variables
|
|
163
|
-
set -a; source .env.local; set +a
|
|
129
|
+
### Core Tools
|
|
164
130
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
131
|
+
| Tool | Description |
|
|
132
|
+
|------|-------------|
|
|
133
|
+
| `trie_scan` | Scan code with intelligent agent selection |
|
|
134
|
+
| `trie_watch` | Watch mode—automatically scan files as you code |
|
|
135
|
+
| `trie_fix` | Generate fix recommendations for detected issues |
|
|
136
|
+
| `trie_explain` | Explain code, issues, or changes in plain language |
|
|
168
137
|
|
|
169
|
-
|
|
170
|
-
> - **MCP config** (`env` in mcp.json) only applies to the MCP server process launched by Cursor/Claude Code
|
|
171
|
-
> - **CLI commands** (`trie-agent scan`, `trie-agent watch`) need the key in your shell environment (via `.env.local` or `export`)
|
|
172
|
-
> - The MCP server and CLI are separate processes with separate environments
|
|
138
|
+
### Custom Agent Tools
|
|
173
139
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
140
|
+
| Tool | Description |
|
|
141
|
+
|------|-------------|
|
|
142
|
+
| `trie_create_agent` | Create a custom agent from a PDF, TXT, or MD document |
|
|
143
|
+
| `trie_save_agent` | Save a custom agent configuration |
|
|
144
|
+
| `trie_list_agents` | List all registered agents (built-in and custom) |
|
|
145
|
+
|
|
146
|
+
### Individual Agent Tools
|
|
147
|
+
|
|
148
|
+
Run a specific agent directly:
|
|
149
|
+
|
|
150
|
+
| Tool | What It Catches |
|
|
151
|
+
|------|-----------------|
|
|
152
|
+
| `trie_security` | SQL injection, XSS, hardcoded secrets, auth bypasses, OWASP Top 10 |
|
|
153
|
+
| `trie_privacy` | GDPR/CCPA/PCI-DSS compliance, PII exposure, logging sensitive data |
|
|
154
|
+
| `trie_soc2` | Access control gaps, missing audit logs, encryption issues |
|
|
155
|
+
| `trie_legal` | HIPAA/COPPA compliance, consent patterns, data retention |
|
|
156
|
+
| `trie_accessibility` | WCAG 2.1 compliance, keyboard nav, screen readers, color contrast |
|
|
157
|
+
| `trie_architecture` | Code organization, SOLID principles, N+1 queries, scalability |
|
|
158
|
+
| `trie_bugs` | Null safety, edge cases, async issues, common bugs |
|
|
159
|
+
| `trie_types` | Type errors, missing annotations, null checks |
|
|
160
|
+
| `trie_devops` | Config issues, logging, environment variables, deployment patterns |
|
|
161
|
+
| `trie_clean` | Clean up AI-generated code: find vibe-coded patterns and quick fixes |
|
|
162
|
+
| `trie_design` | Awwwards-level polish, design systems, motion design |
|
|
163
|
+
| `trie_ux` | Simulate happy path, security tester, confused user, impatient user |
|
|
178
164
|
|
|
179
165
|
---
|
|
180
166
|
|
|
181
167
|
## CLI
|
|
182
168
|
|
|
183
|
-
Trie includes a CLI for terminal-based scanning and CI/CD integration.
|
|
169
|
+
Trie includes a CLI for terminal-based scanning and CI/CD integration.
|
|
184
170
|
|
|
185
|
-
> **Note:** The CLI is separate from MCP tools. Use MCP tools (`trie_scan`, `trie_watch`) when working inside Cursor/Claude Code. Use the CLI
|
|
171
|
+
> **Note:** The CLI is separate from MCP tools. Use MCP tools (`trie_scan`, `trie_watch`) when working inside Cursor/Claude Code. Use the CLI for terminal/CI usage.
|
|
186
172
|
|
|
187
173
|
### Commands
|
|
188
174
|
|
|
189
175
|
```bash
|
|
176
|
+
# List available commands
|
|
177
|
+
trie-agent help
|
|
178
|
+
|
|
190
179
|
# Basic scan (generates report and exits)
|
|
191
180
|
trie-agent scan
|
|
192
181
|
|
|
@@ -204,6 +193,9 @@ trie-agent scan --agents security,privacy,bugs
|
|
|
204
193
|
|
|
205
194
|
# Output JSON report
|
|
206
195
|
trie-agent scan --format json --output report.json
|
|
196
|
+
|
|
197
|
+
# List all available agents
|
|
198
|
+
trie-agent agents
|
|
207
199
|
```
|
|
208
200
|
|
|
209
201
|
### CLI vs MCP Tools
|
|
@@ -214,27 +206,160 @@ trie-agent scan --format json --output report.json
|
|
|
214
206
|
| **Terminal/CI** | CLI (`trie-agent scan`, `trie-agent watch`) | Running from terminal, CI pipelines, scripts |
|
|
215
207
|
| **VS Code** | VS Code extension | Using VS Code (not Cursor/Claude Code) |
|
|
216
208
|
|
|
217
|
-
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Built-in Agents
|
|
212
|
+
|
|
213
|
+
### Security & Compliance (4 agents)
|
|
214
|
+
|
|
215
|
+
| Agent | Description |
|
|
216
|
+
|-------|-------------|
|
|
217
|
+
| **Security** | SQL injection, XSS, hardcoded secrets, auth bypasses, OWASP Top 10 |
|
|
218
|
+
| **Privacy** | GDPR/CCPA/PCI-DSS compliance, PII exposure, data encryption |
|
|
219
|
+
| **SOC 2** | Access control gaps, missing audit logs, encryption, secrets management |
|
|
220
|
+
| **Legal** | HIPAA/COPPA compliance, consent patterns, data retention |
|
|
221
|
+
|
|
222
|
+
### Code Quality (6 agents)
|
|
223
|
+
|
|
224
|
+
| Agent | Description |
|
|
225
|
+
|-------|-------------|
|
|
226
|
+
| **TypeCheck** | Type errors, missing annotations, null checks |
|
|
227
|
+
| **Bug Finding** | Null safety, edge cases, async issues, race conditions |
|
|
228
|
+
| **Software Architect** | Code organization, SOLID principles, N+1 queries, scalability |
|
|
229
|
+
| **Test** | Missing test coverage, test quality, edge case coverage |
|
|
230
|
+
| **Performance** | Memory leaks, inefficient algorithms, bundle size |
|
|
231
|
+
| **Trie Clean** | Clean up AI-generated "vibe code": find common mistakes and quick fixes |
|
|
232
|
+
|
|
233
|
+
### UI/UX (5 agents)
|
|
234
|
+
|
|
235
|
+
| Agent | Description |
|
|
236
|
+
|-------|-------------|
|
|
237
|
+
| **Accessibility** | WCAG 2.1 compliance, keyboard nav, screen readers, color contrast |
|
|
238
|
+
| **Design Engineer** | Awwwards-level polish, design systems, motion design, creative CSS |
|
|
239
|
+
| **User Testing** | Simulate happy path, security tester, confused user, impatient user |
|
|
240
|
+
| **Visual QA** | Visual regression, responsive design, cross-browser issues |
|
|
241
|
+
| **E2E** | End-to-end test coverage, user flow validation |
|
|
242
|
+
|
|
243
|
+
### Operations (3 agents)
|
|
244
|
+
|
|
245
|
+
| Agent | Description |
|
|
246
|
+
|-------|-------------|
|
|
247
|
+
| **DevOps** | Config issues, logging, environment variables, deployment patterns |
|
|
248
|
+
| **Data Flow** | Data flow analysis, state management, API contracts |
|
|
249
|
+
| **Comprehension** | Plain language explanations for non-technical stakeholders |
|
|
218
250
|
|
|
219
251
|
---
|
|
220
252
|
|
|
221
|
-
##
|
|
253
|
+
## Special Agents
|
|
222
254
|
|
|
223
|
-
|
|
255
|
+
These agents are **manually invoked**—they don't run during `trie_scan`.
|
|
224
256
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
257
|
+
### Super Reviewer
|
|
258
|
+
|
|
259
|
+
Interactive PR reviews: walks through changes file-by-file with AI guidance.
|
|
228
260
|
|
|
229
|
-
|
|
261
|
+
```
|
|
262
|
+
Run trie_super_reviewer on this PR
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Agent Smith
|
|
266
|
+
|
|
267
|
+
The ultimate AI code enforcer—43 specialized hunters targeting AI-generated anti-patterns. Runs a swarm of sub-agents to find "vibe-coded" patterns.
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
Run trie_agent_smith on this codebase
|
|
271
|
+
```
|
|
230
272
|
|
|
231
273
|
---
|
|
232
274
|
|
|
233
|
-
##
|
|
275
|
+
## Custom Agents
|
|
234
276
|
|
|
235
|
-
|
|
277
|
+
Create your own agents from PDFs, style guides, or documentation.
|
|
236
278
|
|
|
237
|
-
###
|
|
279
|
+
### Create a Custom Agent
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
Create a custom agent from my-style-guide.pdf called "brand_guidelines"
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Or use the MCP tool directly:
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
trie_create_agent with filePath: "./docs/style-guide.pdf", agentName: "brand_guidelines"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### How It Works
|
|
292
|
+
|
|
293
|
+
1. **Parse** — Trie extracts text from your document (PDF, TXT, MD)
|
|
294
|
+
2. **Compress** — AI distills the document into actionable rules
|
|
295
|
+
3. **Register** — The agent is saved to `.trie/agents/` and loaded automatically
|
|
296
|
+
|
|
297
|
+
### List Custom Agents
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
trie_list_agents
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Custom agents are stored in `.trie/agents/` in your project directory.
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## AI-Enhanced Mode
|
|
308
|
+
|
|
309
|
+
Trie works in two modes:
|
|
310
|
+
|
|
311
|
+
| Mode | Description |
|
|
312
|
+
|------|-------------|
|
|
313
|
+
| **Pattern-Only** (default) | Fast regex matching for specific patterns (exposed secrets, async forEach, etc.). Limited coverage. |
|
|
314
|
+
| **AI-Enhanced** | Full analysis: pattern detection + AI validation + deeper issue discovery. **Recommended.** |
|
|
315
|
+
|
|
316
|
+
### Enable AI Mode
|
|
317
|
+
|
|
318
|
+
**For MCP usage (Cursor/Claude Code):**
|
|
319
|
+
|
|
320
|
+
Add the API key to your MCP configuration:
|
|
321
|
+
|
|
322
|
+
```json
|
|
323
|
+
{
|
|
324
|
+
"mcpServers": {
|
|
325
|
+
"Trie": {
|
|
326
|
+
"command": "npx",
|
|
327
|
+
"args": ["@triedotdev/mcp"],
|
|
328
|
+
"env": {
|
|
329
|
+
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**For CLI usage (terminal/CI):**
|
|
337
|
+
|
|
338
|
+
Add the API key to your project's `.env.local` file:
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Then load it before running CLI commands:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
set -a; source .env.local; set +a
|
|
348
|
+
trie-agent scan
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
> **Important:** MCP config only applies to the MCP server. CLI commands need the key in your shell environment.
|
|
352
|
+
|
|
353
|
+
When AI is enabled, you'll see:
|
|
354
|
+
- `AI-powered analysis enabled` in output
|
|
355
|
+
- `[AI VALIDATED]` and `[AI FOUND]` tags on issues
|
|
356
|
+
- Richer fix recommendations
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## CI/CD Integration
|
|
361
|
+
|
|
362
|
+
### GitHub Actions
|
|
238
363
|
|
|
239
364
|
Copy the workflow files to your repo:
|
|
240
365
|
|
|
@@ -245,19 +370,15 @@ cp node_modules/@triedotdev/mcp/.github/workflows/trie-*.yml .github/workflows/
|
|
|
245
370
|
|
|
246
371
|
### Available Workflows
|
|
247
372
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
Runs on push to `main`/`develop`, PRs, and daily schedule (2 AM UTC).
|
|
251
|
-
|
|
252
|
-
**Features:**
|
|
373
|
+
**Full Security Scan** (`trie-security-scan.yml`)
|
|
374
|
+
- Runs on push to `main`/`develop`, PRs, and daily schedule
|
|
253
375
|
- Runs security agents: `security`, `privacy`, `soc2`, `legal`
|
|
254
376
|
- Uploads SARIF to GitHub Security tab
|
|
255
377
|
- Comments on PRs with summary
|
|
256
378
|
- Fails build on critical issues
|
|
257
379
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
Runs on every PR—fast, incremental scanning.
|
|
380
|
+
**Pre-commit Checks** (`trie-pre-commit.yml`)
|
|
381
|
+
- Runs on every PR—fast, incremental scanning
|
|
261
382
|
|
|
262
383
|
---
|
|
263
384
|
|
|
@@ -265,32 +386,32 @@ Runs on every PR—fast, incremental scanning.
|
|
|
265
386
|
|
|
266
387
|
Native VS Code extension with inline diagnostics and quick fixes.
|
|
267
388
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
| Agent | Command | What It Catches |
|
|
275
|
-
|-------|---------|-----------------|
|
|
276
|
-
| **Security** | `trie_security` | SQL injection, XSS, hardcoded secrets, auth bypasses, OWASP Top 10 |
|
|
277
|
-
| **Privacy** | `trie_privacy` | GDPR/CCPA/PCI-DSS compliance, data exposure, logging sensitive data |
|
|
278
|
-
| **SOC 2** | `trie_soc2` | Access control gaps, missing audit logs, encryption issues |
|
|
279
|
-
| **Legal** | `trie_legal` | HIPAA/COPPA compliance, consent patterns, data retention |
|
|
389
|
+
### Features
|
|
390
|
+
- Inline diagnostics from Trie scans
|
|
391
|
+
- Quick-fix code actions
|
|
392
|
+
- Scan on save
|
|
393
|
+
- Status bar integration
|
|
280
394
|
|
|
281
395
|
---
|
|
282
396
|
|
|
283
|
-
##
|
|
284
|
-
|
|
285
|
-
These agents are **manually invoked**—they don't run during `trie_scan`.
|
|
397
|
+
## Configuration
|
|
286
398
|
|
|
287
|
-
###
|
|
399
|
+
### Scan Options
|
|
288
400
|
|
|
289
|
-
|
|
401
|
+
| Option | Description | Default |
|
|
402
|
+
|--------|-------------|---------|
|
|
403
|
+
| `parallel` | Run agents in parallel | `true` |
|
|
404
|
+
| `cache` | Enable result caching | `true` |
|
|
405
|
+
| `maxConcurrency` | Max parallel agents | `4` |
|
|
406
|
+
| `timeoutMs` | Agent timeout in milliseconds | `120000` |
|
|
407
|
+
| `streaming` | Stream progress updates | `true` |
|
|
408
|
+
| `workers` | Use worker threads | `true` |
|
|
290
409
|
|
|
291
|
-
###
|
|
410
|
+
### Example
|
|
292
411
|
|
|
293
|
-
|
|
412
|
+
```
|
|
413
|
+
trie_scan with parallel: true, cache: true, maxConcurrency: 8
|
|
414
|
+
```
|
|
294
415
|
|
|
295
416
|
---
|
|
296
417
|
|