@triedotdev/mcp 1.0.27 β†’ 1.0.29

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/QUICK_START.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Quick Start Guide
2
2
 
3
- Get Trie Agent up and running in minutes to start scanning and fixing AI-generated code.
3
+ Get Trie Agent up and running in minutes to start scanning and reviewing AI-generated code.
4
4
 
5
5
  ## Prerequisites
6
6
 
@@ -104,11 +104,11 @@ Use trie_scan to analyze the current file
104
104
  3. **Review results** - Trie will show:
105
105
  - Risk level and activated agents
106
106
  - Critical issues requiring review
107
- - Auto-fixable issues
107
+ - Suggested fix prompts for AI
108
108
  - Plain-language explanations
109
- 4. **Apply fixes:**
109
+ 4. **Fix issues:**
110
110
  ```
111
- Auto-fix the high-confidence issues
111
+ Apply the suggested fixes for the critical issues
112
112
  ```
113
113
  5. **Generate tests:**
114
114
  ```
@@ -118,10 +118,10 @@ Use trie_scan to analyze the current file
118
118
  ## Available Tools
119
119
 
120
120
  - **`trie_scan`** - Scan code with intelligent agent selection
121
- - **`trie_fix`** - Apply high-confidence fixes automatically
121
+ - **`trie_fix`** - Generate high-confidence fix prompts
122
122
  - **`trie_explain`** - Get plain-language explanations of code/issues
123
123
  - **`trie_test`** - Generate tests or check coverage
124
- - **`trie_commit`** - Create smart commit messages
124
+ - **`trie_watch`** - Monitor files for changes and report issues
125
125
  - **`trie_register_agent`** - Add custom agents
126
126
 
127
127
  ## Example Output
@@ -140,8 +140,8 @@ Results:
140
140
  Score: 72/100 (needs work)
141
141
 
142
142
  πŸ”΄ 2 Critical Issues (require your review)
143
- 🟑 3 Serious Issues (can auto-fix)
144
- πŸ”΅ 2 Moderate Issues (can auto-fix)
143
+ 🟑 3 Serious Issues
144
+ πŸ”΅ 2 Moderate Issues
145
145
 
146
146
  Critical Issues Preview:
147
147
  1. Password stored without hashing (auth/signup.ts:23)
@@ -163,8 +163,7 @@ Create `.trie/config.json` in your project root to customize behavior:
163
163
  "critical": 70,
164
164
  "high": 40,
165
165
  "medium": 20
166
- },
167
- "autoFixConfidence": 0.95
166
+ }
168
167
  },
169
168
  "agents": {
170
169
  "builtin": {
@@ -215,14 +214,13 @@ Update your MCP config with the correct path.
215
214
 
216
215
  - **Try different code patterns** - Test with auth, payments, UI components
217
216
  - **Explore agents** - See which agents activate for different code types
218
- - **Use auto-fix** - Let Trie fix high-confidence issues automatically
219
217
  - **Generate tests** - Create comprehensive test suites
220
218
  - **Add custom agents** - Extend Trie with your own review logic
221
219
 
222
220
  ## Support
223
221
 
224
222
  - πŸ“š **Documentation**: [trie.dev/docs](https://trie.dev/docs)
225
- - πŸ› **Issues**: [GitHub Issues](https://github.com/Trie-OS/mcp-agent/issues)
223
+ - πŸ› **Issues**: [GitHub Issues](https://github.com/Trie-OS/Trie-Agent/issues)
226
224
  - πŸ’¬ **Community**: [Discord](https://discord.gg/trie-ai)
227
225
 
228
226
  ---
package/README.md CHANGED
@@ -18,7 +18,6 @@
18
18
  - [Special Agents](#special-agents)
19
19
  - [Custom Agents](#custom-agents)
20
20
  - [Configuration](#configuration)
21
- - [Docker](#docker)
22
21
  - [Team Collaboration](#team-collaboration)
23
22
  - [License](#license)
24
23
 
@@ -41,7 +40,7 @@
41
40
 
42
41
  | Feature | Description |
43
42
  |---------|-------------|
44
- | **YOLO Mode** | Autonomous auto-fixing as you code |
43
+ | **Watch Mode** | Automatically scan files as you code |
45
44
  | **Custom Agents** | Create agents from PDFs, docs, or style guides |
46
45
  | **Works Everywhere** | Auto-detects Cursor, Claude Code, OpenCode, VS Codeβ€”adapts output automatically |
47
46
  | **AI-Enhanced Mode** | Optional deeper analysis with `ANTHROPIC_API_KEY` |
@@ -53,7 +52,6 @@
53
52
  | **CI/CD Integration** | GitHub Actions, pre-commit hooks, SARIF output |
54
53
  | **Team Collaboration** | Issue assignment, Slack notifications, expertise-based routing |
55
54
  | **VS Code Extension** | Inline diagnostics, quick-fix code actions, scan on save |
56
- | **Docker Support** | Optimized multi-stage builds for containers |
57
55
 
58
56
  ---
59
57
 
@@ -90,16 +88,6 @@ claude mcp add Trie --scope user -- npx @triedotdev/mcp
90
88
 
91
89
  **Restart Claude Code after adding the MCP server.**
92
90
 
93
- ### Other MCP-Compatible Tools
94
-
95
- Trie works with any MCP-compatible AI tool (OpenCode, Windsurf, etc.). Configure your tool to run:
96
-
97
- ```bash
98
- npx @triedotdev/mcp
99
- ```
100
-
101
- Trie auto-detects which tool is running and adapts its output format accordingly.
102
-
103
91
  ---
104
92
 
105
93
  ## Usage
@@ -136,7 +124,10 @@ Trie works in two modes:
136
124
  # Environment variable
137
125
  export ANTHROPIC_API_KEY=sk-ant-...
138
126
 
139
- # Or in MCP config (Cursor)
127
+ # Or add it to your project (recommended for CLI usage)
128
+ echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env.local
129
+
130
+ # Or in MCP config (Cursor / MCP tools)
140
131
  {
141
132
  "mcpServers": {
142
133
  "Trie": {
@@ -150,6 +141,9 @@ export ANTHROPIC_API_KEY=sk-ant-...
150
141
  }
151
142
  ```
152
143
 
144
+ > **Important:** The `env` you set in Cursor’s MCP config is only inherited by the **MCP server process** that Cursor launches.
145
+ > It does **not** automatically apply to standalone terminal commands like `trie-agent scan` unless your shell/project environment also has `ANTHROPIC_API_KEY`.
146
+
153
147
  When AI is enabled, you'll see:
154
148
  - `AI-powered analysis enabled` in output
155
149
  - `[AI VALIDATED]` and `[AI FOUND]` tags on issues
@@ -167,6 +161,9 @@ Trie includes a powerful CLI for terminal-based scanning.
167
161
  # Basic scan
168
162
  trie-agent scan
169
163
 
164
+ # Watch for changes
165
+ trie-agent watch
166
+
170
167
  # Scan specific directory
171
168
  trie-agent scan --directory ./src
172
169
 
@@ -175,66 +172,6 @@ trie-agent scan --files "src/api.ts,src/auth.ts"
175
172
 
176
173
  # Run specific agents
177
174
  trie-agent scan --agents security,privacy,bugs
178
-
179
- # Output formats
180
- trie-agent scan --format json --output results.json
181
- trie-agent scan --format sarif --output results.sarif
182
- ```
183
-
184
- ### Performance Options
185
-
186
- ```bash
187
- # Parallel execution (default: on)
188
- trie-agent scan --parallel
189
-
190
- # Enable caching (default: on)
191
- trie-agent scan --cache
192
-
193
- # Set concurrency
194
- trie-agent scan --max-concurrency 8
195
-
196
- # Use worker threads
197
- trie-agent scan --workers
198
-
199
- # Set timeout (ms)
200
- trie-agent scan --timeout 120000
201
- ```
202
-
203
- ### Interactive Mode
204
-
205
- ```bash
206
- # Terminal UI with real-time progress
207
- trie-agent scan --interactive
208
- ```
209
-
210
- The interactive dashboard provides:
211
- - **Real-time progress bars** per agent
212
- - **Issue browser** with keyboard navigation
213
- - **Filters** by severity, agent, search
214
- - **Multiple views**: overview, issues, agents, files
215
-
216
- **Keyboard shortcuts:**
217
- | Key | Action |
218
- |-----|--------|
219
- | `Tab` | Switch views |
220
- | `↑/↓` | Navigate issues |
221
- | `Enter` | View issue details |
222
- | `f` | Filter issues |
223
- | `s` | Toggle sort |
224
- | `?` | Show help |
225
- | `q` | Quit |
226
-
227
- ### Watch Mode (YOLO)
228
-
229
- ```bash
230
- # Start daemon with auto-fixing
231
- trie-yolo
232
-
233
- # Watch without auto-fix
234
- trie-yolo --no-yolo
235
-
236
- # One-shot scan
237
- trie-yolo --once
238
175
  ```
239
176
 
240
177
  ---
@@ -268,114 +205,12 @@ Runs on push to `main`/`develop`, PRs, and daily schedule (2 AM UTC).
268
205
 
269
206
  Runs on every PRβ€”fast, incremental scanning.
270
207
 
271
- **Features:**
272
- - Only scans changed files (efficient for large codebases)
273
- - 5-minute timeout for quick feedback
274
- - Agent Smith pattern detection
275
- - Comments on PR if issues found
276
-
277
- ### Reusable Action
278
-
279
- Use the action in any workflow:
280
-
281
- ```yaml
282
- name: Security Check
283
- on: [push, pull_request]
284
-
285
- jobs:
286
- scan:
287
- runs-on: ubuntu-latest
288
- steps:
289
- - uses: actions/checkout@v4
290
-
291
- - name: Trie Security Scan
292
- uses: trie-dev/security-action@v1
293
- with:
294
- agents: security,privacy,bugs
295
- fail-on: critical
296
- format: sarif
297
- upload-sarif: true
298
- comment-pr: true
299
- parallel: true
300
- cache: true
301
- ```
302
-
303
- **Inputs:**
304
-
305
- | Input | Default | Description |
306
- |-------|---------|-------------|
307
- | `agents` | `security,privacy,bugs` | Comma-separated agent list |
308
- | `fail-on` | `critical` | Fail threshold: `critical`, `serious`, `moderate`, `low` |
309
- | `format` | `sarif` | Output format: `json`, `sarif`, `console` |
310
- | `upload-sarif` | `true` | Upload to GitHub Security tab |
311
- | `comment-pr` | `true` | Comment results on PRs |
312
- | `parallel` | `true` | Run agents in parallel |
313
- | `cache` | `true` | Enable result caching |
314
-
315
- **Outputs:**
316
-
317
- | Output | Description |
318
- |--------|-------------|
319
- | `results-file` | Path to scan results |
320
- | `critical-count` | Number of critical issues |
321
- | `serious-count` | Number of serious issues |
322
- | `total-count` | Total issues found |
323
- | `passed` | Whether scan passed |
324
-
325
- ### Required Secrets
326
-
327
- | Secret | Required | Description |
328
- |--------|----------|-------------|
329
- | `ANTHROPIC_API_KEY` | Optional | Enables AI-enhanced scanning |
330
-
331
208
  ---
332
209
 
333
210
  ## VS Code Extension
334
211
 
335
212
  Native VS Code extension with inline diagnostics and quick fixes.
336
213
 
337
- ### Features
338
-
339
- - **Inline Diagnostics** β€” Issues appear as squiggly underlines in editor
340
- - **Quick-fix Code Actions** β€” "Copy suggested fix" for each issue
341
- - **Scan on Save** β€” Automatically scan files when saved
342
- - **Workspace Scanning** β€” Scan entire workspace with one command
343
-
344
- ### Installation
345
-
346
- ```bash
347
- cd vscode-extension
348
- npm install
349
- npm run compile
350
- # Then "Run Extension" from VS Code debugger
351
- ```
352
-
353
- Or package for distribution:
354
-
355
- ```bash
356
- npx vsce package
357
- ```
358
-
359
- ### Commands
360
-
361
- | Command | Description |
362
- |---------|-------------|
363
- | `Trie: Scan Workspace` | Scan all files in workspace |
364
- | `Trie: Scan Current File` | Scan active file only |
365
- | `Trie: Copy Fix` | Copy suggested fix to clipboard |
366
-
367
- ### Settings
368
-
369
- | Setting | Default | Description |
370
- |---------|---------|-------------|
371
- | `trie.executablePath` | `trie-agent` | Path to CLI executable |
372
- | `trie.scanOnSave` | `true` | Scan files on save |
373
- | `trie.parallel` | `true` | Run agents in parallel |
374
- | `trie.cache` | `true` | Enable caching |
375
- | `trie.useWorkers` | `false` | Use worker threads |
376
- | `trie.maxConcurrency` | `4` | Max parallel agents |
377
- | `trie.timeoutMs` | `120000` | Scan timeout |
378
-
379
214
  ---
380
215
 
381
216
  ## Built-in Agents
@@ -389,35 +224,6 @@ npx vsce package
389
224
  | **SOC 2** | `trie_soc2` | Access control gaps, missing audit logs, encryption issues |
390
225
  | **Legal** | `trie_legal` | HIPAA/COPPA compliance, consent patterns, data retention |
391
226
 
392
- ### Code Quality
393
-
394
- | Agent | Command | What It Catches |
395
- |-------|---------|-----------------|
396
- | **Architecture** | `trie_architecture` | N+1 queries, circular deps, SOLID violations, god classes |
397
- | **Bugs** | `trie_bugs` | Null dereference, race conditions, off-by-one, async bugs |
398
- | **Types** | `trie_types` | Missing annotations, unsafe casts, implicit `any` |
399
- | **Clean** | `trie_clean` | AI code smells: huge files, console.logs, useEffect abuse |
400
- | **Data Flow** | `trie_data_flow` | Schema mismatches, hardcoded IDs, type coercion bugs |
401
- | **Performance** | `trie_performance` | Memory leaks, N+1 queries, unnecessary re-renders |
402
-
403
- ### Design & UX
404
-
405
- | Agent | Command | What It Catches |
406
- |-------|---------|-----------------|
407
- | **Design Engineer** | `trie_design` | Design systems, motion design, Awwwards-level polish |
408
- | **Accessibility** | `trie_accessibility` | Missing ARIA, color contrast, keyboard nav (WCAG 2.1) |
409
- | **UX** | `trie_ux` | Missing loading states, poor error handling, broken flows |
410
- | **Visual QA** | `trie_visual_qa` | Layout shifts, z-index wars, responsive gaps |
411
- | **Visual QA Browser** | `trie_visual_qa_browser` | Screenshots at 3 viewports for vision analysis |
412
-
413
- ### DevOps & Testing
414
-
415
- | Agent | Command | What It Catches |
416
- |-------|---------|-----------------|
417
- | **DevOps** | `trie_devops` | Missing env vars, config issues, no health checks |
418
- | **Test** | `trie_test` | Missing coverage, untested edge cases, weak assertions |
419
- | **E2E** | `trie_e2e` | Flaky tests, hardcoded waits, brittle selectors |
420
-
421
227
  ---
422
228
 
423
229
  ## Special Agents
@@ -428,270 +234,10 @@ These agents are **manually invoked**β€”they don't run during `trie_scan`.
428
234
 
429
235
  Interactive PR reviews: walks through changes file-by-file with AI guidance.
430
236
 
431
- ```
432
- Use trie_pr_review
433
- Use trie_pr_review with pr:"12345"
434
- ```
435
-
436
- **What it does:**
437
- - Orders files for comprehension (schemas β†’ core β†’ implementation β†’ tests)
438
- - Explains what changed and why
439
- - Hunts for state bugs, race conditions, missing error handling
440
- - Pauses after each file for your input
441
-
442
- **Requirements:** [GitHub CLI (`gh`)](https://cli.github.com/) installed and authenticated
443
-
444
237
  ### Agent Smith
445
238
 
446
- *"I'm going to be honest with you... I hate this AI code."*
447
-
448
239
  The ultimate AI code enforcerβ€”43 specialized hunters targeting AI-generated anti-patterns.
449
240
 
450
- ```
451
- Use trie_agent_smith
452
- Use trie_smith
453
- ```
454
-
455
- **43 Hunters across 9 categories:**
456
-
457
- | Category | Hunters |
458
- |----------|---------|
459
- | **Security** | exposed-secret, frontend-env, hardcoded-localhost, sql-injection, dangeroushtml |
460
- | **AI Code Smells** | console, any, ts-ignore, eslint-disable, debugger, force-flag |
461
- | **Async/Promise Bugs** | async-useeffect, async-foreach, missing-await, empty-catch, floating-promise |
462
- | **React Anti-patterns** | useeffect-abuse, usestate-explosion, index-key, inline-object, prop-drilling |
463
- | **Missing UX** | missing-loading, missing-error, missing-empty, page-reload |
464
- | **Backend Issues** | no-validation, raw-error, n-plus-one |
465
- | **Incomplete Code** | todo, vibe-comment, placeholder, sleep-hack, fallback |
466
- | **Dead Code** | commented-code, unreachable-code, unused-import, empty-function, dead-branch |
467
- | **AI Slop Aesthetic** | purple-gradient, star-icon, generic-hero, emoji-overflow, inter-font |
468
-
469
- **Memory commands:**
470
- ```
471
- trie_agent_smith show_stats:true # Show memory statistics
472
- trie_agent_smith clear_memory:true # Clear all memory
473
- ```
474
-
475
- ### Visual QA Browser
476
-
477
- Screenshot-based visual testing with AI vision analysis.
478
-
479
- ```
480
- Use trie_visual_qa_browser
481
- Use trie_visual_qa_browser url:"http://localhost:3000"
482
- ```
483
-
484
- **What it does:**
485
- 1. Auto-detects running dev server
486
- 2. Captures screenshots at mobile (375px), tablet (768px), desktop (1440px)
487
- 3. Returns images for AI vision analysis
488
-
489
- **Requirements:** Playwright (`npx playwright install chromium`) and a vision-capable model
490
-
491
- ---
492
-
493
- ## Custom Agents
494
-
495
- Create specialized agents from any document:
496
-
497
- ```
498
- Use trie_create_agent with filePath:"./style-guide.pdf" agentName:"my-style"
499
- ```
500
-
501
- Supported formats: PDF, Markdown, text files.
502
-
503
- Custom agents automatically activate during scans based on their rules.
504
-
505
- ---
506
-
507
- ## Configuration
508
-
509
- ### Config File
510
-
511
- Create `.trie/config.json` in your project root:
512
-
513
- ```json
514
- {
515
- "version": "1.0.0",
516
- "agents": {
517
- "enabled": ["security", "privacy", "bugs", "types"],
518
- "disabled": [],
519
- "parallel": true,
520
- "maxConcurrency": 4,
521
- "timeout": 120000,
522
- "cache": true
523
- },
524
- "compliance": {
525
- "standards": ["SOC2", "GDPR"],
526
- "enforceCompliance": false,
527
- "reportFormat": "json"
528
- },
529
- "output": {
530
- "format": "console",
531
- "level": "all",
532
- "interactive": false,
533
- "streaming": true,
534
- "colors": true
535
- },
536
- "paths": {
537
- "include": [],
538
- "exclude": ["node_modules", "dist", "build", ".git"],
539
- "configDir": ".trie",
540
- "outputDir": "trie-reports"
541
- },
542
- "integrations": {
543
- "slack": {
544
- "enabled": false,
545
- "webhook": "",
546
- "channel": "#security-alerts"
547
- },
548
- "github": {
549
- "enabled": true
550
- }
551
- }
552
- }
553
- ```
554
-
555
- ### Configuration Validation
556
-
557
- Trie validates configuration on startup using Zod schemas:
558
- - Invalid configurations log errors and fall back to defaults
559
- - Missing API keys show warnings
560
- - File paths are verified to exist
561
-
562
- ---
563
-
564
- ## Docker
565
-
566
- Optimized multi-stage Docker builds for CI/CD or isolated environments.
567
-
568
- ### Build
569
-
570
- ```bash
571
- docker build -t trie-agent .
572
- ```
573
-
574
- ### Run
575
-
576
- ```bash
577
- # YOLO mode (auto-fix)
578
- docker run -v $(pwd):/app trie-agent --yolo
579
-
580
- # Watch mode (scan only)
581
- docker run -v $(pwd):/app trie-agent
582
-
583
- # CI mode (one-shot scan)
584
- docker run -v $(pwd):/app trie-agent --once
585
- ```
586
-
587
- ### Docker Compose
588
-
589
- ```bash
590
- docker-compose up
591
- ```
592
-
593
- ### Modes
594
-
595
- | Mode | Flag | Description |
596
- |------|------|-------------|
597
- | YOLO | `--yolo` | Auto-fix high-confidence issues |
598
- | Watch | (default) | Scan on file changes |
599
- | CI | `--once` | One-shot scan, exit with code |
600
-
601
- ---
602
-
603
- ## Team Collaboration
604
-
605
- Coordinate security scanning across your team with automatic issue assignment and notifications.
606
-
607
- ### Team Configuration
608
-
609
- Create `.trie/team.json`:
610
-
611
- ```json
612
- {
613
- "members": [
614
- {
615
- "id": "alice",
616
- "name": "Alice Smith",
617
- "email": "alice@example.com",
618
- "slack": "@alice",
619
- "expertise": ["security", "privacy"],
620
- "maxIssues": 10
621
- },
622
- {
623
- "id": "bob",
624
- "name": "Bob Jones",
625
- "email": "bob@example.com",
626
- "slack": "@bob",
627
- "expertise": ["bugs", "performance"],
628
- "maxIssues": 15
629
- }
630
- ]
631
- }
632
- ```
633
-
634
- ### Automatic Issue Assignment
635
-
636
- Trie automatically assigns issues based on:
637
- - **Expertise matching** β€” Security issues go to security experts
638
- - **Workload balancing** β€” Respects `maxIssues` limits
639
- - **Priority weighting** β€” Critical issues assigned first
640
-
641
- ### Slack Integration
642
-
643
- Uses Slack's [Incoming Webhooks](https://api.slack.com/messaging/webhooks) β€” no OAuth or bot tokens required.
644
-
645
- **Setup:**
646
- 1. Go to your Slack workspace β†’ Apps β†’ Incoming Webhooks
647
- 2. Create a webhook for your channel
648
- 3. Add to `.trie/config.json`:
649
-
650
- ```json
651
- {
652
- "integrations": {
653
- "slack": {
654
- "enabled": true,
655
- "webhook": "https://hooks.slack.com/services/...",
656
- "channel": "#security-alerts"
657
- }
658
- }
659
- }
660
- ```
661
-
662
- **Notifications sent for:**
663
- - Scan completion summaries with issue counts
664
- - Critical issue alerts (immediate)
665
- - Issue assignments to team members
666
- - Escalations for overdue items
667
- - Daily/weekly team summaries
668
-
669
- ### Smart Issue Grouping
670
-
671
- Issues are automatically:
672
- - **Grouped** by pattern (same issue across files)
673
- - **Prioritized** by risk score (0-100)
674
- - **Categorized**: security, performance, maintainability, correctness, style
675
- - **Bulk-fix detected** for trivial issues
676
-
677
- ---
678
-
679
- ## Available Tools
680
-
681
- | Tool | Description |
682
- |------|-------------|
683
- | `trie_scan` | Intelligent scan with automatic agent selection |
684
- | `trie_pr_review` | Interactive PR review |
685
- | `trie_agent_smith` | AI code enforcerβ€”43 hunters |
686
- | `trie_fix` | Apply high-confidence fixes |
687
- | `trie_explain` | Plain-language explanations |
688
- | `trie_watch` | Continuous scanning mode |
689
- | `trie_create_agent` | Create custom agent from document |
690
- | `trie_list_agents` | List all available agents |
691
- | `trie_visual_qa_browser` | Screenshot for vision analysis |
692
-
693
- Plus individual agent tools: `trie_security`, `trie_privacy`, `trie_soc2`, `trie_bugs`, etc.
694
-
695
241
  ---
696
242
 
697
243
  ## License