@triedotdev/mcp 1.0.81 → 1.0.83

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.
@@ -12,7 +12,7 @@ import {
12
12
  isGitRepo,
13
13
  isTrieInitialized,
14
14
  loadConfig
15
- } from "./chunk-2BXLPYHR.js";
15
+ } from "./chunk-W4SQE6F7.js";
16
16
  import {
17
17
  getVulnerabilityStats,
18
18
  getVulnerabilityTrie,
@@ -31,7 +31,7 @@ import {
31
31
  removeGlobalSkill,
32
32
  runShellCommand,
33
33
  updateContextAfterScan
34
- } from "./chunk-YKG4KIY7.js";
34
+ } from "./chunk-CGALCUZE.js";
35
35
  import {
36
36
  findCrossProjectPatterns
37
37
  } from "./chunk-EWIEXQES.js";
@@ -9983,4 +9983,4 @@ export {
9983
9983
  InteractiveDashboard,
9984
9984
  TrieScanTool
9985
9985
  };
9986
- //# sourceMappingURL=chunk-MVWRFARH.js.map
9986
+ //# sourceMappingURL=chunk-IDDEVC3M.js.map
@@ -3,7 +3,7 @@ import {
3
3
  getSkillRegistry,
4
4
  loadContextState,
5
5
  runExecFile
6
- } from "./chunk-YKG4KIY7.js";
6
+ } from "./chunk-CGALCUZE.js";
7
7
  import {
8
8
  getGlobalMemoryStats
9
9
  } from "./chunk-EWIEXQES.js";
@@ -2245,4 +2245,4 @@ export {
2245
2245
  getSkillsByCategory,
2246
2246
  getSkillCategories
2247
2247
  };
2248
- //# sourceMappingURL=chunk-2BXLPYHR.js.map
2248
+ //# sourceMappingURL=chunk-W4SQE6F7.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getUncommittedChanges,
9
9
  getWorkingTreeDiff,
10
10
  loadConfig
11
- } from "./chunk-2BXLPYHR.js";
11
+ } from "./chunk-W4SQE6F7.js";
12
12
  import {
13
13
  ContextGraph
14
14
  } from "./chunk-B7CLAOEK.js";
@@ -1688,4 +1688,4 @@ export {
1688
1688
  LearningEngine,
1689
1689
  LinearIngester
1690
1690
  };
1691
- //# sourceMappingURL=chunk-FW435YKY.js.map
1691
+ //# sourceMappingURL=chunk-YHQYOD6M.js.map
@@ -1 +1,16 @@
1
1
  #!/usr/bin/env node
2
+ /**
3
+ * Trie Agent CLI
4
+ *
5
+ * Main command-line interface for Trie Agent.
6
+ * Provides help, setup, and routes to specific tools.
7
+ *
8
+ * Usage:
9
+ * trie-agent [command] [options]
10
+ */
11
+ /**
12
+ * Handle status command - quick health check
13
+ */
14
+ declare function handleStatusCommand(): Promise<void>;
15
+
16
+ export { handleStatusCommand };
package/dist/cli/main.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  shouldAutoFix,
18
18
  shouldBlockPush,
19
19
  trackIssueOccurrence
20
- } from "../chunk-FW435YKY.js";
20
+ } from "../chunk-YHQYOD6M.js";
21
21
  import {
22
22
  SKILL_CATEGORIES,
23
23
  detectStack,
@@ -28,7 +28,7 @@ import {
28
28
  isTrieInitialized,
29
29
  loadConfig,
30
30
  saveConfig
31
- } from "../chunk-2BXLPYHR.js";
31
+ } from "../chunk-W4SQE6F7.js";
32
32
  import {
33
33
  ContextGraph,
34
34
  GotchaPredictor
@@ -50,7 +50,7 @@ import {
50
50
  projectInfoExists,
51
51
  recordSkillInstalled,
52
52
  removeSkill
53
- } from "../chunk-YKG4KIY7.js";
53
+ } from "../chunk-CGALCUZE.js";
54
54
  import {
55
55
  findCrossProjectPatterns,
56
56
  getGlobalMemoryStats,
@@ -2280,6 +2280,7 @@ COMMANDS:
2280
2280
  init Initialize Trie in your project
2281
2281
  scan Scan codebase once and exit
2282
2282
  watch Start the guardian (watches + nudges as you code)
2283
+ Use screen/tmux to run in background
2283
2284
  check Run risk check before pushing
2284
2285
 
2285
2286
  tell "<incident>" Report an incident ("users can't log in")
@@ -2296,8 +2297,9 @@ COMMANDS:
2296
2297
  skills Manage external skills from skills.sh
2297
2298
  audit View security audit logs
2298
2299
  memory Search and manage issue memory
2300
+ status Quick health check (project health + memory stats)
2299
2301
  project View/manage project info (.trie/PROJECT.md)
2300
- agents List all available agents
2302
+ scouts List all available scouts
2301
2303
  setup Configure API key and environment
2302
2304
 
2303
2305
  agent-smith Run Agent Smith (35 vibe code hunters)
@@ -2311,8 +2313,9 @@ COMMANDS:
2311
2313
  EXAMPLES:
2312
2314
  trie init # Initialize Trie in your project
2313
2315
  trie watch # Start the guardian (watches + nudges)
2316
+ trie watch # Run in background: screen -S trie-watch
2314
2317
  trie scan # Scan your codebase now
2315
- trie scan --agents security,privacy # Scan with specific agents
2318
+ trie scan --scouts security,privacy # Scan with specific scouts
2316
2319
 
2317
2320
  trie tell "users couldn't log in" # Report an incident
2318
2321
  trie ok # Mark current pattern as good
@@ -2327,18 +2330,20 @@ EXAMPLES:
2327
2330
 
2328
2331
  trie skills add vercel-labs/agent-skills react-best-practices
2329
2332
  trie memory search "SQL injection"
2333
+ trie memory stats # View memory statistics
2334
+ trie status # Quick health check (project + memory)
2330
2335
  trie agent-smith # 35 vibe code hunters
2331
2336
  trie super-reviewer # Interactive PR review
2332
2337
  trie ci # Generate CI workflow with memory caching
2333
2338
 
2334
2339
  MCP TOOLS (use via Cursor/Claude Desktop):
2335
2340
  trie_linear_sync Sync active tickets from Linear
2336
- trie_scan Intelligent scan with agent selection
2341
+ trie_scan Intelligent scan with scout selection
2337
2342
  trie_fix Generate high-confidence fix prompts
2338
2343
  trie_explain Explain code, issues, or changes
2339
2344
  trie_watch Watch mode for autonomous reporting
2340
2345
 
2341
- Individual Agents:
2346
+ Individual Scouts:
2342
2347
  trie_security Security vulnerabilities
2343
2348
  trie_privacy Privacy & GDPR compliance
2344
2349
  trie_soc2 SOC 2 Type II compliance
@@ -2351,7 +2356,7 @@ MCP TOOLS (use via Cursor/Claude Desktop):
2351
2356
  trie_devops DevOps & deployment
2352
2357
  trie_clean Clean up AI-generated code
2353
2358
 
2354
- Special Agents:
2359
+ Special Scouts:
2355
2360
  trie_agent_smith 35 vibe code hunters, cross-file detection
2356
2361
  trie_super_reviewer Interactive PR review with cross-examination
2357
2362
 
@@ -2409,10 +2414,10 @@ Ask your AI assistant: "Scan this with Trie" or "Use trie_scan"
2409
2414
  function listAgents() {
2410
2415
  console.log(`
2411
2416
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
2412
- \u2551 \u{1F4CB} Available Agents \u2551
2417
+ \u2551 \u{1F4CB} Available Scouts \u2551
2413
2418
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
2414
2419
 
2415
- BUILT-IN AGENTS:
2420
+ BUILT-IN SCOUTS:
2416
2421
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
2417
2422
  security Security vulnerabilities, injection risks, auth issues
2418
2423
  privacy GDPR, HIPAA, PII handling, data encryption
@@ -2464,6 +2469,57 @@ function showVersion() {
2464
2469
  showBanner();
2465
2470
  console.error(`v${getCliVersion()}`);
2466
2471
  }
2472
+ async function handleStatusCommand() {
2473
+ const workDir = getWorkingDirectory(void 0, true);
2474
+ try {
2475
+ const state = await loadContextState();
2476
+ const memoryStats = await getMemoryStats(workDir);
2477
+ console.log("\n\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557");
2478
+ console.log("\u2551 \u{1F4CA} Project Status \u2551");
2479
+ console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\n");
2480
+ const healthEmoji = state.healthScore >= 80 ? "\u2705" : state.healthScore >= 60 ? "\u26A0\uFE0F" : "\u{1F534}";
2481
+ console.log(`${healthEmoji} Health Score: ${state.healthScore}%`);
2482
+ if (state.lastScan) {
2483
+ const lastScanDate = new Date(state.lastScan.timestamp);
2484
+ const daysAgo = Math.floor((Date.now() - lastScanDate.getTime()) / (1e3 * 60 * 60 * 24));
2485
+ console.log(`
2486
+ \u{1F4C5} Last Scan: ${lastScanDate.toLocaleDateString()} (${daysAgo === 0 ? "today" : daysAgo === 1 ? "yesterday" : `${daysAgo} days ago`})`);
2487
+ console.log(` Files scanned: ${state.lastScan.filesScanned}`);
2488
+ console.log(` Issues found: ${state.lastScan.issues.total} (${state.lastScan.issues.critical} critical, ${state.lastScan.issues.serious} serious)`);
2489
+ } else {
2490
+ console.log("\n\u{1F4C5} Last Scan: Never (run `trie scan` to get started)");
2491
+ }
2492
+ console.log("\n\u{1F4BE} Memory Stats:");
2493
+ console.log(` Total Issues: ${memoryStats.totalIssues}`);
2494
+ console.log(` Resolved: ${memoryStats.resolvedCount}`);
2495
+ const cap = memoryStats.capacityInfo;
2496
+ const capEmoji = cap.isAtCap ? "\u{1F534}" : cap.percentFull >= 80 ? "\u26A0\uFE0F" : "\u2705";
2497
+ console.log(` ${capEmoji} Memory Usage: ${cap.percentFull}% (${cap.current}/${cap.max})`);
2498
+ if (memoryStats.totalIssues > 0) {
2499
+ console.log("\n By Severity:");
2500
+ const severityOrder = ["critical", "serious", "moderate", "low", "info"];
2501
+ for (const severity of severityOrder) {
2502
+ const count = memoryStats.issuesBySeverity[severity] || 0;
2503
+ if (count > 0) {
2504
+ console.log(` ${severity}: ${count}`);
2505
+ }
2506
+ }
2507
+ }
2508
+ if (cap.isAtCap) {
2509
+ console.log("\n\u26A0\uFE0F Memory at capacity - consider running: trie memory purge smart");
2510
+ } else if (cap.percentFull >= 80) {
2511
+ console.log("\n\u2139\uFE0F Memory usage high - consider running: trie memory purge smart");
2512
+ }
2513
+ console.log("\n\u{1F4A1} Quick Commands:");
2514
+ console.log(" trie scan - Scan codebase now");
2515
+ console.log(" trie memory stats - Detailed memory statistics");
2516
+ console.log(" trie project - View project information");
2517
+ console.log("");
2518
+ } catch (error) {
2519
+ console.error("Error loading status:", error);
2520
+ process.exit(1);
2521
+ }
2522
+ }
2467
2523
  async function handleProject(args) {
2468
2524
  const subcommand = args[0]?.toLowerCase();
2469
2525
  const workDir = getWorkingDirectory(void 0, true);
@@ -2589,7 +2645,7 @@ async function runWatch(args) {
2589
2645
  process.exit(code || 0);
2590
2646
  });
2591
2647
  }
2592
- function main() {
2648
+ async function main() {
2593
2649
  const args = process.argv.slice(2);
2594
2650
  const command = args[0]?.toLowerCase();
2595
2651
  const restArgs = args.slice(1);
@@ -2620,13 +2676,20 @@ function main() {
2620
2676
  case "mem":
2621
2677
  handleMemoryCommand(restArgs);
2622
2678
  break;
2679
+ case "status":
2680
+ case "stats":
2681
+ await handleStatusCommand();
2682
+ break;
2623
2683
  case "checkpoint":
2624
2684
  case "cp":
2625
2685
  case "save":
2626
2686
  handleCheckpointCommand(restArgs);
2627
2687
  break;
2688
+ case "scouts":
2628
2689
  case "agents":
2690
+ // Alias for backward compatibility
2629
2691
  case "list":
2692
+ case "list-scouts":
2630
2693
  case "list-agents":
2631
2694
  listAgents();
2632
2695
  break;
@@ -2698,12 +2761,12 @@ function main() {
2698
2761
  case "agent-smith":
2699
2762
  case "smith":
2700
2763
  case "trie_agent_smith":
2701
- runScan(["--agents", "agent-smith", ...restArgs]);
2764
+ runScan(["--scouts", "agent-smith", ...restArgs]);
2702
2765
  break;
2703
2766
  case "super-reviewer":
2704
2767
  case "reviewer":
2705
2768
  case "trie_super_reviewer":
2706
- runScan(["--agents", "super-reviewer", ...restArgs]);
2769
+ runScan(["--scouts", "super-reviewer", ...restArgs]);
2707
2770
  break;
2708
2771
  case "ci":
2709
2772
  case "ci-setup":
@@ -2734,5 +2797,11 @@ function main() {
2734
2797
  }
2735
2798
  }
2736
2799
  }
2737
- main();
2800
+ main().catch((error) => {
2801
+ console.error("Error:", error);
2802
+ process.exit(1);
2803
+ });
2804
+ export {
2805
+ handleStatusCommand
2806
+ };
2738
2807
  //# sourceMappingURL=main.js.map