@triedotdev/mcp 1.0.59 → 1.0.61
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/README.md +17 -13
- package/dist/{agent-smith-O7RG7WQ3.js → agent-smith-57MKX5QC.js} +3 -2
- package/dist/{agent-smith-runner-EW4C4PTF.js → agent-smith-runner-ZU4R3I2Z.js} +5 -3
- package/dist/{agent-smith-runner-EW4C4PTF.js.map → agent-smith-runner-ZU4R3I2Z.js.map} +1 -1
- package/dist/{chunk-6ODT4U4O.js → chunk-32WLOG6E.js} +539 -194
- package/dist/chunk-32WLOG6E.js.map +1 -0
- package/dist/{chunk-3CS6Z2SL.js → chunk-MVUCBUBR.js} +7 -2
- package/dist/chunk-MVUCBUBR.js.map +1 -0
- package/dist/{chunk-AVOMCNBD.js → chunk-NUT4G5AY.js} +23 -86
- package/dist/chunk-NUT4G5AY.js.map +1 -0
- package/dist/chunk-RAZUNSBI.js +171 -0
- package/dist/chunk-RAZUNSBI.js.map +1 -0
- package/dist/{chunk-HUQQSQOD.js → chunk-S4VGGLXF.js} +73 -44
- package/dist/chunk-S4VGGLXF.js.map +1 -0
- package/dist/{chunk-MR755QGT.js → chunk-ULOW5HSH.js} +7 -2
- package/dist/chunk-ULOW5HSH.js.map +1 -0
- package/dist/{chunk-KLKY34RE.js → chunk-XSPS463E.js} +139 -12
- package/dist/chunk-XSPS463E.js.map +1 -0
- package/dist/{chunk-3B2JBLSP.js → chunk-XVGHO2Z5.js} +698 -37
- package/dist/chunk-XVGHO2Z5.js.map +1 -0
- package/dist/cli/main.js +6 -5
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +10 -9
- package/dist/cli/yolo-daemon.js.map +1 -1
- package/dist/index.js +30 -18
- package/dist/index.js.map +1 -1
- package/dist/{vibe-code-signatures-4CBHUSI7.js → vibe-code-signatures-TGMQXYGO.js} +3 -2
- package/dist/{vulnerability-signatures-J3CUQ7VR.js → vulnerability-signatures-GOVD4Q24.js} +3 -2
- package/dist/workers/agent-worker.js +4 -3
- package/dist/workers/agent-worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3B2JBLSP.js.map +0 -1
- package/dist/chunk-3CS6Z2SL.js.map +0 -1
- package/dist/chunk-6ODT4U4O.js.map +0 -1
- package/dist/chunk-AVOMCNBD.js.map +0 -1
- package/dist/chunk-HUQQSQOD.js.map +0 -1
- package/dist/chunk-KLKY34RE.js.map +0 -1
- package/dist/chunk-MR755QGT.js.map +0 -1
- /package/dist/{agent-smith-O7RG7WQ3.js.map → agent-smith-57MKX5QC.js.map} +0 -0
- /package/dist/{vibe-code-signatures-4CBHUSI7.js.map → vibe-code-signatures-TGMQXYGO.js.map} +0 -0
- /package/dist/{vulnerability-signatures-J3CUQ7VR.js.map → vulnerability-signatures-GOVD4Q24.js.map} +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// src/utils/progress.ts
|
|
2
|
+
var _interactiveMode = false;
|
|
3
|
+
function setInteractiveMode(enabled) {
|
|
4
|
+
_interactiveMode = enabled;
|
|
5
|
+
}
|
|
6
|
+
function isInteractiveMode() {
|
|
7
|
+
return _interactiveMode;
|
|
8
|
+
}
|
|
9
|
+
var ProgressReporter = class {
|
|
10
|
+
currentPhase = "init";
|
|
11
|
+
startTime = Date.now();
|
|
12
|
+
phaseStartTime = Date.now();
|
|
13
|
+
verbose;
|
|
14
|
+
constructor(options = {}) {
|
|
15
|
+
this.verbose = options.verbose ?? true;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Report a status update
|
|
19
|
+
*/
|
|
20
|
+
report(message, detail) {
|
|
21
|
+
if (!this.verbose || _interactiveMode) return;
|
|
22
|
+
const prefix = this.getPhaseIcon(this.currentPhase);
|
|
23
|
+
const fullMessage = detail ? `${message}: ${detail}` : message;
|
|
24
|
+
console.error(`${prefix} ${fullMessage}`);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Start a new phase
|
|
28
|
+
*/
|
|
29
|
+
startPhase(phase, message) {
|
|
30
|
+
this.currentPhase = phase;
|
|
31
|
+
this.phaseStartTime = Date.now();
|
|
32
|
+
this.report(message);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Update within current phase
|
|
36
|
+
*/
|
|
37
|
+
update(message, detail) {
|
|
38
|
+
this.report(message, detail);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Report progress on a file
|
|
42
|
+
*/
|
|
43
|
+
file(action, filePath) {
|
|
44
|
+
const fileName = filePath.split("/").pop() || filePath;
|
|
45
|
+
this.report(action, fileName);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Report an AI analysis step
|
|
49
|
+
*/
|
|
50
|
+
ai(action, context) {
|
|
51
|
+
if (_interactiveMode) return;
|
|
52
|
+
const prefix = "[AI]";
|
|
53
|
+
const message = context ? `${action}: ${context}` : action;
|
|
54
|
+
console.error(`${prefix} ${message}`);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Report a finding
|
|
58
|
+
*/
|
|
59
|
+
finding(severity, message) {
|
|
60
|
+
if (_interactiveMode) return;
|
|
61
|
+
const labels = {
|
|
62
|
+
critical: "[CRITICAL]",
|
|
63
|
+
serious: "[SERIOUS]",
|
|
64
|
+
moderate: "[MODERATE]",
|
|
65
|
+
low: "[LOW]"
|
|
66
|
+
};
|
|
67
|
+
console.error(` ${labels[severity]} ${message}`);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Complete current phase
|
|
71
|
+
*/
|
|
72
|
+
completePhase(summary) {
|
|
73
|
+
const elapsed = Date.now() - this.phaseStartTime;
|
|
74
|
+
this.report(`Done: ${summary}`, `(${elapsed}ms)`);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Complete the entire operation
|
|
78
|
+
*/
|
|
79
|
+
complete(summary) {
|
|
80
|
+
if (_interactiveMode) return;
|
|
81
|
+
const totalElapsed = Date.now() - this.startTime;
|
|
82
|
+
console.error("");
|
|
83
|
+
console.error(`----------------------------------------`);
|
|
84
|
+
console.error(`[COMPLETE] ${summary}`);
|
|
85
|
+
console.error(` Total time: ${(totalElapsed / 1e3).toFixed(2)}s`);
|
|
86
|
+
console.error(`----------------------------------------`);
|
|
87
|
+
console.error("");
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Report an error
|
|
91
|
+
*/
|
|
92
|
+
error(message, detail) {
|
|
93
|
+
if (_interactiveMode) return;
|
|
94
|
+
const fullMessage = detail ? `${message}: ${detail}` : message;
|
|
95
|
+
console.error(`[ERROR] ${fullMessage}`);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Report a warning
|
|
99
|
+
*/
|
|
100
|
+
warn(message, detail) {
|
|
101
|
+
if (_interactiveMode) return;
|
|
102
|
+
const fullMessage = detail ? `${message}: ${detail}` : message;
|
|
103
|
+
console.error(`[WARN] ${fullMessage}`);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get icon for current phase
|
|
107
|
+
*/
|
|
108
|
+
getPhaseIcon(phase) {
|
|
109
|
+
const icons = {
|
|
110
|
+
"init": ">>",
|
|
111
|
+
"discovery": ">>",
|
|
112
|
+
"reading": ">>",
|
|
113
|
+
"analyzing": ">>",
|
|
114
|
+
"ai-review": "[AI]",
|
|
115
|
+
"prioritizing": ">>",
|
|
116
|
+
"complete": "[OK]"
|
|
117
|
+
};
|
|
118
|
+
return icons[phase] || ">>";
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Create a sub-reporter for a specific agent
|
|
122
|
+
*/
|
|
123
|
+
forAgent(agentName) {
|
|
124
|
+
return new AgentProgressReporter(agentName, this.verbose);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
var AgentProgressReporter = class {
|
|
128
|
+
agentName;
|
|
129
|
+
verbose;
|
|
130
|
+
issueCount = 0;
|
|
131
|
+
constructor(agentName, verbose = true) {
|
|
132
|
+
this.agentName = agentName;
|
|
133
|
+
this.verbose = verbose;
|
|
134
|
+
}
|
|
135
|
+
start() {
|
|
136
|
+
if (!this.verbose || _interactiveMode) return;
|
|
137
|
+
console.error(`
|
|
138
|
+
[AGENT] ${this.agentName.toUpperCase()} starting...`);
|
|
139
|
+
}
|
|
140
|
+
analyzing(file) {
|
|
141
|
+
if (!this.verbose || _interactiveMode) return;
|
|
142
|
+
const fileName = file.split("/").pop() || file;
|
|
143
|
+
console.error(` Analyzing ${fileName}...`);
|
|
144
|
+
}
|
|
145
|
+
aiReview(context) {
|
|
146
|
+
if (!this.verbose || _interactiveMode) return;
|
|
147
|
+
console.error(` [AI] reviewing: ${context}`);
|
|
148
|
+
}
|
|
149
|
+
found(severity, issue) {
|
|
150
|
+
this.issueCount++;
|
|
151
|
+
if (!this.verbose || _interactiveMode) return;
|
|
152
|
+
const label = severity === "critical" ? "[CRITICAL]" : severity === "serious" ? "[SERIOUS]" : severity === "moderate" ? "[MODERATE]" : "[LOW]";
|
|
153
|
+
console.error(` ${label} Found: ${issue}`);
|
|
154
|
+
}
|
|
155
|
+
complete(summary) {
|
|
156
|
+
if (!this.verbose || _interactiveMode) return;
|
|
157
|
+
const msg = summary || `Found ${this.issueCount} issues`;
|
|
158
|
+
console.error(` Done: ${this.agentName}: ${msg}`);
|
|
159
|
+
}
|
|
160
|
+
getIssueCount() {
|
|
161
|
+
return this.issueCount;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export {
|
|
166
|
+
setInteractiveMode,
|
|
167
|
+
isInteractiveMode,
|
|
168
|
+
ProgressReporter,
|
|
169
|
+
AgentProgressReporter
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=chunk-RAZUNSBI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/progress.ts"],"sourcesContent":["/**\n * Progress Reporter for Trie Agent\n * \n * Provides real-time feedback to users as the agent works.\n * Uses console.error because MCP clients display stderr to users.\n */\n\n/**\n * Global interactive mode flag\n * When enabled, suppresses all console output (handled by InteractiveDashboard instead)\n */\nlet _interactiveMode = false;\n\n/**\n * Enable or disable interactive mode\n * When enabled, all console output from ProgressReporter and AgentProgressReporter is suppressed\n */\nexport function setInteractiveMode(enabled: boolean): void {\n _interactiveMode = enabled;\n}\n\n/**\n * Check if interactive mode is enabled\n */\nexport function isInteractiveMode(): boolean {\n return _interactiveMode;\n}\n\nexport type ProgressPhase = \n | 'init'\n | 'discovery'\n | 'reading'\n | 'analyzing'\n | 'ai-review'\n | 'prioritizing'\n | 'complete';\n\nexport interface ProgressCallback {\n (phase: ProgressPhase, message: string, detail?: string): void;\n}\n\n/**\n * Progress Reporter - streams status updates to the user\n */\nexport class ProgressReporter {\n private currentPhase: ProgressPhase = 'init';\n private startTime: number = Date.now();\n private phaseStartTime: number = Date.now();\n private verbose: boolean;\n\n constructor(options: { verbose?: boolean } = {}) {\n this.verbose = options.verbose ?? true;\n }\n\n /**\n * Report a status update\n */\n report(message: string, detail?: string): void {\n if (!this.verbose || _interactiveMode) return;\n \n const prefix = this.getPhaseIcon(this.currentPhase);\n const fullMessage = detail ? `${message}: ${detail}` : message;\n console.error(`${prefix} ${fullMessage}`);\n }\n\n /**\n * Start a new phase\n */\n startPhase(phase: ProgressPhase, message: string): void {\n this.currentPhase = phase;\n this.phaseStartTime = Date.now();\n this.report(message);\n }\n\n /**\n * Update within current phase\n */\n update(message: string, detail?: string): void {\n this.report(message, detail);\n }\n\n /**\n * Report progress on a file\n */\n file(action: string, filePath: string): void {\n // Show just the filename for cleaner output\n const fileName = filePath.split('/').pop() || filePath;\n this.report(action, fileName);\n }\n\n /**\n * Report an AI analysis step\n */\n ai(action: string, context?: string): void {\n if (_interactiveMode) return;\n const prefix = '[AI]';\n const message = context ? `${action}: ${context}` : action;\n console.error(`${prefix} ${message}`);\n }\n\n /**\n * Report a finding\n */\n finding(severity: 'critical' | 'serious' | 'moderate' | 'low', message: string): void {\n if (_interactiveMode) return;\n const labels = {\n critical: '[CRITICAL]',\n serious: '[SERIOUS]',\n moderate: '[MODERATE]',\n low: '[LOW]'\n };\n console.error(` ${labels[severity]} ${message}`);\n }\n\n /**\n * Complete current phase\n */\n completePhase(summary: string): void {\n const elapsed = Date.now() - this.phaseStartTime;\n this.report(`Done: ${summary}`, `(${elapsed}ms)`);\n }\n\n /**\n * Complete the entire operation\n */\n complete(summary: string): void {\n if (_interactiveMode) return;\n const totalElapsed = Date.now() - this.startTime;\n console.error('');\n console.error(`----------------------------------------`);\n console.error(`[COMPLETE] ${summary}`);\n console.error(` Total time: ${(totalElapsed / 1000).toFixed(2)}s`);\n console.error(`----------------------------------------`);\n console.error('');\n }\n\n /**\n * Report an error\n */\n error(message: string, detail?: string): void {\n if (_interactiveMode) return;\n const fullMessage = detail ? `${message}: ${detail}` : message;\n console.error(`[ERROR] ${fullMessage}`);\n }\n\n /**\n * Report a warning\n */\n warn(message: string, detail?: string): void {\n if (_interactiveMode) return;\n const fullMessage = detail ? `${message}: ${detail}` : message;\n console.error(`[WARN] ${fullMessage}`);\n }\n\n /**\n * Get icon for current phase\n */\n private getPhaseIcon(phase: ProgressPhase): string {\n const icons: Record<ProgressPhase, string> = {\n 'init': '>>',\n 'discovery': '>>',\n 'reading': '>>',\n 'analyzing': '>>',\n 'ai-review': '[AI]',\n 'prioritizing': '>>',\n 'complete': '[OK]'\n };\n return icons[phase] || '>>';\n }\n\n /**\n * Create a sub-reporter for a specific agent\n */\n forAgent(agentName: string): AgentProgressReporter {\n return new AgentProgressReporter(agentName, this.verbose);\n }\n}\n\n/**\n * Progress reporter scoped to a specific agent\n */\nexport class AgentProgressReporter {\n private agentName: string;\n private verbose: boolean;\n private issueCount: number = 0;\n\n constructor(agentName: string, verbose: boolean = true) {\n this.agentName = agentName;\n this.verbose = verbose;\n }\n\n start(): void {\n if (!this.verbose || _interactiveMode) return;\n console.error(`\\n[AGENT] ${this.agentName.toUpperCase()} starting...`);\n }\n\n analyzing(file: string): void {\n if (!this.verbose || _interactiveMode) return;\n const fileName = file.split('/').pop() || file;\n console.error(` Analyzing ${fileName}...`);\n }\n\n aiReview(context: string): void {\n if (!this.verbose || _interactiveMode) return;\n console.error(` [AI] reviewing: ${context}`);\n }\n\n found(severity: string, issue: string): void {\n this.issueCount++;\n if (!this.verbose || _interactiveMode) return;\n const label = severity === 'critical' ? '[CRITICAL]' : \n severity === 'serious' ? '[SERIOUS]' : \n severity === 'moderate' ? '[MODERATE]' : '[LOW]';\n console.error(` ${label} Found: ${issue}`);\n }\n\n complete(summary?: string): void {\n if (!this.verbose || _interactiveMode) return;\n const msg = summary || `Found ${this.issueCount} issues`;\n console.error(` Done: ${this.agentName}: ${msg}`);\n }\n\n getIssueCount(): number {\n return this.issueCount;\n }\n}\n\n/**\n * Global singleton for easy access\n */\nlet globalReporter: ProgressReporter | null = null;\n\nexport function getProgressReporter(options?: { verbose?: boolean }): ProgressReporter {\n if (!globalReporter) {\n globalReporter = new ProgressReporter(options);\n }\n return globalReporter;\n}\n\nexport function resetProgressReporter(): void {\n globalReporter = null;\n}\n"],"mappings":";AAWA,IAAI,mBAAmB;AAMhB,SAAS,mBAAmB,SAAwB;AACzD,qBAAmB;AACrB;AAKO,SAAS,oBAA6B;AAC3C,SAAO;AACT;AAkBO,IAAM,mBAAN,MAAuB;AAAA,EACpB,eAA8B;AAAA,EAC9B,YAAoB,KAAK,IAAI;AAAA,EAC7B,iBAAyB,KAAK,IAAI;AAAA,EAClC;AAAA,EAER,YAAY,UAAiC,CAAC,GAAG;AAC/C,SAAK,UAAU,QAAQ,WAAW;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,SAAiB,QAAuB;AAC7C,QAAI,CAAC,KAAK,WAAW,iBAAkB;AAEvC,UAAM,SAAS,KAAK,aAAa,KAAK,YAAY;AAClD,UAAM,cAAc,SAAS,GAAG,OAAO,KAAK,MAAM,KAAK;AACvD,YAAQ,MAAM,GAAG,MAAM,IAAI,WAAW,EAAE;AAA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AAAA,EAC7C;AAAA,EAEA,SAAS,SAAuB;AAC9B,QAAI,CAAC,KAAK,WAAW,iBAAkB;AACvC,YAAQ,MAAM,sBAAsB,OAAO,EAAE;AAAA,EAC/C;AAAA,EAEA,MAAM,UAAkB,OAAqB;AAC3C,SAAK;AACL,QAAI,CAAC,KAAK,WAAW,iBAAkB;AACvC,UAAM,QAAQ,aAAa,aAAa,eAC3B,aAAa,YAAY,cACzB,aAAa,aAAa,eAAe;AACtD,YAAQ,MAAM,MAAM,KAAK,WAAW,KAAK,EAAE;AAAA,EAC7C;AAAA,EAEA,SAAS,SAAwB;AAC/B,QAAI,CAAC,KAAK,WAAW,iBAAkB;AACvC,UAAM,MAAM,WAAW,SAAS,KAAK,UAAU;AAC/C,YAAQ,MAAM,YAAY,KAAK,SAAS,KAAK,GAAG,EAAE;AAAA,EACpD;AAAA,EAEA,gBAAwB;AACtB,WAAO,KAAK;AAAA,EACd;AACF;","names":[]}
|
|
@@ -2,17 +2,20 @@ import {
|
|
|
2
2
|
checkFileLevelIssues,
|
|
3
3
|
getVibeCodeTrie,
|
|
4
4
|
scanForVibeCodeIssues
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MVUCBUBR.js";
|
|
6
6
|
import {
|
|
7
7
|
AgentSmithSkill,
|
|
8
8
|
BaseSkill,
|
|
9
9
|
isAIAvailable,
|
|
10
|
-
|
|
10
|
+
output,
|
|
11
11
|
runAIAnalysis
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-32WLOG6E.js";
|
|
13
13
|
import {
|
|
14
14
|
getWorkingDirectory
|
|
15
15
|
} from "./chunk-ASGSTVVF.js";
|
|
16
|
+
import {
|
|
17
|
+
isInteractiveMode
|
|
18
|
+
} from "./chunk-RAZUNSBI.js";
|
|
16
19
|
|
|
17
20
|
// src/utils/project-info.ts
|
|
18
21
|
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
@@ -837,7 +840,9 @@ var TypeCheckSkill = class extends BaseSkill {
|
|
|
837
840
|
issues.push(...await this.analyzeCommonPatterns(content, file));
|
|
838
841
|
}
|
|
839
842
|
} catch (error) {
|
|
840
|
-
|
|
843
|
+
if (!isInteractiveMode()) {
|
|
844
|
+
console.error(`TypeCheck Agent: Error reading file ${file}:`, error);
|
|
845
|
+
}
|
|
841
846
|
}
|
|
842
847
|
}
|
|
843
848
|
return issues;
|
|
@@ -1199,7 +1204,9 @@ var AccessibilitySkill = class extends BaseSkill {
|
|
|
1199
1204
|
issues.push(...this.analyzeLinks(content, file));
|
|
1200
1205
|
}
|
|
1201
1206
|
} catch (error) {
|
|
1202
|
-
|
|
1207
|
+
if (!isInteractiveMode()) {
|
|
1208
|
+
console.error(`Accessibility Agent: Error reading file ${file}:`, error);
|
|
1209
|
+
}
|
|
1203
1210
|
}
|
|
1204
1211
|
}
|
|
1205
1212
|
const criticalCount = issues.filter((i) => i.severity === "critical").length;
|
|
@@ -4890,7 +4897,9 @@ var TestSkill = class extends BaseSkill {
|
|
|
4890
4897
|
issues.push(...this.checkTestCoverage(file, content, context));
|
|
4891
4898
|
issues.push(...this.checkTestablePatterns(content, file));
|
|
4892
4899
|
} catch (error) {
|
|
4893
|
-
|
|
4900
|
+
if (!isInteractiveMode()) {
|
|
4901
|
+
console.error(`Test Agent: Error reading file ${file}:`, error);
|
|
4902
|
+
}
|
|
4894
4903
|
}
|
|
4895
4904
|
}
|
|
4896
4905
|
return issues;
|
|
@@ -5666,7 +5675,9 @@ var UserTestingSkill = class extends BaseSkill {
|
|
|
5666
5675
|
issues.push(...this.simulateImpatientUser(content, file));
|
|
5667
5676
|
issues.push(...this.simulateEdgeCaseUser(content, file));
|
|
5668
5677
|
} catch (error) {
|
|
5669
|
-
|
|
5678
|
+
if (!isInteractiveMode()) {
|
|
5679
|
+
console.error(`User Testing Agent: Error reading file ${file}:`, error);
|
|
5680
|
+
}
|
|
5670
5681
|
}
|
|
5671
5682
|
}
|
|
5672
5683
|
return issues;
|
|
@@ -6128,7 +6139,9 @@ var TrieCleanSkill = class extends BaseSkill {
|
|
|
6128
6139
|
const fileIssues = checkFileLevelIssues(file, content);
|
|
6129
6140
|
issues.push(...this.convertFileLevelIssues(fileIssues));
|
|
6130
6141
|
} catch (error) {
|
|
6131
|
-
|
|
6142
|
+
if (!isInteractiveMode()) {
|
|
6143
|
+
console.error(`Trie Clean Agent: Error reading file ${file}:`, error);
|
|
6144
|
+
}
|
|
6132
6145
|
}
|
|
6133
6146
|
}
|
|
6134
6147
|
return this.deduplicateIssues(issues);
|
|
@@ -7821,17 +7834,16 @@ var MoneybagSkill = class extends BaseSkill {
|
|
|
7821
7834
|
}
|
|
7822
7835
|
/**
|
|
7823
7836
|
* Display the Moneybags entrance banner
|
|
7837
|
+
* Uses OutputManager to route to TUI or console
|
|
7824
7838
|
*/
|
|
7825
7839
|
displayMoneybagsBanner() {
|
|
7826
|
-
if (this.bannerShown
|
|
7840
|
+
if (this.bannerShown) return;
|
|
7827
7841
|
this.bannerShown = true;
|
|
7828
|
-
const quote = MONEYBAGS_QUOTES[Math.floor(Math.random() * MONEYBAGS_QUOTES.length)];
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
console.error(" " + quote);
|
|
7834
|
-
console.error("=".repeat(60) + "\n");
|
|
7842
|
+
const quote = MONEYBAGS_QUOTES[Math.floor(Math.random() * MONEYBAGS_QUOTES.length)] ?? "Every bug has a price tag.";
|
|
7843
|
+
output().banner("moneybags", MONEYBAGS_ASCII, {
|
|
7844
|
+
quote,
|
|
7845
|
+
version: this.version
|
|
7846
|
+
});
|
|
7835
7847
|
}
|
|
7836
7848
|
// Run after other agents so we can analyze their findings
|
|
7837
7849
|
get priority() {
|
|
@@ -8137,6 +8149,27 @@ var MoneybagSkill = class extends BaseSkill {
|
|
|
8137
8149
|
} catch {
|
|
8138
8150
|
}
|
|
8139
8151
|
}
|
|
8152
|
+
if (issues.length > 0) {
|
|
8153
|
+
let totalFixNow = 0;
|
|
8154
|
+
let totalProduction = 0;
|
|
8155
|
+
const perIssue = [];
|
|
8156
|
+
for (const issue of issues) {
|
|
8157
|
+
const costMatch = issue.issue.match(/Fix now: \$([0-9,.kM]+)/);
|
|
8158
|
+
const prodMatch = issue.issue.match(/If production: \$([0-9,.kM]+)/);
|
|
8159
|
+
const parseCost = (s) => {
|
|
8160
|
+
if (!s) return 0;
|
|
8161
|
+
if (s.endsWith("M")) return parseFloat(s) * 1e6;
|
|
8162
|
+
if (s.endsWith("k")) return parseFloat(s) * 1e3;
|
|
8163
|
+
return parseFloat(s.replace(/,/g, ""));
|
|
8164
|
+
};
|
|
8165
|
+
const fixCost = parseCost(costMatch?.[1]);
|
|
8166
|
+
const prodCost = parseCost(prodMatch?.[1]);
|
|
8167
|
+
totalFixNow += fixCost;
|
|
8168
|
+
totalProduction += prodCost;
|
|
8169
|
+
perIssue.push({ issue: issue.issue.split(" | ")[0] || "Unknown", cost: prodCost });
|
|
8170
|
+
}
|
|
8171
|
+
output().cost(totalFixNow, totalProduction, totalProduction - totalFixNow, perIssue.slice(0, 10));
|
|
8172
|
+
}
|
|
8140
8173
|
return issues;
|
|
8141
8174
|
}
|
|
8142
8175
|
/**
|
|
@@ -8455,15 +8488,13 @@ var ProductionReadySkill = class extends BaseSkill {
|
|
|
8455
8488
|
return Math.min(confidence, 1);
|
|
8456
8489
|
}
|
|
8457
8490
|
displayBanner() {
|
|
8458
|
-
if (this.bannerShown
|
|
8491
|
+
if (this.bannerShown) return;
|
|
8459
8492
|
this.bannerShown = true;
|
|
8460
|
-
const quote = PRODUCTION_QUOTES[Math.floor(Math.random() * PRODUCTION_QUOTES.length)];
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
console.error(" " + quote);
|
|
8466
|
-
console.error("=".repeat(60) + "\n");
|
|
8493
|
+
const quote = PRODUCTION_QUOTES[Math.floor(Math.random() * PRODUCTION_QUOTES.length)] ?? "Ship it? Not until I say so.";
|
|
8494
|
+
output().banner("production-ready", PRODUCTION_READY_ASCII, {
|
|
8495
|
+
quote,
|
|
8496
|
+
version: this.version
|
|
8497
|
+
});
|
|
8467
8498
|
}
|
|
8468
8499
|
checkFileRelevance(file, content) {
|
|
8469
8500
|
if (/node_modules|\.d\.ts$|\.min\.|dist\/|build\/|\.lock$/.test(file)) {
|
|
@@ -8610,7 +8641,6 @@ var ProductionReadySkill = class extends BaseSkill {
|
|
|
8610
8641
|
return fixes[key] || "See production readiness documentation";
|
|
8611
8642
|
}
|
|
8612
8643
|
logReadinessSummary(issues) {
|
|
8613
|
-
if (isInteractiveMode()) return;
|
|
8614
8644
|
const totalRequirements = Object.keys(PRODUCTION_PATTERNS).length;
|
|
8615
8645
|
const metRequirements = this.foundRequirements.size;
|
|
8616
8646
|
const criticalIssues = issues.filter((i) => i.severity === "critical").length;
|
|
@@ -8618,17 +8648,8 @@ var ProductionReadySkill = class extends BaseSkill {
|
|
|
8618
8648
|
const readinessScore = Math.max(0, Math.round(
|
|
8619
8649
|
metRequirements / totalRequirements * 50 + (50 - criticalIssues * 20 - seriousIssues * 10)
|
|
8620
8650
|
));
|
|
8621
|
-
const status = criticalIssues > 0 || seriousIssues > 2 ? "
|
|
8622
|
-
|
|
8623
|
-
console.error("PRODUCTION READINESS REPORT");
|
|
8624
|
-
console.error("-".repeat(50));
|
|
8625
|
-
console.error(` Score: ${readinessScore}/100`);
|
|
8626
|
-
console.error(` Requirements: ${metRequirements}/${totalRequirements} met`);
|
|
8627
|
-
console.error(` Critical issues: ${criticalIssues}`);
|
|
8628
|
-
console.error(` Serious issues: ${seriousIssues}`);
|
|
8629
|
-
console.error("");
|
|
8630
|
-
console.error(` ${status}`);
|
|
8631
|
-
console.error("-".repeat(50) + "\n");
|
|
8651
|
+
const status = criticalIssues > 0 || seriousIssues > 2 ? "not-ready" : seriousIssues > 0 ? "caution" : "ready";
|
|
8652
|
+
output().readiness(readinessScore, metRequirements, totalRequirements, status);
|
|
8632
8653
|
}
|
|
8633
8654
|
getAIEnhancementSystemPrompt() {
|
|
8634
8655
|
return `You are a production readiness engineer reviewing code for deployment.
|
|
@@ -10480,7 +10501,9 @@ var CustomSkill = class extends BaseSkill {
|
|
|
10480
10501
|
const fileIssues = await this.analyzeFileContent(content, file);
|
|
10481
10502
|
issues.push(...fileIssues);
|
|
10482
10503
|
} catch (error) {
|
|
10483
|
-
|
|
10504
|
+
if (!isInteractiveMode()) {
|
|
10505
|
+
console.error(`${this.name}: Error reading file ${file}:`, error);
|
|
10506
|
+
}
|
|
10484
10507
|
}
|
|
10485
10508
|
}
|
|
10486
10509
|
return issues;
|
|
@@ -10526,7 +10549,9 @@ var CustomSkill = class extends BaseSkill {
|
|
|
10526
10549
|
}
|
|
10527
10550
|
}
|
|
10528
10551
|
} catch (e) {
|
|
10529
|
-
|
|
10552
|
+
if (!isInteractiveMode()) {
|
|
10553
|
+
console.error(`Invalid regex pattern in rule ${rule.id}: ${pattern}`);
|
|
10554
|
+
}
|
|
10530
10555
|
}
|
|
10531
10556
|
}
|
|
10532
10557
|
}
|
|
@@ -10639,7 +10664,7 @@ var SkillRegistryImpl = class {
|
|
|
10639
10664
|
new SkillReviewSkill()
|
|
10640
10665
|
];
|
|
10641
10666
|
const isWorker = typeof process !== "undefined" && (process.env.TRIE_WORKER === "true" || process.env.NODE_ENV === "test");
|
|
10642
|
-
if (!isWorker && !process.env.TRIE_QUIET) {
|
|
10667
|
+
if (!isWorker && !process.env.TRIE_QUIET && !isInteractiveMode()) {
|
|
10643
10668
|
console.error(`Loaded config for ${builtinSkills.length} built-in skills`);
|
|
10644
10669
|
}
|
|
10645
10670
|
for (const skill of builtinSkills) {
|
|
@@ -10665,10 +10690,12 @@ var SkillRegistryImpl = class {
|
|
|
10665
10690
|
this.skills.set(skill.name, skill);
|
|
10666
10691
|
loadedCount++;
|
|
10667
10692
|
} catch (error) {
|
|
10668
|
-
|
|
10693
|
+
if (!isInteractiveMode()) {
|
|
10694
|
+
console.error(`Failed to load custom skill from ${file}:`, error);
|
|
10695
|
+
}
|
|
10669
10696
|
}
|
|
10670
10697
|
}
|
|
10671
|
-
if (loadedCount > 0) {
|
|
10698
|
+
if (loadedCount > 0 && !isInteractiveMode()) {
|
|
10672
10699
|
console.error(`Loaded ${loadedCount} custom skill(s) from .trie/agents/`);
|
|
10673
10700
|
}
|
|
10674
10701
|
this.customSkillsLoaded = true;
|
|
@@ -10688,7 +10715,7 @@ var SkillRegistryImpl = class {
|
|
|
10688
10715
|
const skillReviewAgent = this.skills.get("skill-review");
|
|
10689
10716
|
if (skillReviewAgent && skillReviewAgent instanceof SkillReviewSkill) {
|
|
10690
10717
|
await skillReviewAgent.loadSkills();
|
|
10691
|
-
if (skillReviewAgent.hasSkills()) {
|
|
10718
|
+
if (skillReviewAgent.hasSkills() && !isInteractiveMode()) {
|
|
10692
10719
|
console.error(`Loaded ${skillReviewAgent.getAppliedSkillNames().length} skill(s) for skill-review agent`);
|
|
10693
10720
|
}
|
|
10694
10721
|
}
|
|
@@ -10756,7 +10783,9 @@ var SkillRegistryImpl = class {
|
|
|
10756
10783
|
}
|
|
10757
10784
|
registerSkill(skill) {
|
|
10758
10785
|
this.skills.set(skill.name, skill);
|
|
10759
|
-
|
|
10786
|
+
if (!isInteractiveMode()) {
|
|
10787
|
+
console.error(`Registered custom skill: ${skill.name}`);
|
|
10788
|
+
}
|
|
10760
10789
|
}
|
|
10761
10790
|
// Backward compatibility alias
|
|
10762
10791
|
registerAgent(skill) {
|
|
@@ -10853,4 +10882,4 @@ export {
|
|
|
10853
10882
|
CustomSkill,
|
|
10854
10883
|
getSkillRegistry
|
|
10855
10884
|
};
|
|
10856
|
-
//# sourceMappingURL=chunk-
|
|
10885
|
+
//# sourceMappingURL=chunk-S4VGGLXF.js.map
|