@triedotdev/mcp 1.0.25 → 1.0.26
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/dist/{agent-smith-K6BPNB7W.js → agent-smith-TNDAPXIU.js} +3 -2
- package/dist/{agent-smith-runner-Z3EVFPXB.js → agent-smith-runner-63Q6D473.js} +5 -5
- package/dist/{chunk-D76HY4QN.js → chunk-3724RQC3.js} +5 -5
- package/dist/{chunk-27F4RHXA.js → chunk-ARUHDATG.js} +52 -9
- package/dist/chunk-ARUHDATG.js.map +1 -0
- package/dist/{chunk-FJH3GQJN.js → chunk-R5CG3B6G.js} +45 -17
- package/dist/{chunk-FJH3GQJN.js.map → chunk-R5CG3B6G.js.map} +1 -1
- package/dist/cli/yolo-daemon.js +4 -4
- package/dist/index.js +6 -6
- package/dist/workers/agent-worker.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-27F4RHXA.js.map +0 -1
- /package/dist/{agent-smith-K6BPNB7W.js.map → agent-smith-TNDAPXIU.js.map} +0 -0
- /package/dist/{agent-smith-runner-Z3EVFPXB.js.map → agent-smith-runner-63Q6D473.js.map} +0 -0
- /package/dist/{chunk-D76HY4QN.js.map → chunk-3724RQC3.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CustomAgent,
|
|
3
3
|
getAgentRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3724RQC3.js";
|
|
5
|
+
import {
|
|
6
|
+
ProgressReporter
|
|
7
|
+
} from "./chunk-ARUHDATG.js";
|
|
5
8
|
import {
|
|
6
9
|
getWorkingDirectory
|
|
7
10
|
} from "./chunk-IMFD4SJC.js";
|
|
8
|
-
import {
|
|
9
|
-
ProgressReporter
|
|
10
|
-
} from "./chunk-27F4RHXA.js";
|
|
11
11
|
import {
|
|
12
12
|
getVulnerabilityStats,
|
|
13
13
|
getVulnerabilityTrie,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
// src/tools/scan.ts
|
|
24
24
|
import { readFile as readFile8, readdir as readdir2, writeFile as writeFile3 } from "fs/promises";
|
|
25
25
|
import { existsSync as existsSync5 } from "fs";
|
|
26
|
-
import { basename as basename6, isAbsolute, resolve as resolve2, join as
|
|
26
|
+
import { basename as basename6, isAbsolute, resolve as resolve2, join as join6, extname as extname3 } from "path";
|
|
27
27
|
|
|
28
28
|
// src/orchestrator/context-analyzer.ts
|
|
29
29
|
import { readFile } from "fs/promises";
|
|
@@ -4582,12 +4582,12 @@ var InteractiveDashboard = class {
|
|
|
4582
4582
|
// src/config/loader.ts
|
|
4583
4583
|
import { readFile as readFile7 } from "fs/promises";
|
|
4584
4584
|
import { existsSync as existsSync4 } from "fs";
|
|
4585
|
-
import { join as
|
|
4585
|
+
import { join as join5 } from "path";
|
|
4586
4586
|
|
|
4587
4587
|
// src/config/validation.ts
|
|
4588
4588
|
import { z } from "zod";
|
|
4589
|
-
import { existsSync as existsSync3 } from "fs";
|
|
4590
|
-
import { resolve } from "path";
|
|
4589
|
+
import { existsSync as existsSync3, readFileSync } from "fs";
|
|
4590
|
+
import { resolve, join as join4 } from "path";
|
|
4591
4591
|
var API_KEY_PATTERNS = {
|
|
4592
4592
|
anthropic: /^sk-ant-api\d{2}-[\w-]{95}$/,
|
|
4593
4593
|
openai: /^sk-[\w]{48}$/,
|
|
@@ -4697,12 +4697,22 @@ var ConfigValidator = class {
|
|
|
4697
4697
|
errors.push(`\u{1F6A8} Security risk: API key in client-side environment variable: ${envVar}`);
|
|
4698
4698
|
}
|
|
4699
4699
|
}
|
|
4700
|
-
|
|
4700
|
+
let anthropicKey = process.env.ANTHROPIC_API_KEY;
|
|
4701
|
+
if (!anthropicKey) {
|
|
4702
|
+
try {
|
|
4703
|
+
const configPath = join4(getWorkingDirectory(void 0, true), ".trie", "config.json");
|
|
4704
|
+
if (existsSync3(configPath)) {
|
|
4705
|
+
const config = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
4706
|
+
anthropicKey = config.apiKeys?.anthropic;
|
|
4707
|
+
}
|
|
4708
|
+
} catch {
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4701
4711
|
if (anthropicKey && !API_KEY_PATTERNS.anthropic.test(anthropicKey)) {
|
|
4702
4712
|
errors.push("ANTHROPIC_API_KEY does not match expected format");
|
|
4703
4713
|
}
|
|
4704
|
-
if (!
|
|
4705
|
-
warnings.push("ANTHROPIC_API_KEY not set - AI features will be disabled");
|
|
4714
|
+
if (!anthropicKey) {
|
|
4715
|
+
warnings.push("ANTHROPIC_API_KEY not set - AI features will be disabled. Set in environment, .trie/config.json, or .env file");
|
|
4706
4716
|
}
|
|
4707
4717
|
if (!process.env.GITHUB_TOKEN && process.env.CI) {
|
|
4708
4718
|
warnings.push("GITHUB_TOKEN not set - GitHub integration disabled");
|
|
@@ -4842,8 +4852,26 @@ var ConfigValidator = class {
|
|
|
4842
4852
|
const securityIssues = [];
|
|
4843
4853
|
const optimizations = [];
|
|
4844
4854
|
let score = 100;
|
|
4845
|
-
|
|
4846
|
-
|
|
4855
|
+
let hasApiKey = Boolean(config.apiKeys?.anthropic || process.env.ANTHROPIC_API_KEY);
|
|
4856
|
+
if (!hasApiKey) {
|
|
4857
|
+
try {
|
|
4858
|
+
const workDir = getWorkingDirectory(void 0, true);
|
|
4859
|
+
const envFiles = [".env", ".env.local", ".env.production"];
|
|
4860
|
+
for (const envFile of envFiles) {
|
|
4861
|
+
const envPath = join4(workDir, envFile);
|
|
4862
|
+
if (existsSync3(envPath)) {
|
|
4863
|
+
const envContent = readFileSync(envPath, "utf-8");
|
|
4864
|
+
if (envContent.includes("ANTHROPIC_API_KEY=")) {
|
|
4865
|
+
hasApiKey = true;
|
|
4866
|
+
break;
|
|
4867
|
+
}
|
|
4868
|
+
}
|
|
4869
|
+
}
|
|
4870
|
+
} catch {
|
|
4871
|
+
}
|
|
4872
|
+
}
|
|
4873
|
+
if (!hasApiKey) {
|
|
4874
|
+
suggestions.push("Add ANTHROPIC_API_KEY to enable AI-powered analysis for better issue detection. Set in environment, .trie/config.json, or .env file");
|
|
4847
4875
|
score -= 10;
|
|
4848
4876
|
}
|
|
4849
4877
|
if (config.agents?.parallel === false) {
|
|
@@ -4908,7 +4936,7 @@ var DEFAULT_CONFIG = {
|
|
|
4908
4936
|
// src/config/loader.ts
|
|
4909
4937
|
async function loadConfig() {
|
|
4910
4938
|
const validator = new ConfigValidator();
|
|
4911
|
-
const configPath =
|
|
4939
|
+
const configPath = join5(getWorkingDirectory(void 0, true), ".trie", "config.json");
|
|
4912
4940
|
try {
|
|
4913
4941
|
if (!existsSync4(configPath)) {
|
|
4914
4942
|
return DEFAULT_CONFIG;
|
|
@@ -6345,7 +6373,7 @@ ${issue.fix}
|
|
|
6345
6373
|
const entries = await readdir2(currentDir, { withFileTypes: true });
|
|
6346
6374
|
for (const entry of entries) {
|
|
6347
6375
|
if (files.length >= maxFiles) break;
|
|
6348
|
-
const fullPath =
|
|
6376
|
+
const fullPath = join6(currentDir, entry.name);
|
|
6349
6377
|
if (entry.isDirectory()) {
|
|
6350
6378
|
if (!SKIP_DIRS.has(entry.name) && !entry.name.startsWith(".")) {
|
|
6351
6379
|
await walk(fullPath);
|
|
@@ -6370,7 +6398,7 @@ ${issue.fix}
|
|
|
6370
6398
|
return files;
|
|
6371
6399
|
}
|
|
6372
6400
|
async loadTeamMembers(workDir) {
|
|
6373
|
-
const teamConfigPath =
|
|
6401
|
+
const teamConfigPath = join6(workDir, ".trie", "team.json");
|
|
6374
6402
|
if (!existsSync5(teamConfigPath)) {
|
|
6375
6403
|
return [];
|
|
6376
6404
|
}
|
|
@@ -7664,4 +7692,4 @@ export {
|
|
|
7664
7692
|
getSystemPrompt,
|
|
7665
7693
|
TrieFixTool
|
|
7666
7694
|
};
|
|
7667
|
-
//# sourceMappingURL=chunk-
|
|
7695
|
+
//# sourceMappingURL=chunk-R5CG3B6G.js.map
|