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