@triedotdev/mcp 1.0.149 → 1.0.151
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/LICENSE +21 -0
- package/README.md +116 -30
- package/dist/{autonomy-config-ZCOSTMPD.js → autonomy-config-3APNC6QF.js} +3 -3
- package/dist/{chat-store-OJLJCJFI.js → chat-store-HMTDL7I2.js} +3 -3
- package/dist/{chunk-LD7ZEFNY.js → chunk-3KZBC3RJ.js} +2 -2
- package/dist/{chunk-SH7H3WRU.js → chunk-4TQQP7JD.js} +3 -3
- package/dist/{chunk-SH7H3WRU.js.map → chunk-4TQQP7JD.js.map} +1 -1
- package/dist/{chunk-GAL7OIYU.js → chunk-4UDBGYI3.js} +15 -15
- package/dist/{chunk-72KSLD7A.js → chunk-74R4XSFB.js} +5 -5
- package/dist/{chunk-ZDDE442Q.js → chunk-7HYOJ4Q7.js} +8 -8
- package/dist/{chunk-ZDDE442Q.js.map → chunk-7HYOJ4Q7.js.map} +1 -1
- package/dist/{chunk-OTQEFXHU.js → chunk-ABY2R7OK.js} +2 -2
- package/dist/{chunk-QH77RQB3.js → chunk-ED7PLRQA.js} +5 -6
- package/dist/chunk-ED7PLRQA.js.map +1 -0
- package/dist/{chunk-23RJT5WT.js → chunk-F7BMFOZ6.js} +2 -2
- package/dist/{chunk-53KUI7RQ.js → chunk-G7Q23IGF.js} +35 -10
- package/dist/{chunk-53KUI7RQ.js.map → chunk-G7Q23IGF.js.map} +1 -1
- package/dist/{chunk-CU5VDH6F.js → chunk-GLY76TSI.js} +2 -2
- package/dist/{chunk-B2AHQ2IR.js → chunk-IFBEAOHH.js} +12 -12
- package/dist/{chunk-ILGMFND2.js → chunk-JIS2OCZR.js} +4 -4
- package/dist/{chunk-FG467PDD.js → chunk-LNUMECBJ.js} +2 -2
- package/dist/{chunk-FPEMP54L.js → chunk-OJXFQRUE.js} +2 -2
- package/dist/{chunk-5KJ4UJOY.js → chunk-QQG42HCI.js} +2 -2
- package/dist/{chunk-7OJ6JIPL.js → chunk-REHKDCI6.js} +7 -150
- package/dist/chunk-REHKDCI6.js.map +1 -0
- package/dist/{chunk-HYNDXZAU.js → chunk-SU3WCAC4.js} +103 -75
- package/dist/chunk-SU3WCAC4.js.map +1 -0
- package/dist/{chunk-4C67GV3O.js → chunk-TCNCNWGV.js} +2 -2
- package/dist/{chunk-NKHO34UZ.js → chunk-TU7D5DEW.js} +2 -2
- package/dist/{chunk-ZUEAHFSY.js → chunk-TWPX6PHF.js} +313 -61
- package/dist/chunk-TWPX6PHF.js.map +1 -0
- package/dist/{chunk-FH335WL5.js → chunk-TWQPOVRA.js} +2 -2
- package/dist/{chunk-YOJGSRZK.js → chunk-V3O7C2LY.js} +2 -2
- package/dist/{chunk-V7AY2EJO.js → chunk-WOTLY5NA.js} +2 -2
- package/dist/cli/create-agent.js +8 -40
- package/dist/cli/create-agent.js.map +1 -1
- package/dist/cli/main.js +55 -93
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +20 -20
- package/dist/{client-INNE2GGZ.js → client-5L64D5SQ.js} +3 -3
- package/dist/{codebase-index-FMIULFZQ.js → codebase-index-OOE7OAHP.js} +3 -3
- package/dist/{fast-analyzer-CTT3MCPE.js → fast-analyzer-FMU3X4AZ.js} +5 -5
- package/dist/github-ingester-C66ZRUYC.js +11 -0
- package/dist/{goal-manager-IGUMDGCA.js → goal-manager-VTBFFYN4.js} +7 -7
- package/dist/{goal-validator-DV6DRSGF.js → goal-validator-EM5XVWVC.js} +6 -6
- package/dist/{graph-J4OGTYCO.js → graph-26JPZ3DF.js} +3 -3
- package/dist/{hypothesis-O72ZLVOW.js → hypothesis-4UPE7KXU.js} +7 -7
- package/dist/{incident-index-BWW2UEY7.js → incident-index-H6APJ4S3.js} +3 -3
- package/dist/index.js +118 -313
- package/dist/index.js.map +1 -1
- package/dist/{insight-store-Q62UGMTF.js → insight-store-QEEUQR5L.js} +3 -3
- package/dist/{issue-store-4FPABLC6.js → issue-store-C6XYENE5.js} +4 -4
- package/dist/{ledger-43SIVE7X.js → ledger-VNA4DX3Z.js} +13 -5
- package/dist/linear-ingester-WIUBWF55.js +11 -0
- package/dist/{tiered-storage-VZL7KK64.js → tiered-storage-P6Z3NV2Q.js} +3 -3
- package/dist/trie-agent-GJJJCL6P.js +27 -0
- package/package.json +4 -6
- package/dist/chunk-7OJ6JIPL.js.map +0 -1
- package/dist/chunk-G76DYVGX.js +0 -136
- package/dist/chunk-G76DYVGX.js.map +0 -1
- package/dist/chunk-HYNDXZAU.js.map +0 -1
- package/dist/chunk-QH77RQB3.js.map +0 -1
- package/dist/chunk-ZUEAHFSY.js.map +0 -1
- package/dist/comprehension-46F7ZNKL.js +0 -821
- package/dist/comprehension-46F7ZNKL.js.map +0 -1
- package/dist/github-ingester-J2ZFYXVE.js +0 -11
- package/dist/linear-ingester-JRDQAIAA.js +0 -11
- package/dist/trie-agent-ET3DAP5Y.js +0 -27
- package/dist/workers/agent-worker.d.ts +0 -2
- package/dist/workers/agent-worker.js +0 -28
- package/dist/workers/agent-worker.js.map +0 -1
- /package/dist/{autonomy-config-ZCOSTMPD.js.map → autonomy-config-3APNC6QF.js.map} +0 -0
- /package/dist/{chat-store-OJLJCJFI.js.map → chat-store-HMTDL7I2.js.map} +0 -0
- /package/dist/{chunk-LD7ZEFNY.js.map → chunk-3KZBC3RJ.js.map} +0 -0
- /package/dist/{chunk-GAL7OIYU.js.map → chunk-4UDBGYI3.js.map} +0 -0
- /package/dist/{chunk-72KSLD7A.js.map → chunk-74R4XSFB.js.map} +0 -0
- /package/dist/{chunk-OTQEFXHU.js.map → chunk-ABY2R7OK.js.map} +0 -0
- /package/dist/{chunk-23RJT5WT.js.map → chunk-F7BMFOZ6.js.map} +0 -0
- /package/dist/{chunk-CU5VDH6F.js.map → chunk-GLY76TSI.js.map} +0 -0
- /package/dist/{chunk-B2AHQ2IR.js.map → chunk-IFBEAOHH.js.map} +0 -0
- /package/dist/{chunk-ILGMFND2.js.map → chunk-JIS2OCZR.js.map} +0 -0
- /package/dist/{chunk-FG467PDD.js.map → chunk-LNUMECBJ.js.map} +0 -0
- /package/dist/{chunk-FPEMP54L.js.map → chunk-OJXFQRUE.js.map} +0 -0
- /package/dist/{chunk-5KJ4UJOY.js.map → chunk-QQG42HCI.js.map} +0 -0
- /package/dist/{chunk-4C67GV3O.js.map → chunk-TCNCNWGV.js.map} +0 -0
- /package/dist/{chunk-NKHO34UZ.js.map → chunk-TU7D5DEW.js.map} +0 -0
- /package/dist/{chunk-FH335WL5.js.map → chunk-TWQPOVRA.js.map} +0 -0
- /package/dist/{chunk-YOJGSRZK.js.map → chunk-V3O7C2LY.js.map} +0 -0
- /package/dist/{chunk-V7AY2EJO.js.map → chunk-WOTLY5NA.js.map} +0 -0
- /package/dist/{client-INNE2GGZ.js.map → client-5L64D5SQ.js.map} +0 -0
- /package/dist/{codebase-index-FMIULFZQ.js.map → codebase-index-OOE7OAHP.js.map} +0 -0
- /package/dist/{fast-analyzer-CTT3MCPE.js.map → fast-analyzer-FMU3X4AZ.js.map} +0 -0
- /package/dist/{github-ingester-J2ZFYXVE.js.map → github-ingester-C66ZRUYC.js.map} +0 -0
- /package/dist/{goal-manager-IGUMDGCA.js.map → goal-manager-VTBFFYN4.js.map} +0 -0
- /package/dist/{goal-validator-DV6DRSGF.js.map → goal-validator-EM5XVWVC.js.map} +0 -0
- /package/dist/{graph-J4OGTYCO.js.map → graph-26JPZ3DF.js.map} +0 -0
- /package/dist/{hypothesis-O72ZLVOW.js.map → hypothesis-4UPE7KXU.js.map} +0 -0
- /package/dist/{incident-index-BWW2UEY7.js.map → incident-index-H6APJ4S3.js.map} +0 -0
- /package/dist/{insight-store-Q62UGMTF.js.map → insight-store-QEEUQR5L.js.map} +0 -0
- /package/dist/{issue-store-4FPABLC6.js.map → issue-store-C6XYENE5.js.map} +0 -0
- /package/dist/{ledger-43SIVE7X.js.map → ledger-VNA4DX3Z.js.map} +0 -0
- /package/dist/{linear-ingester-JRDQAIAA.js.map → linear-ingester-WIUBWF55.js.map} +0 -0
- /package/dist/{tiered-storage-VZL7KK64.js.map → tiered-storage-P6Z3NV2Q.js.map} +0 -0
- /package/dist/{trie-agent-ET3DAP5Y.js.map → trie-agent-GJJJCL6P.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
GitHubIngester
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-V3O7C2LY.js";
|
|
5
5
|
import {
|
|
6
6
|
CodebaseIndex
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WOTLY5NA.js";
|
|
8
8
|
import {
|
|
9
9
|
appendToSection,
|
|
10
10
|
completeBootstrap,
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
needsBootstrap,
|
|
23
23
|
projectInfoExists,
|
|
24
24
|
updateProjectSection
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-REHKDCI6.js";
|
|
26
26
|
import {
|
|
27
27
|
LinearIngester
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3KZBC3RJ.js";
|
|
29
29
|
import {
|
|
30
30
|
ExtractionPipeline,
|
|
31
31
|
GitHubBranchesTool,
|
|
@@ -47,44 +47,50 @@ import {
|
|
|
47
47
|
getPrompt,
|
|
48
48
|
getSystemPrompt,
|
|
49
49
|
handleCheckpointTool
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-SU3WCAC4.js";
|
|
51
|
+
import "./chunk-F7BMFOZ6.js";
|
|
52
|
+
import "./chunk-4UDBGYI3.js";
|
|
53
53
|
import {
|
|
54
54
|
getOutputManager
|
|
55
55
|
} from "./chunk-TIMIKBY2.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-JIS2OCZR.js";
|
|
57
|
+
import "./chunk-74R4XSFB.js";
|
|
58
|
+
import "./chunk-ABY2R7OK.js";
|
|
59
59
|
import {
|
|
60
60
|
exportToJson,
|
|
61
61
|
formatFriendlyError,
|
|
62
62
|
importFromJson,
|
|
63
63
|
isTrieInitialized
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-G7Q23IGF.js";
|
|
65
65
|
import {
|
|
66
66
|
loadConfig
|
|
67
|
-
} from "./chunk-
|
|
68
|
-
import "./chunk-
|
|
67
|
+
} from "./chunk-TU7D5DEW.js";
|
|
68
|
+
import "./chunk-TCNCNWGV.js";
|
|
69
69
|
import "./chunk-ZV2K6M7T.js";
|
|
70
70
|
import {
|
|
71
71
|
findCrossProjectPatterns,
|
|
72
72
|
getGlobalMemoryStats,
|
|
73
73
|
listTrackedProjects,
|
|
74
74
|
searchGlobalPatterns
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import {
|
|
77
|
-
getStorage
|
|
78
|
-
} from "./chunk-FG467PDD.js";
|
|
75
|
+
} from "./chunk-IFBEAOHH.js";
|
|
79
76
|
import {
|
|
80
77
|
ContextGraph
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import "./chunk-
|
|
78
|
+
} from "./chunk-TWQPOVRA.js";
|
|
79
|
+
import "./chunk-7HYOJ4Q7.js";
|
|
83
80
|
import {
|
|
84
81
|
isAIAvailable,
|
|
85
82
|
runAIAnalysis
|
|
86
|
-
} from "./chunk-
|
|
87
|
-
import "./chunk-
|
|
83
|
+
} from "./chunk-OJXFQRUE.js";
|
|
84
|
+
import "./chunk-GLY76TSI.js";
|
|
85
|
+
import "./chunk-F4NJ4CBP.js";
|
|
86
|
+
import "./chunk-IXO4G4D3.js";
|
|
87
|
+
import "./chunk-6NLHFIYA.js";
|
|
88
|
+
import {
|
|
89
|
+
getStorage
|
|
90
|
+
} from "./chunk-LNUMECBJ.js";
|
|
91
|
+
import {
|
|
92
|
+
getAutonomyConfig
|
|
93
|
+
} from "./chunk-QQG42HCI.js";
|
|
88
94
|
import {
|
|
89
95
|
findSimilarIssues,
|
|
90
96
|
getMemoryStats,
|
|
@@ -93,27 +99,18 @@ import {
|
|
|
93
99
|
purgeIssues,
|
|
94
100
|
searchIssues,
|
|
95
101
|
storeIssues
|
|
96
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-ED7PLRQA.js";
|
|
97
103
|
import "./chunk-EFWVF6TI.js";
|
|
98
|
-
import "./chunk-F4NJ4CBP.js";
|
|
99
|
-
import "./chunk-IXO4G4D3.js";
|
|
100
|
-
import "./chunk-6NLHFIYA.js";
|
|
101
|
-
import {
|
|
102
|
-
getSkillRegistry
|
|
103
|
-
} from "./chunk-G76DYVGX.js";
|
|
104
|
-
import {
|
|
105
|
-
getAutonomyConfig
|
|
106
|
-
} from "./chunk-5KJ4UJOY.js";
|
|
107
104
|
import {
|
|
108
105
|
getChangedFilesSinceTimestamp,
|
|
109
106
|
getGitChangedFiles,
|
|
110
107
|
runShellCommandSync
|
|
111
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-TWPX6PHF.js";
|
|
112
109
|
import "./chunk-43X6JBEM.js";
|
|
113
110
|
import {
|
|
114
111
|
getTrieDirectory,
|
|
115
112
|
getWorkingDirectory
|
|
116
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-4TQQP7JD.js";
|
|
117
114
|
import {
|
|
118
115
|
isInteractiveMode
|
|
119
116
|
} from "./chunk-APMV77PU.js";
|
|
@@ -1278,7 +1275,7 @@ ${f.content.slice(0, 1e3)}`
|
|
|
1278
1275
|
async checkAndGenerateHypotheses(projectPath) {
|
|
1279
1276
|
if (!isAIAvailable()) return;
|
|
1280
1277
|
try {
|
|
1281
|
-
const { getHypothesisEngine } = await import("./hypothesis-
|
|
1278
|
+
const { getHypothesisEngine } = await import("./hypothesis-4UPE7KXU.js");
|
|
1282
1279
|
const { getOutputManager: getOutputManager2 } = await import("./output-manager-DZO5LGSG.js");
|
|
1283
1280
|
const hypothesisEngine = getHypothesisEngine(projectPath);
|
|
1284
1281
|
const recentIssues = Array.from(this.state.issueCache.values()).flat();
|
|
@@ -1345,8 +1342,8 @@ ${f.content.slice(0, 1e3)}`
|
|
|
1345
1342
|
const totalIssues = Array.from(this.state.issueCache.values()).flat().length;
|
|
1346
1343
|
if (totalIssues < 5) return;
|
|
1347
1344
|
try {
|
|
1348
|
-
const { ContextGraph: ContextGraph2 } = await import("./graph-
|
|
1349
|
-
const { IncidentIndex } = await import("./incident-index-
|
|
1345
|
+
const { ContextGraph: ContextGraph2 } = await import("./graph-26JPZ3DF.js");
|
|
1346
|
+
const { IncidentIndex } = await import("./incident-index-H6APJ4S3.js");
|
|
1350
1347
|
const { TriePatternDiscovery } = await import("./pattern-discovery-F7LU5K6E.js");
|
|
1351
1348
|
const graph = new ContextGraph2(projectPath);
|
|
1352
1349
|
const incidentIndex = await IncidentIndex.build(graph, projectPath);
|
|
@@ -1488,7 +1485,7 @@ ${f.content.slice(0, 1e3)}`
|
|
|
1488
1485
|
if (remaining < 500) return;
|
|
1489
1486
|
try {
|
|
1490
1487
|
const graph = new ContextGraph(projectPath);
|
|
1491
|
-
const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-
|
|
1488
|
+
const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-EM5XVWVC.js");
|
|
1492
1489
|
console.debug("[AI Watcher] Loading active goals...");
|
|
1493
1490
|
const activeGoals = await getActiveGoals(projectPath);
|
|
1494
1491
|
const hasGoals = activeGoals.length > 0;
|
|
@@ -1740,7 +1737,7 @@ ${filesBlock}`,
|
|
|
1740
1737
|
const projectPath = this.watchedDirectory || getWorkingDirectory(void 0, true);
|
|
1741
1738
|
console.debug("[Initial Hypothesis] Starting initial hypothesis generation", { projectPath });
|
|
1742
1739
|
try {
|
|
1743
|
-
const { getHypothesisEngine } = await import("./hypothesis-
|
|
1740
|
+
const { getHypothesisEngine } = await import("./hypothesis-4UPE7KXU.js");
|
|
1744
1741
|
const hypothesisEngine = getHypothesisEngine(projectPath);
|
|
1745
1742
|
console.debug("[Initial Hypothesis] Running AI-powered hypothesis generation...");
|
|
1746
1743
|
const generated = await hypothesisEngine.generateHypothesesWithAI({
|
|
@@ -1798,7 +1795,7 @@ ${filesBlock}`,
|
|
|
1798
1795
|
const projectPath = this.watchedDirectory || getWorkingDirectory(void 0, true);
|
|
1799
1796
|
console.debug("[Initial Scan] Starting initial goal compliance scan", { projectPath });
|
|
1800
1797
|
try {
|
|
1801
|
-
const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-
|
|
1798
|
+
const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-EM5XVWVC.js");
|
|
1802
1799
|
const activeGoals = await getActiveGoals(projectPath);
|
|
1803
1800
|
console.debug("[Initial Scan] Loaded goals for initial scan:", {
|
|
1804
1801
|
goalCount: activeGoals.length,
|
|
@@ -1961,7 +1958,7 @@ ${filesBlock}`,
|
|
|
1961
1958
|
const graph = new ContextGraph(projectPath);
|
|
1962
1959
|
if (hasLinear) {
|
|
1963
1960
|
try {
|
|
1964
|
-
const { LinearIngester: LinearIngester2 } = await import("./linear-ingester-
|
|
1961
|
+
const { LinearIngester: LinearIngester2 } = await import("./linear-ingester-WIUBWF55.js");
|
|
1965
1962
|
const ingester = new LinearIngester2(projectPath, graph);
|
|
1966
1963
|
await ingester.syncTickets();
|
|
1967
1964
|
if (!isInteractiveMode()) {
|
|
@@ -1975,7 +1972,7 @@ ${filesBlock}`,
|
|
|
1975
1972
|
}
|
|
1976
1973
|
if (hasGithub) {
|
|
1977
1974
|
try {
|
|
1978
|
-
const { GitHubIngester: GitHubIngester2 } = await import("./github-ingester-
|
|
1975
|
+
const { GitHubIngester: GitHubIngester2 } = await import("./github-ingester-C66ZRUYC.js");
|
|
1979
1976
|
const ingester = new GitHubIngester2(graph);
|
|
1980
1977
|
const token = await ingester.getApiToken();
|
|
1981
1978
|
const repoInfo = ingester.getRepoInfo(projectPath);
|
|
@@ -2075,7 +2072,7 @@ Use \`trie_watch start\` to begin autonomous scanning.`
|
|
|
2075
2072
|
).join("\n");
|
|
2076
2073
|
let agencyStatus = "";
|
|
2077
2074
|
try {
|
|
2078
|
-
const { getTrieAgent } = await import("./trie-agent-
|
|
2075
|
+
const { getTrieAgent } = await import("./trie-agent-GJJJCL6P.js");
|
|
2079
2076
|
const trieAgent = getTrieAgent(this.watchedDirectory || getWorkingDirectory(void 0, true));
|
|
2080
2077
|
await trieAgent.initialize();
|
|
2081
2078
|
const status = await trieAgent.getAgencyStatus();
|
|
@@ -2184,7 +2181,7 @@ ${recentNudges || "(none)"}
|
|
|
2184
2181
|
Total issues: ${this.state.totalIssuesFound}
|
|
2185
2182
|
Files scanned: ${this.state.filesScanned}
|
|
2186
2183
|
|
|
2187
|
-
To get a full report, run \`
|
|
2184
|
+
To get a full report, run \`trie watch\` on your codebase.`
|
|
2188
2185
|
}]
|
|
2189
2186
|
};
|
|
2190
2187
|
}
|
|
@@ -2194,37 +2191,25 @@ To get a full report, run \`trie_scan\` on your codebase.`
|
|
|
2194
2191
|
import { readFile as readFile3 } from "fs/promises";
|
|
2195
2192
|
import { existsSync as existsSync3 } from "fs";
|
|
2196
2193
|
import { join as join3, basename as basename3, resolve as resolve2, isAbsolute as isAbsolute2 } from "path";
|
|
2197
|
-
|
|
2198
|
-
// src/skills/built-in/super-reviewer.ts
|
|
2199
|
-
var CRITICAL_REVIEW_CHECKLIST = {
|
|
2200
|
-
stateAndLifecycle: [
|
|
2201
|
-
"Uninitialized state accessed before setup",
|
|
2202
|
-
"Missing cleanup on unmount/dispose",
|
|
2203
|
-
"State mutations in wrong lifecycle phase"
|
|
2204
|
-
],
|
|
2205
|
-
edgeCasesAndRaces: [
|
|
2206
|
-
"Race conditions in async operations",
|
|
2207
|
-
"Missing error handling for edge cases",
|
|
2208
|
-
"Unhandled promise rejections"
|
|
2209
|
-
],
|
|
2210
|
-
missingPieces: [
|
|
2211
|
-
"Missing input validation",
|
|
2212
|
-
"Missing error handling",
|
|
2213
|
-
"Missing logging/monitoring"
|
|
2214
|
-
]
|
|
2215
|
-
};
|
|
2216
|
-
var SuperReviewerAgent = class {
|
|
2217
|
-
async review(_files) {
|
|
2218
|
-
return { issues: [] };
|
|
2219
|
-
}
|
|
2220
|
-
async buildReviewWorkflow(files, context) {
|
|
2221
|
-
return { files, context };
|
|
2222
|
-
}
|
|
2223
|
-
};
|
|
2224
|
-
|
|
2225
|
-
// src/tools/pr-review.ts
|
|
2226
2194
|
var TriePRReviewTool = class {
|
|
2227
|
-
|
|
2195
|
+
// Review workflow is now ledger-driven; keep a lightweight built-in checklist.
|
|
2196
|
+
CRITICAL_REVIEW_CHECKLIST = {
|
|
2197
|
+
stateAndLifecycle: [
|
|
2198
|
+
"Uninitialized state accessed before setup",
|
|
2199
|
+
"Missing cleanup on unmount/dispose",
|
|
2200
|
+
"State mutations in wrong lifecycle phase"
|
|
2201
|
+
],
|
|
2202
|
+
edgeCasesAndRaces: [
|
|
2203
|
+
"Race conditions in async operations",
|
|
2204
|
+
"Missing error handling for edge cases",
|
|
2205
|
+
"Unhandled promise rejections"
|
|
2206
|
+
],
|
|
2207
|
+
missingPieces: [
|
|
2208
|
+
"Missing input validation",
|
|
2209
|
+
"Missing error handling",
|
|
2210
|
+
"Missing logging/monitoring"
|
|
2211
|
+
]
|
|
2212
|
+
};
|
|
2228
2213
|
exec(command, cwd, maxBuffer) {
|
|
2229
2214
|
const opts = {
|
|
2230
2215
|
captureOutput: false,
|
|
@@ -2272,18 +2257,15 @@ Usage:
|
|
|
2272
2257
|
};
|
|
2273
2258
|
}
|
|
2274
2259
|
const designDocs = await this.findDesignDocs(changes.files, prInfo);
|
|
2275
|
-
const workflow =
|
|
2276
|
-
|
|
2277
|
-
{
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
designDocs
|
|
2285
|
-
}
|
|
2286
|
-
);
|
|
2260
|
+
const workflow = this.buildReviewWorkflow(changes.files, {
|
|
2261
|
+
...prInfo.number ? { prNumber: prInfo.number } : {},
|
|
2262
|
+
...prInfo.title ? { prTitle: prInfo.title } : {},
|
|
2263
|
+
...prInfo.author ? { prAuthor: prInfo.author } : {},
|
|
2264
|
+
...prInfo.baseBranch ? { baseBranch: prInfo.baseBranch } : {},
|
|
2265
|
+
...prInfo.headBranch ? { headBranch: prInfo.headBranch } : {},
|
|
2266
|
+
mode: mode || "own",
|
|
2267
|
+
designDocs
|
|
2268
|
+
});
|
|
2287
2269
|
const fileContents = await this.preloadFiles(changes.files.map((f) => f.path));
|
|
2288
2270
|
const reviewPrompt = this.generateReviewPrompt(workflow, changes, fileContents);
|
|
2289
2271
|
return {
|
|
@@ -2422,6 +2404,36 @@ Usage:
|
|
|
2422
2404
|
}
|
|
2423
2405
|
return files;
|
|
2424
2406
|
}
|
|
2407
|
+
buildReviewWorkflow(files, context) {
|
|
2408
|
+
const totalAdditions = files.reduce((sum, f) => sum + (f.additions || 0), 0);
|
|
2409
|
+
const totalDeletions = files.reduce((sum, f) => sum + (f.deletions || 0), 0);
|
|
2410
|
+
const reviewMode = context.mode === "others" ? "others" : "own";
|
|
2411
|
+
const reviewInstructions = {
|
|
2412
|
+
mode: reviewMode,
|
|
2413
|
+
description: reviewMode === "own" ? "Your PR \u2014 focus on footguns, missing tests, and production risks." : "Someone else's PR \u2014 focus on correctness, clarity, and maintainability."
|
|
2414
|
+
};
|
|
2415
|
+
const sorted = [...files].sort((a, b) => a.path.localeCompare(b.path));
|
|
2416
|
+
const fileOrder = sorted.map((f, i) => ({
|
|
2417
|
+
index: i + 1,
|
|
2418
|
+
path: f.path,
|
|
2419
|
+
reason: i === 0 ? "Start here to establish baseline context" : "Proceed in filename order"
|
|
2420
|
+
}));
|
|
2421
|
+
return {
|
|
2422
|
+
metadata: {
|
|
2423
|
+
...context.prNumber ? { prNumber: context.prNumber } : {},
|
|
2424
|
+
prTitle: context.prTitle || "PR Review",
|
|
2425
|
+
prAuthor: context.prAuthor || "unknown",
|
|
2426
|
+
baseBranch: context.baseBranch || "unknown",
|
|
2427
|
+
headBranch: context.headBranch || "unknown",
|
|
2428
|
+
totalFiles: files.length,
|
|
2429
|
+
totalAdditions,
|
|
2430
|
+
totalDeletions,
|
|
2431
|
+
designDocs: context.designDocs
|
|
2432
|
+
},
|
|
2433
|
+
fileOrder,
|
|
2434
|
+
reviewInstructions
|
|
2435
|
+
};
|
|
2436
|
+
}
|
|
2425
2437
|
/**
|
|
2426
2438
|
* Find related design docs
|
|
2427
2439
|
*/
|
|
@@ -2537,21 +2549,21 @@ Usage:
|
|
|
2537
2549
|
`;
|
|
2538
2550
|
prompt += `**State & Lifecycle:**
|
|
2539
2551
|
`;
|
|
2540
|
-
for (const check of CRITICAL_REVIEW_CHECKLIST.stateAndLifecycle) {
|
|
2552
|
+
for (const check of this.CRITICAL_REVIEW_CHECKLIST.stateAndLifecycle) {
|
|
2541
2553
|
prompt += `- ${check}
|
|
2542
2554
|
`;
|
|
2543
2555
|
}
|
|
2544
2556
|
prompt += `
|
|
2545
2557
|
**Edge Cases & Races:**
|
|
2546
2558
|
`;
|
|
2547
|
-
for (const check of CRITICAL_REVIEW_CHECKLIST.edgeCasesAndRaces) {
|
|
2559
|
+
for (const check of this.CRITICAL_REVIEW_CHECKLIST.edgeCasesAndRaces) {
|
|
2548
2560
|
prompt += `- ${check}
|
|
2549
2561
|
`;
|
|
2550
2562
|
}
|
|
2551
2563
|
prompt += `
|
|
2552
2564
|
**Missing Pieces:**
|
|
2553
2565
|
`;
|
|
2554
|
-
for (const check of CRITICAL_REVIEW_CHECKLIST.missingPieces) {
|
|
2566
|
+
for (const check of this.CRITICAL_REVIEW_CHECKLIST.missingPieces) {
|
|
2555
2567
|
prompt += `- ${check}
|
|
2556
2568
|
`;
|
|
2557
2569
|
}
|
|
@@ -2899,7 +2911,7 @@ var TrieInitTool = class {
|
|
|
2899
2911
|
"",
|
|
2900
2912
|
"1. Edit `.trie/PROJECT.md` with your project description",
|
|
2901
2913
|
"2. Define coding standards in `.trie/RULES.md`",
|
|
2902
|
-
"3. Run `
|
|
2914
|
+
"3. Run `trie watch` to analyze your codebase",
|
|
2903
2915
|
'4. Run `trie_init` with action="complete" when setup is done'
|
|
2904
2916
|
);
|
|
2905
2917
|
return lines.join("\n");
|
|
@@ -3568,11 +3580,7 @@ var ToolRegistry = class {
|
|
|
3568
3580
|
properties: {
|
|
3569
3581
|
action: {
|
|
3570
3582
|
type: "string",
|
|
3571
|
-
description: "Optional quick action:
|
|
3572
|
-
},
|
|
3573
|
-
agent: {
|
|
3574
|
-
type: "string",
|
|
3575
|
-
description: "Agent key when action=agent or when using a custom skill name"
|
|
3583
|
+
description: "Optional quick action: pr_review, watch, fix, explain, test, visual_qa_browser"
|
|
3576
3584
|
},
|
|
3577
3585
|
files: {
|
|
3578
3586
|
type: "array",
|
|
@@ -3623,7 +3631,7 @@ var ToolRegistry = class {
|
|
|
3623
3631
|
issueIds: {
|
|
3624
3632
|
type: "array",
|
|
3625
3633
|
items: { type: "string" },
|
|
3626
|
-
description: "Issue IDs to dispatch (from
|
|
3634
|
+
description: "Issue IDs to dispatch (from trie_fix/watch). If omitted, dispatches all cloud-eligible pending issues. IGNORED if file+issue+fix are provided (ad-hoc mode)."
|
|
3627
3635
|
},
|
|
3628
3636
|
forceCloud: {
|
|
3629
3637
|
type: "boolean",
|
|
@@ -3817,7 +3825,7 @@ var ToolRegistry = class {
|
|
|
3817
3825
|
},
|
|
3818
3826
|
{
|
|
3819
3827
|
name: "trie_init",
|
|
3820
|
-
description: "Initialize bootstrap files (.trie/RULES.md, .trie/TEAM.md, .trie/BOOTSTRAP.md). Detects stack
|
|
3828
|
+
description: "Initialize bootstrap files (.trie/RULES.md, .trie/TEAM.md, .trie/BOOTSTRAP.md). Detects stack.",
|
|
3821
3829
|
inputSchema: {
|
|
3822
3830
|
type: "object",
|
|
3823
3831
|
properties: {
|
|
@@ -4153,13 +4161,6 @@ import { readdir, readFile as readFile4 } from "fs/promises";
|
|
|
4153
4161
|
import { existsSync as existsSync4 } from "fs";
|
|
4154
4162
|
import { join as join4, dirname as dirname2 } from "path";
|
|
4155
4163
|
import { fileURLToPath } from "url";
|
|
4156
|
-
|
|
4157
|
-
// src/skills/installer.ts
|
|
4158
|
-
async function listInstalledSkills() {
|
|
4159
|
-
return [];
|
|
4160
|
-
}
|
|
4161
|
-
|
|
4162
|
-
// src/server/resource-manager.ts
|
|
4163
4164
|
var UI_APPS = {
|
|
4164
4165
|
"ledger": {
|
|
4165
4166
|
name: "Decision Ledger",
|
|
@@ -4183,7 +4184,6 @@ var UI_APPS = {
|
|
|
4183
4184
|
}
|
|
4184
4185
|
};
|
|
4185
4186
|
var ResourceManager = class {
|
|
4186
|
-
skillRegistry = getSkillRegistry();
|
|
4187
4187
|
/**
|
|
4188
4188
|
* Get all available resources dynamically
|
|
4189
4189
|
*/
|
|
@@ -4208,12 +4208,6 @@ var ResourceManager = class {
|
|
|
4208
4208
|
description: "Detailed context state with scan history and priorities",
|
|
4209
4209
|
mimeType: "application/json"
|
|
4210
4210
|
},
|
|
4211
|
-
{
|
|
4212
|
-
uri: "trie://skills",
|
|
4213
|
-
name: "Available Skills",
|
|
4214
|
-
description: "List of all available Trie skills (built-in and custom)",
|
|
4215
|
-
mimeType: "application/json"
|
|
4216
|
-
},
|
|
4217
4211
|
{
|
|
4218
4212
|
uri: "trie://config",
|
|
4219
4213
|
name: "Trie Configuration",
|
|
@@ -4232,12 +4226,6 @@ var ResourceManager = class {
|
|
|
4232
4226
|
description: "Summary of loaded vulnerability detection signatures",
|
|
4233
4227
|
mimeType: "application/json"
|
|
4234
4228
|
},
|
|
4235
|
-
{
|
|
4236
|
-
uri: "trie://skills/installed",
|
|
4237
|
-
name: "Installed Skills",
|
|
4238
|
-
description: "External skills installed from skills.sh that Trie can apply",
|
|
4239
|
-
mimeType: "application/json"
|
|
4240
|
-
},
|
|
4241
4229
|
{
|
|
4242
4230
|
uri: "trie://bootstrap",
|
|
4243
4231
|
name: "Bootstrap Status",
|
|
@@ -4270,7 +4258,6 @@ var ResourceManager = class {
|
|
|
4270
4258
|
}
|
|
4271
4259
|
);
|
|
4272
4260
|
resources.push(...await this.getScanReportResources());
|
|
4273
|
-
resources.push(...await this.getCustomSkillResources());
|
|
4274
4261
|
resources.push(...this.getUIAppResources());
|
|
4275
4262
|
return resources;
|
|
4276
4263
|
}
|
|
@@ -4289,20 +4276,6 @@ var ResourceManager = class {
|
|
|
4289
4276
|
return [];
|
|
4290
4277
|
}
|
|
4291
4278
|
}
|
|
4292
|
-
async getCustomSkillResources() {
|
|
4293
|
-
try {
|
|
4294
|
-
await this.skillRegistry.loadCustomSkills();
|
|
4295
|
-
const customSkills = this.skillRegistry.getCustomSkills();
|
|
4296
|
-
return customSkills.map((skill) => ({
|
|
4297
|
-
uri: `trie://skills/custom/${skill.name}`,
|
|
4298
|
-
name: `Custom Skill: ${skill.name}`,
|
|
4299
|
-
description: skill.description,
|
|
4300
|
-
mimeType: "application/json"
|
|
4301
|
-
}));
|
|
4302
|
-
} catch {
|
|
4303
|
-
return [];
|
|
4304
|
-
}
|
|
4305
|
-
}
|
|
4306
4279
|
/**
|
|
4307
4280
|
* Read content for a specific resource
|
|
4308
4281
|
*/
|
|
@@ -4321,12 +4294,6 @@ var ResourceManager = class {
|
|
|
4321
4294
|
if (parsedUri === "context/state") {
|
|
4322
4295
|
return await this.getContextStateResource(uri);
|
|
4323
4296
|
}
|
|
4324
|
-
if (parsedUri === "skills") {
|
|
4325
|
-
return await this.getBuiltInSkillsResource(uri);
|
|
4326
|
-
}
|
|
4327
|
-
if (parsedUri.startsWith("skills/custom/")) {
|
|
4328
|
-
return await this.getCustomSkillResource(uri, parsedUri);
|
|
4329
|
-
}
|
|
4330
4297
|
if (parsedUri === "config") {
|
|
4331
4298
|
return await this.getConfigResource(uri);
|
|
4332
4299
|
}
|
|
@@ -4336,9 +4303,6 @@ var ResourceManager = class {
|
|
|
4336
4303
|
if (parsedUri === "signatures") {
|
|
4337
4304
|
return await this.getSignaturesResource(uri);
|
|
4338
4305
|
}
|
|
4339
|
-
if (parsedUri === "skills/installed") {
|
|
4340
|
-
return await this.getInstalledSkillsResource(uri);
|
|
4341
|
-
}
|
|
4342
4306
|
if (parsedUri === "bootstrap") {
|
|
4343
4307
|
return await this.getBootstrapResource(uri);
|
|
4344
4308
|
}
|
|
@@ -4554,19 +4518,11 @@ var ResourceManager = class {
|
|
|
4554
4518
|
summary.push("## Available Tools", "");
|
|
4555
4519
|
summary.push("| Tool | Purpose |");
|
|
4556
4520
|
summary.push("|------|---------|");
|
|
4557
|
-
summary.push("| `
|
|
4521
|
+
summary.push("| `trie_fix` | Apply high-confidence fixes |");
|
|
4558
4522
|
summary.push("| `trie_fix` | Generate fix recommendations |");
|
|
4559
4523
|
summary.push("| `trie_memory` | Search issue history |");
|
|
4560
4524
|
summary.push("| `trie_init` | Initialize bootstrap files |");
|
|
4561
4525
|
summary.push("");
|
|
4562
|
-
try {
|
|
4563
|
-
const skills = await listInstalledSkills();
|
|
4564
|
-
if (skills.length > 0) {
|
|
4565
|
-
summary.push(`**Skills:** ${skills.length} installed (${skills.slice(0, 3).map((s) => s.name).join(", ")}${skills.length > 3 ? "..." : ""})`);
|
|
4566
|
-
summary.push("");
|
|
4567
|
-
}
|
|
4568
|
-
} catch {
|
|
4569
|
-
}
|
|
4570
4526
|
summary.push("---", "", "# Detailed Context", "");
|
|
4571
4527
|
const agentsMdPath = join4(getTrieDirectory(workDir), "AGENTS.md");
|
|
4572
4528
|
try {
|
|
@@ -4649,41 +4605,6 @@ This information is automatically available to Claude Code, Cursor, and other AI
|
|
|
4649
4605
|
}]
|
|
4650
4606
|
};
|
|
4651
4607
|
}
|
|
4652
|
-
async getBuiltInSkillsResource(uri) {
|
|
4653
|
-
await this.skillRegistry.loadCustomSkills();
|
|
4654
|
-
const skills = this.skillRegistry.getSkillDescriptions();
|
|
4655
|
-
return {
|
|
4656
|
-
contents: [{
|
|
4657
|
-
uri,
|
|
4658
|
-
mimeType: "application/json",
|
|
4659
|
-
text: JSON.stringify({
|
|
4660
|
-
totalSkills: skills.length,
|
|
4661
|
-
builtinCount: skills.filter((a) => !a.isCustom).length,
|
|
4662
|
-
customCount: skills.filter((a) => a.isCustom).length,
|
|
4663
|
-
skills: skills.map((a) => ({
|
|
4664
|
-
name: a.name,
|
|
4665
|
-
description: a.description,
|
|
4666
|
-
type: a.isCustom ? "custom" : "builtin"
|
|
4667
|
-
}))
|
|
4668
|
-
}, null, 2)
|
|
4669
|
-
}]
|
|
4670
|
-
};
|
|
4671
|
-
}
|
|
4672
|
-
async getCustomSkillResource(uri, parsedUri) {
|
|
4673
|
-
const skillName = parsedUri.replace("skills/custom/", "");
|
|
4674
|
-
await this.skillRegistry.loadCustomSkills();
|
|
4675
|
-
const metadata = this.skillRegistry.getCustomSkillMetadata(skillName);
|
|
4676
|
-
if (!metadata) {
|
|
4677
|
-
throw new Error(`Custom skill not found: ${skillName}`);
|
|
4678
|
-
}
|
|
4679
|
-
return {
|
|
4680
|
-
contents: [{
|
|
4681
|
-
uri,
|
|
4682
|
-
mimeType: "application/json",
|
|
4683
|
-
text: JSON.stringify(metadata, null, 2)
|
|
4684
|
-
}]
|
|
4685
|
-
};
|
|
4686
|
-
}
|
|
4687
4608
|
async getConfigResource(uri) {
|
|
4688
4609
|
const config = await loadConfig();
|
|
4689
4610
|
return {
|
|
@@ -4724,7 +4645,7 @@ This information is automatically available to Claude Code, Cursor, and other AI
|
|
|
4724
4645
|
mimeType: "application/json",
|
|
4725
4646
|
text: JSON.stringify({
|
|
4726
4647
|
error: "No cache found. Run a scan first to build the cache.",
|
|
4727
|
-
hint: "
|
|
4648
|
+
hint: "Run trie watch to analyze your codebase"
|
|
4728
4649
|
}, null, 2)
|
|
4729
4650
|
}]
|
|
4730
4651
|
};
|
|
@@ -4747,33 +4668,6 @@ This information is automatically available to Claude Code, Cursor, and other AI
|
|
|
4747
4668
|
}]
|
|
4748
4669
|
};
|
|
4749
4670
|
}
|
|
4750
|
-
async getInstalledSkillsResource(uri) {
|
|
4751
|
-
const skills = await listInstalledSkills();
|
|
4752
|
-
const state = await loadContextState();
|
|
4753
|
-
const skillsWithUsage = skills.map((skill) => {
|
|
4754
|
-
const record = state.skills?.[skill.name];
|
|
4755
|
-
return {
|
|
4756
|
-
name: skill.name,
|
|
4757
|
-
description: skill.description,
|
|
4758
|
-
source: skill.installedFrom,
|
|
4759
|
-
installedAt: skill.installedAt,
|
|
4760
|
-
timesApplied: record?.timesApplied || 0,
|
|
4761
|
-
appliedBy: record?.appliedBy || [],
|
|
4762
|
-
lastApplied: record?.lastApplied
|
|
4763
|
-
};
|
|
4764
|
-
});
|
|
4765
|
-
return {
|
|
4766
|
-
contents: [{
|
|
4767
|
-
uri,
|
|
4768
|
-
mimeType: "application/json",
|
|
4769
|
-
text: JSON.stringify({
|
|
4770
|
-
totalSkills: skills.length,
|
|
4771
|
-
skills: skillsWithUsage,
|
|
4772
|
-
note: "Skills are capabilities applied by agents, not autonomous agents themselves."
|
|
4773
|
-
}, null, 2)
|
|
4774
|
-
}]
|
|
4775
|
-
};
|
|
4776
|
-
}
|
|
4777
4671
|
async getScanReportResource(uri, parsedUri) {
|
|
4778
4672
|
const fileName = parsedUri.replace("reports/", "");
|
|
4779
4673
|
const reportPath = join4(getWorkingDirectory(void 0, true), "trie-reports", fileName);
|
|
@@ -5254,38 +5148,6 @@ var RequestHandlers = class {
|
|
|
5254
5148
|
return await this.toolRegistry.getTool("register_agent").execute(args);
|
|
5255
5149
|
case "watch":
|
|
5256
5150
|
return await this.toolRegistry.getTool("watch").execute(args);
|
|
5257
|
-
// Individual agent commands
|
|
5258
|
-
case "security":
|
|
5259
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "security" });
|
|
5260
|
-
case "legal":
|
|
5261
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "legal" });
|
|
5262
|
-
case "accessibility":
|
|
5263
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "accessibility" });
|
|
5264
|
-
case "design":
|
|
5265
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "design-engineer" });
|
|
5266
|
-
case "architecture":
|
|
5267
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "software-architect" });
|
|
5268
|
-
case "bugs":
|
|
5269
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "bug-finding" });
|
|
5270
|
-
case "ux":
|
|
5271
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "user-testing" });
|
|
5272
|
-
case "types":
|
|
5273
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "typecheck" });
|
|
5274
|
-
case "devops":
|
|
5275
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "devops" });
|
|
5276
|
-
case "clean":
|
|
5277
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "trie_clean" });
|
|
5278
|
-
case "soc2":
|
|
5279
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "soc2" });
|
|
5280
|
-
// New agents
|
|
5281
|
-
case "performance":
|
|
5282
|
-
case "perf":
|
|
5283
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "performance" });
|
|
5284
|
-
case "e2e":
|
|
5285
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "e2e" });
|
|
5286
|
-
case "visual_qa":
|
|
5287
|
-
case "visual":
|
|
5288
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "visual-qa" });
|
|
5289
5151
|
case "visual_qa_browser": {
|
|
5290
5152
|
try {
|
|
5291
5153
|
const result = await runVisualQA(args);
|
|
@@ -5328,31 +5190,6 @@ npx playwright install chromium
|
|
|
5328
5190
|
};
|
|
5329
5191
|
}
|
|
5330
5192
|
}
|
|
5331
|
-
case "data_flow":
|
|
5332
|
-
case "dataflow":
|
|
5333
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "data-flow" });
|
|
5334
|
-
// Special agents
|
|
5335
|
-
case "agent_smith":
|
|
5336
|
-
case "agentsmith":
|
|
5337
|
-
case "smith":
|
|
5338
|
-
if (args?.clear_memory || args?.show_stats) {
|
|
5339
|
-
return await this.handleAgentSmith(args);
|
|
5340
|
-
}
|
|
5341
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "agent-smith" });
|
|
5342
|
-
case "super_reviewer":
|
|
5343
|
-
case "superreviewer":
|
|
5344
|
-
case "reviewer":
|
|
5345
|
-
return await this.toolRegistry.getTool("agent").execute({ ...args, agent: "super-reviewer" });
|
|
5346
|
-
// Custom skill tools (with backward-compatible agent aliases)
|
|
5347
|
-
case "create_skill":
|
|
5348
|
-
case "create_agent":
|
|
5349
|
-
return await this.toolRegistry.getTool("create_skill").execute(args);
|
|
5350
|
-
case "save_skill":
|
|
5351
|
-
case "save_agent":
|
|
5352
|
-
return await this.toolRegistry.getTool("save_skill").execute(args);
|
|
5353
|
-
case "list_skills":
|
|
5354
|
-
case "list_agents":
|
|
5355
|
-
return await this.toolRegistry.getTool("list_skills").execute(args);
|
|
5356
5193
|
case "pr_review":
|
|
5357
5194
|
return await this.toolRegistry.getTool("pr_review").execute(args);
|
|
5358
5195
|
case "project":
|
|
@@ -5454,45 +5291,16 @@ npx playwright install chromium
|
|
|
5454
5291
|
"",
|
|
5455
5292
|
"**Most common:**",
|
|
5456
5293
|
"- `trie` (no args) \u2014 show this menu",
|
|
5457
|
-
'- `trie` with `{ action: "scan", files?: [], directory?: "" }` \u2014 auto triage & scan',
|
|
5458
|
-
'- `trie` with `{ action: "security", files?: [] }` \u2014 single-skill run (any skill name works)',
|
|
5459
|
-
'- `trie` with `{ action: "agent_smith" }` \u2014 aggressive AI-pattern hunter',
|
|
5460
|
-
"",
|
|
5461
|
-
"**Other actions:**",
|
|
5462
|
-
'- `action: "pr_review"` \u2014 interactive PR review',
|
|
5463
5294
|
'- `action: "fix"` \u2014 high-confidence fixes',
|
|
5464
5295
|
'- `action: "watch"` \u2014 start/stop/status autonomous watch',
|
|
5296
|
+
'- `action: "pr_review"` \u2014 interactive PR review',
|
|
5297
|
+
"",
|
|
5298
|
+
"**Other actions:**",
|
|
5465
5299
|
'- `action: "test"` \u2014 generate/coverage/suggest/run tests (requires `files` + `action`)',
|
|
5466
5300
|
'- `action: "explain"` \u2014 explain code/issues/risks',
|
|
5467
|
-
'- `action: "list_skills"` \u2014 list all skills (external + custom)',
|
|
5468
5301
|
'- `action: "visual_qa_browser"` \u2014 screenshots for visual QA',
|
|
5469
5302
|
"",
|
|
5470
|
-
"
|
|
5471
|
-
"`security`, `legal`, `accessibility`, `design`, `architecture`, `bugs`, `ux`, `types`, `devops`, `clean`, `soc2`, `performance`, `e2e`, `visual_qa`, `data_flow`",
|
|
5472
|
-
"",
|
|
5473
|
-
"**Special skills:**",
|
|
5474
|
-
"`agent_smith` \u2014 35 vibe code hunters with cross-file detection",
|
|
5475
|
-
"`super_reviewer` \u2014 Interactive PR review with cross-examination",
|
|
5476
|
-
"",
|
|
5477
|
-
"All commands accept `trie_` prefix (e.g., `trie_scan`, `trie_security`). Short names still work for compatibility."
|
|
5478
|
-
].join("\n")
|
|
5479
|
-
}]
|
|
5480
|
-
};
|
|
5481
|
-
}
|
|
5482
|
-
async handleAgentSmith(_smithArgs) {
|
|
5483
|
-
return {
|
|
5484
|
-
content: [{
|
|
5485
|
-
type: "text",
|
|
5486
|
-
text: [
|
|
5487
|
-
"\u{1F916} Agent Smith functionality has been integrated into the decision ledger.",
|
|
5488
|
-
"",
|
|
5489
|
-
"The autonomous agent now:",
|
|
5490
|
-
"- Extracts patterns automatically via `trie watch`",
|
|
5491
|
-
"- Builds decision ledger from every change",
|
|
5492
|
-
"- Predicts problems via `trie gotcha`",
|
|
5493
|
-
"",
|
|
5494
|
-
"Start the agent: `trie_watch start`",
|
|
5495
|
-
"Query the ledger: `trie_gotcha`"
|
|
5303
|
+
"All commands accept `trie_` prefix (e.g., `trie_fix`, `trie_watch`)."
|
|
5496
5304
|
].join("\n")
|
|
5497
5305
|
}]
|
|
5498
5306
|
};
|
|
@@ -5550,7 +5358,7 @@ var MCPServer = class {
|
|
|
5550
5358
|
/**
|
|
5551
5359
|
* Show startup banner
|
|
5552
5360
|
*/
|
|
5553
|
-
showStartupBanner(
|
|
5361
|
+
showStartupBanner(toolCount, aiTool) {
|
|
5554
5362
|
console.error(`
|
|
5555
5363
|
\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
|
|
5556
5364
|
\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D
|
|
@@ -5558,21 +5366,19 @@ var MCPServer = class {
|
|
|
5558
5366
|
\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D
|
|
5559
5367
|
\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
|
|
5560
5368
|
\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
5561
|
-
Your central registry for Trie
|
|
5369
|
+
Your central registry for Trie tools
|
|
5562
5370
|
|
|
5563
5371
|
by Louis Kishfy
|
|
5564
5372
|
|
|
5565
5373
|
Download the Trie workspace: https://www.trie.dev
|
|
5566
5374
|
Follow me on X: https://x.com/louiskishfy
|
|
5567
5375
|
|
|
5568
|
-
${
|
|
5376
|
+
${toolCount} tools ready | ${aiTool}
|
|
5569
5377
|
|
|
5570
5378
|
Quick Start:
|
|
5571
|
-
\u2022 "Scan this code" - Run
|
|
5572
|
-
\u2022 "
|
|
5573
|
-
\u2022 "
|
|
5574
|
-
\u2022 "Use trie_list_skills" - See all skills
|
|
5575
|
-
\u2022 "Use trie_create_skill" - Make custom skill
|
|
5379
|
+
\u2022 "Scan this code" - Run Trie analysis
|
|
5380
|
+
\u2022 "Use trie" - Open the Trie menu
|
|
5381
|
+
\u2022 "Use trie_fix" - Apply high-confidence fixes
|
|
5576
5382
|
|
|
5577
5383
|
Ready.
|
|
5578
5384
|
`);
|
|
@@ -5584,9 +5390,8 @@ var MCPServer = class {
|
|
|
5584
5390
|
try {
|
|
5585
5391
|
const aiTool = detectAITool();
|
|
5586
5392
|
await loadConfig();
|
|
5587
|
-
const
|
|
5588
|
-
|
|
5589
|
-
this.showStartupBanner(skillCount, aiTool.name);
|
|
5393
|
+
const toolCount = this.toolRegistry.getAllTools().length;
|
|
5394
|
+
this.showStartupBanner(toolCount, aiTool.name);
|
|
5590
5395
|
const transport = new StdioServerTransport();
|
|
5591
5396
|
await this.server.connect(transport);
|
|
5592
5397
|
} catch (error) {
|