@triedotdev/mcp 1.0.47 → 1.0.49

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.
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  AgentSmithAgent,
3
3
  SUB_AGENT_PATTERNS
4
- } from "./chunk-OB45V2QC.js";
4
+ } from "./chunk-KQOMSIVR.js";
5
5
  import "./chunk-IMFD4SJC.js";
6
6
  import "./chunk-DGUM43GV.js";
7
7
  export {
8
8
  AgentSmithAgent,
9
9
  SUB_AGENT_PATTERNS
10
10
  };
11
- //# sourceMappingURL=agent-smith-W7F55E6P.js.map
11
+ //# sourceMappingURL=agent-smith-5QOZXLMV.js.map
@@ -3,7 +3,7 @@ import {
3
3
  getAIStatusMessage,
4
4
  isAIAvailable,
5
5
  runAIAnalysis
6
- } from "./chunk-OB45V2QC.js";
6
+ } from "./chunk-KQOMSIVR.js";
7
7
  import {
8
8
  getWorkingDirectory
9
9
  } from "./chunk-IMFD4SJC.js";
@@ -553,4 +553,4 @@ ${getAIStatusMessage()}`);
553
553
  export {
554
554
  runAgentSmith
555
555
  };
556
- //# sourceMappingURL=agent-smith-runner-SH76O724.js.map
556
+ //# sourceMappingURL=agent-smith-runner-ZTDCJJQG.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CustomSkill,
3
3
  getAgentRegistry
4
- } from "./chunk-R5HWHP5N.js";
4
+ } from "./chunk-VZYCZXEQ.js";
5
5
  import {
6
6
  getGlobalMemoryStats,
7
7
  getHistoricalInsights,
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-PZDQIFKO.js";
13
13
  import {
14
14
  ProgressReporter
15
- } from "./chunk-OB45V2QC.js";
15
+ } from "./chunk-KQOMSIVR.js";
16
16
  import {
17
17
  getWorkingDirectory
18
18
  } from "./chunk-IMFD4SJC.js";
@@ -758,7 +758,7 @@ var Triager = class {
758
758
  }
759
759
  if (effectiveRiskLevel === "critical" || effectiveRiskLevel === "high") {
760
760
  console.error(` \u26A0\uFE0F ${effectiveRiskLevel.toUpperCase()} risk - activating all agents for comprehensive review`);
761
- return this.getAllAgents();
761
+ return this.getAllAgents().filter((agent) => agent.shouldActivate(context));
762
762
  }
763
763
  const scores = this.scoreAgents(context, effectiveRiskLevel);
764
764
  this.boostAgentsWithHistory(scores);
@@ -3968,20 +3968,20 @@ var StreamingManager = class {
3968
3968
  function formatConsoleUpdate(update) {
3969
3969
  switch (update.type) {
3970
3970
  case "agent_start":
3971
- return `\u{1F50D} Starting ${update.data.agent}...`;
3971
+ return `>> Starting ${update.data.agent}...`;
3972
3972
  case "agent_complete":
3973
- const emoji = update.data.issueCount > 0 ? "\u26A0\uFE0F" : "\u2705";
3974
- return `${emoji} ${update.data.agent} found ${update.data.issueCount} issues`;
3973
+ const label = update.data.issueCount > 0 ? "[WARN]" : "[OK]";
3974
+ return `${label} ${update.data.agent} found ${update.data.issueCount} issues`;
3975
3975
  case "progress":
3976
3976
  const { processedFiles, totalFiles, currentFile, activeAgents } = update.data;
3977
3977
  const progress = totalFiles > 0 ? Math.round(processedFiles / totalFiles * 100) : 0;
3978
3978
  const active = activeAgents.length > 0 ? ` (${activeAgents.join(", ")})` : "";
3979
- const current = currentFile ? ` \u2022 ${currentFile.split("/").pop()}` : "";
3980
- return `\u{1F4CA} Progress: ${progress}% (${processedFiles}/${totalFiles})${active}${current}`;
3979
+ const current = currentFile ? ` - ${currentFile.split("/").pop()}` : "";
3980
+ return `Progress: ${progress}% (${processedFiles}/${totalFiles})${active}${current}`;
3981
3981
  case "scan_complete":
3982
- return `\u{1F389} Scan complete! Found ${update.data.totalIssues} issues across ${update.data.totalFiles} files`;
3982
+ return `[COMPLETE] Scan finished. Found ${update.data.totalIssues} issues across ${update.data.totalFiles} files`;
3983
3983
  case "error":
3984
- return `\u274C Error: ${update.data.message}`;
3984
+ return `[ERROR] ${update.data.message}`;
3985
3985
  default:
3986
3986
  return null;
3987
3987
  }
@@ -5983,7 +5983,7 @@ var TrieScanTool = class {
5983
5983
  });
5984
5984
  }
5985
5985
  if (!interactiveEnabled) {
5986
- this.progress.startPhase("init", "\u{1F53A} TRIE AGENT - AI-Powered Code Analysis");
5986
+ this.progress.startPhase("init", "TRIE AGENT - AI-Powered Code Analysis");
5987
5987
  }
5988
5988
  if (!files || !Array.isArray(files) || files.length === 0) {
5989
5989
  this.progress.startPhase("discovery", `Discovering files in ${basename6(workDir)}...`);
@@ -6053,7 +6053,7 @@ var TrieScanTool = class {
6053
6053
  selectedAgents = selectedAgents.filter((a) => !excludeAgents.has(a.name));
6054
6054
  const removed = before - selectedAgents.length;
6055
6055
  if (removed > 0) {
6056
- console.error(` \u{1F6AB} Excluding ${removed} agent(s): ${Array.from(excludeAgents).join(", ")}`);
6056
+ console.error(` Excluding ${removed} agent(s): ${Array.from(excludeAgents).join(", ")}`);
6057
6057
  }
6058
6058
  }
6059
6059
  const allAgentNames = this.agentRegistry.getAgentNames();
@@ -6061,10 +6061,10 @@ var TrieScanTool = class {
6061
6061
  this.progress.update(`${selectedAgents.length} agents selected for ${riskLevel} risk code`);
6062
6062
  const userCount = args?.userCount;
6063
6063
  if (userCount) {
6064
- const moneybags = selectedAgents.find((a) => a.name === "moneybags");
6065
- if (moneybags && "configure" in moneybags && typeof moneybags.configure === "function") {
6066
- moneybags.configure({ userCount });
6067
- console.error(` \u{1F4B0} Cost estimates scaled for ${userCount.toLocaleString()} users`);
6064
+ const moneybags2 = selectedAgents.find((a) => a.name === "moneybags");
6065
+ if (moneybags2 && "configure" in moneybags2 && typeof moneybags2.configure === "function") {
6066
+ moneybags2.configure({ userCount });
6067
+ console.error(` Cost estimates scaled for ${userCount.toLocaleString()} users`);
6068
6068
  }
6069
6069
  }
6070
6070
  this.progress.startPhase("ai-review", "Running AI analysis...");
@@ -6091,6 +6091,13 @@ var TrieScanTool = class {
6091
6091
  const allIssues = agentResults.flatMap((result2) => result2.issues);
6092
6092
  const issueAnalyzer = new IssueAnalyzer();
6093
6093
  const priorityReport = issueAnalyzer.analyzeIssues(allIssues);
6094
+ const META_AGENTS = /* @__PURE__ */ new Set(["agent-smith", "super-reviewer"]);
6095
+ const costableIssues = allIssues.filter((issue) => !META_AGENTS.has(issue.agent || ""));
6096
+ let costReport = null;
6097
+ const moneybags = selectedAgents.find((a) => a.name === "moneybags");
6098
+ if (moneybags && "generateCostReport" in moneybags && typeof moneybags.generateCostReport === "function" && costableIssues.length > 0) {
6099
+ costReport = moneybags.generateCostReport(costableIssues, context);
6100
+ }
6094
6101
  this.progress.startPhase("prioritizing", "Prioritizing findings...");
6095
6102
  const prioritized = prioritizeIssues(allIssues);
6096
6103
  if (prioritized.critical.length > 0) {
@@ -6217,7 +6224,8 @@ var TrieScanTool = class {
6217
6224
  semanticOutput,
6218
6225
  attackSurfaceOutput,
6219
6226
  priorityReport,
6220
- assignments
6227
+ assignments,
6228
+ costReport
6221
6229
  );
6222
6230
  if (args?.format === "json" && args?.output) {
6223
6231
  const report = {
@@ -6257,43 +6265,43 @@ var TrieScanTool = class {
6257
6265
  content: [
6258
6266
  {
6259
6267
  type: "text",
6260
- text: `\u274C Scan failed: ${error instanceof Error ? error.message : String(error)}`
6268
+ text: `[ERROR] Scan failed: ${error instanceof Error ? error.message : String(error)}`
6261
6269
  }
6262
6270
  ]
6263
6271
  };
6264
6272
  }
6265
6273
  }
6266
6274
  logContextAnalysis(context) {
6267
- console.error("\n \u{1F4CB} Detected Context Signals:");
6275
+ console.error("\n Detected Context Signals:");
6268
6276
  const signals = [];
6269
- if (context.touchesAuth) signals.push("\u{1F510} Authentication/Authorization");
6270
- if (context.touchesPayments) signals.push("\u{1F4B3} Payment Processing");
6271
- if (context.touchesDatabase) signals.push("\u{1F5C4}\uFE0F Database Operations");
6272
- if (context.touchesAPI) signals.push("\u{1F310} API Endpoints");
6273
- if (context.touchesUI) signals.push("\u{1F3A8} User Interface");
6274
- if (context.touchesUserData) signals.push("\u{1F464} User/Personal Data");
6275
- if (context.touchesHealthData) signals.push("\u{1F3E5} Protected Health Info (PHI)");
6276
- if (context.touchesSecurityConfig) signals.push("\u{1F512} Security Configuration");
6277
+ if (context.touchesAuth) signals.push("* Authentication/Authorization");
6278
+ if (context.touchesPayments) signals.push("* Payment Processing");
6279
+ if (context.touchesDatabase) signals.push("* Database Operations");
6280
+ if (context.touchesAPI) signals.push("* API Endpoints");
6281
+ if (context.touchesUI) signals.push("* User Interface");
6282
+ if (context.touchesUserData) signals.push("* User/Personal Data");
6283
+ if (context.touchesHealthData) signals.push("* Protected Health Info (PHI)");
6284
+ if (context.touchesSecurityConfig) signals.push("* Security Configuration");
6277
6285
  if (signals.length === 0) {
6278
- signals.push("\u{1F4DD} General Code Changes");
6286
+ signals.push("* General Code Changes");
6279
6287
  }
6280
6288
  for (const signal of signals) {
6281
6289
  console.error(` ${signal}`);
6282
6290
  }
6283
6291
  console.error(`
6284
- \u{1F4CA} Lines analyzed: ${context.linesChanged}`);
6285
- console.error(` \u{1F4C1} File patterns: ${context.filePatterns.join(", ") || "none detected"}`);
6292
+ Lines analyzed: ${context.linesChanged}`);
6293
+ console.error(` File patterns: ${context.filePatterns.join(", ") || "none detected"}`);
6286
6294
  console.error("");
6287
6295
  }
6288
6296
  logRiskAssessment(context, riskLevel) {
6289
- const riskEmoji = {
6290
- low: "\u{1F7E2}",
6291
- medium: "\u{1F7E1}",
6292
- high: "\u{1F7E0}",
6293
- critical: "\u{1F534}"
6297
+ const riskLabel = {
6298
+ low: "[LOW]",
6299
+ medium: "[MEDIUM]",
6300
+ high: "[HIGH]",
6301
+ critical: "[CRITICAL]"
6294
6302
  };
6295
6303
  console.error(`
6296
- ${riskEmoji[riskLevel]} Risk Level: ${riskLevel.toUpperCase()}`);
6304
+ ${riskLabel[riskLevel]} Risk Level: ${riskLevel.toUpperCase()}`);
6297
6305
  const factors = [];
6298
6306
  if (context.touchesPayments) factors.push("Payment processing = automatic HIGH risk");
6299
6307
  if (context.touchesAuth) factors.push("Auth code requires extra scrutiny");
@@ -6304,18 +6312,18 @@ var TrieScanTool = class {
6304
6312
  if (factors.length > 0) {
6305
6313
  console.error(" Risk factors:");
6306
6314
  for (const factor of factors) {
6307
- console.error(` \u2022 ${factor}`);
6315
+ console.error(` - ${factor}`);
6308
6316
  }
6309
6317
  }
6310
6318
  console.error("");
6311
6319
  }
6312
6320
  logTriaging(selectedNames, allAgentNames, context, riskLevel) {
6313
6321
  console.error(`
6314
- \u{1F3AF} Agents Selected: ${selectedNames.length} of ${allAgentNames.length} available`);
6322
+ Agents Selected: ${selectedNames.length} of ${allAgentNames.length} available`);
6315
6323
  console.error("");
6316
6324
  for (const name of allAgentNames) {
6317
6325
  const isSelected = selectedNames.includes(name);
6318
- const icon = isSelected ? "\u2705" : "\u2B1C";
6326
+ const icon = isSelected ? "[x]" : "[ ]";
6319
6327
  const reason = isSelected ? this.getAgentReason(name, context, riskLevel) : "not needed for this context";
6320
6328
  console.error(` ${icon} ${name}: ${reason}`);
6321
6329
  }
@@ -6368,31 +6376,45 @@ var TrieScanTool = class {
6368
6376
  * Format a CONCISE summary for chat/terminal display
6369
6377
  * This is what users see - actionable, not overwhelming
6370
6378
  */
6371
- async formatChatSummary(result, prioritized, semanticOutput, attackSurfaceOutput, priorityReport, assignments) {
6379
+ async formatChatSummary(result, prioritized, semanticOutput, attackSurfaceOutput, priorityReport, assignments, costReport) {
6372
6380
  const { triaging, results: _results, executionTime } = result;
6373
6381
  let output2 = `
6374
6382
  `;
6375
- output2 += `# \u{1F53A} Trie Agent Scan Complete
6383
+ output2 += `TRIE SCAN COMPLETE
6384
+ `;
6385
+ output2 += `==================
6376
6386
 
6377
6387
  `;
6378
- output2 += `**Scanned:** ${triaging.agentsActivated.length} agents | **Time:** ${(executionTime / 1e3).toFixed(1)}s | **Risk:** ${triaging.riskLevel.toUpperCase()}
6388
+ output2 += `${triaging.agentsActivated.length} agents | ${(executionTime / 1e3).toFixed(1)}s | Risk: ${triaging.riskLevel.toUpperCase()}
6379
6389
 
6380
6390
  `;
6381
6391
  const totalActionable = prioritized.critical.length + prioritized.important.length;
6382
6392
  if (totalActionable === 0) {
6383
- output2 += `## \u2705 No Issues Found
6393
+ output2 += `## No Issues Found
6384
6394
 
6385
6395
  `;
6386
6396
  output2 += `Your code passed all checks.
6387
6397
 
6388
6398
  `;
6389
6399
  } else {
6390
- output2 += `## \u{1F3AF} ${totalActionable} Issues Found
6400
+ output2 += `## ${totalActionable} Issues Found
6401
+
6402
+ `;
6403
+ }
6404
+ const agentSummary = result.results.agentResults.filter((r) => r.issues.length > 0).map((r) => `${r.agent}: ${r.issues.length}`).slice(0, 6).join(" | ");
6405
+ if (agentSummary) {
6406
+ output2 += `**Agent Summary:** ${agentSummary}
6407
+
6408
+ `;
6409
+ }
6410
+ if (costReport && costReport.totalProductionCost > 0) {
6411
+ const formatCurrency = (n) => n >= 1e6 ? `$${(n / 1e6).toFixed(2)}M` : n >= 1e3 ? `$${(n / 1e3).toFixed(1)}k` : `$${n}`;
6412
+ output2 += `**Estimated Cost:** Fix now ${formatCurrency(costReport.totalNowCost)} | If production ${formatCurrency(costReport.totalProductionCost)} | Savings ${formatCurrency(costReport.totalSavings)}
6391
6413
 
6392
6414
  `;
6393
6415
  }
6394
6416
  if (prioritized.critical.length > 0) {
6395
- output2 += `### \u{1F534} Critical (${prioritized.critical.length})
6417
+ output2 += `### [CRITICAL] (${prioritized.critical.length})
6396
6418
 
6397
6419
  `;
6398
6420
  for (const issue of prioritized.critical.slice(0, 8)) {
@@ -6402,7 +6424,7 @@ var TrieScanTool = class {
6402
6424
  output2 += `**${issue.issue}**
6403
6425
 
6404
6426
  `;
6405
- output2 += `\u{1F4CD} \`${issue.file}:${issue.line || "?"}\`
6427
+ output2 += `File: \`${issue.file}:${issue.line || "?"}\`
6406
6428
 
6407
6429
  `;
6408
6430
  const snippet = await this.getCodeSnippet(issue.file, issue.line);
@@ -6417,7 +6439,7 @@ ${snippet}
6417
6439
 
6418
6440
  `;
6419
6441
  output2 += `<details>
6420
- <summary>\u{1F4AC} Prompt to fix this</summary>
6442
+ <summary>Prompt to fix this</summary>
6421
6443
 
6422
6444
  `;
6423
6445
  output2 += `\`\`\`
@@ -6438,7 +6460,7 @@ ${issue.fix}
6438
6460
  }
6439
6461
  }
6440
6462
  if (prioritized.important.length > 0) {
6441
- output2 += `### \u{1F7E0} Important (${prioritized.important.length})
6463
+ output2 += `### [SERIOUS] (${prioritized.important.length})
6442
6464
 
6443
6465
  `;
6444
6466
  for (const issue of prioritized.important.slice(0, 10)) {
@@ -6448,7 +6470,7 @@ ${issue.fix}
6448
6470
  output2 += `**${issue.issue}**
6449
6471
 
6450
6472
  `;
6451
- output2 += `\u{1F4CD} \`${issue.file}:${issue.line || "?"}\`
6473
+ output2 += `File: \`${issue.file}:${issue.line || "?"}\`
6452
6474
 
6453
6475
  `;
6454
6476
  const snippet = await this.getCodeSnippet(issue.file, issue.line);
@@ -6463,7 +6485,7 @@ ${snippet}
6463
6485
 
6464
6486
  `;
6465
6487
  output2 += `<details>
6466
- <summary>\u{1F4AC} Prompt to fix this</summary>
6488
+ <summary>Prompt to fix this</summary>
6467
6489
 
6468
6490
  `;
6469
6491
  output2 += `\`\`\`
@@ -6484,17 +6506,17 @@ ${issue.fix}
6484
6506
  }
6485
6507
  }
6486
6508
  if (semanticOutput && semanticOutput.includes("Data Flow") || semanticOutput.includes("Race Condition")) {
6487
- output2 += `### \u{1F9E0} Semantic Analysis
6509
+ output2 += `### Semantic Analysis
6488
6510
 
6489
6511
  `;
6490
6512
  const dataFlowMatch = semanticOutput.match(/Data Flow Vulnerabilities \((\d+)\)/);
6491
6513
  const raceMatch = semanticOutput.match(/Race Conditions \((\d+)\)/);
6492
6514
  const authMatch = semanticOutput.match(/Authentication Issues \((\d+)\)/);
6493
- if (dataFlowMatch) output2 += `- \u{1F534} **${dataFlowMatch[1]} data flow vulnerabilities** (untrusted input reaching dangerous sinks)
6515
+ if (dataFlowMatch) output2 += `- [CRITICAL] **${dataFlowMatch[1]} data flow vulnerabilities** (untrusted input reaching dangerous sinks)
6494
6516
  `;
6495
- if (authMatch) output2 += `- \u{1F534} **${authMatch[1]} authentication issues** (missing or bypassable auth)
6517
+ if (authMatch) output2 += `- [CRITICAL] **${authMatch[1]} authentication issues** (missing or bypassable auth)
6496
6518
  `;
6497
- if (raceMatch) output2 += `- \u{1F7E1} **${raceMatch[1]} race conditions** (TOCTOU, double-spend risks)
6519
+ if (raceMatch) output2 += `- [WARN] **${raceMatch[1]} race conditions** (TOCTOU, double-spend risks)
6498
6520
  `;
6499
6521
  output2 += `
6500
6522
  `;
@@ -6504,11 +6526,11 @@ ${issue.fix}
6504
6526
  const endpointsMatch = attackSurfaceOutput.match(/Total Endpoints \| (\d+)/);
6505
6527
  const publicMatch = attackSurfaceOutput.match(/Public \(No Auth\) \| (\d+)/);
6506
6528
  if (riskMatch || endpointsMatch) {
6507
- output2 += `### \u{1F3AF} Attack Surface
6529
+ output2 += `### Attack Surface
6508
6530
 
6509
6531
  `;
6510
6532
  if (endpointsMatch) output2 += `- **${endpointsMatch[1]} endpoints** found`;
6511
- if (publicMatch?.[1] && parseInt(publicMatch[1], 10) > 0) output2 += ` (\u26A0\uFE0F ${publicMatch[1]} public without auth)`;
6533
+ if (publicMatch?.[1] && parseInt(publicMatch[1], 10) > 0) output2 += ` [WARN: ${publicMatch[1]} public without auth]`;
6512
6534
  output2 += `
6513
6535
  `;
6514
6536
  if (riskMatch) output2 += `- **Risk Score:** ${riskMatch[1]}/100
@@ -6518,7 +6540,7 @@ ${issue.fix}
6518
6540
  }
6519
6541
  }
6520
6542
  if (priorityReport.totalGroups > 0) {
6521
- output2 += `### \u{1F9E9} Smart Grouping
6543
+ output2 += `### Smart Grouping
6522
6544
 
6523
6545
  `;
6524
6546
  output2 += `- **${priorityReport.totalGroups} issue groups** across ${priorityReport.totalIssues} issues
@@ -6532,7 +6554,7 @@ ${issue.fix}
6532
6554
  `;
6533
6555
  for (const group of topGroups) {
6534
6556
  const bulk = group.bulkFixAvailable ? " (bulk-fix available)" : "";
6535
- output2 += `- ${group.description} \u2014 ${group.count} issues${bulk}
6557
+ output2 += `- ${group.description} -- ${group.count} issues${bulk}
6536
6558
  `;
6537
6559
  }
6538
6560
  output2 += `
@@ -6550,7 +6572,7 @@ ${issue.fix}
6550
6572
  }
6551
6573
  }
6552
6574
  if (assignments.length > 0) {
6553
- output2 += `### \u{1F91D} Team Assignments
6575
+ output2 += `### Team Assignments
6554
6576
 
6555
6577
  `;
6556
6578
  const urgent = assignments.filter((a) => a.priority === "urgent").length;
@@ -6559,7 +6581,7 @@ ${issue.fix}
6559
6581
 
6560
6582
  `;
6561
6583
  }
6562
- output2 += `## \u{1F4CB} Next Steps
6584
+ output2 += `## Next Steps
6563
6585
 
6564
6586
  `;
6565
6587
  if (prioritized.critical.length > 0) {
@@ -6573,7 +6595,7 @@ ${issue.fix}
6573
6595
  `;
6574
6596
  output2 += `---
6575
6597
  `;
6576
- output2 += `*\u{1F4A1} Unlike other tools that dump 10,000 issues, Trie Agent shows you what matters.*
6598
+ output2 += `*Trie Agent shows you what matters, not 10,000 issues.*
6577
6599
  `;
6578
6600
  return output2;
6579
6601
  }
@@ -6658,4 +6680,4 @@ export {
6658
6680
  loadConfig,
6659
6681
  TrieScanTool
6660
6682
  };
6661
- //# sourceMappingURL=chunk-5AS3BWAZ.js.map
6683
+ //# sourceMappingURL=chunk-JDICQHNT.js.map