@triedotdev/mcp 1.0.128 → 1.0.129
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.
|
@@ -5092,6 +5092,30 @@ var CHAT_TOOLS = [
|
|
|
5092
5092
|
required: ["file", "goal", "violation"]
|
|
5093
5093
|
}
|
|
5094
5094
|
},
|
|
5095
|
+
{
|
|
5096
|
+
name: "trie_propose_fixes_batch",
|
|
5097
|
+
description: "Propose fixes for multiple goal violations at once. More efficient than calling trie_propose_fix multiple times. Use when the user wants to fix multiple violations.",
|
|
5098
|
+
input_schema: {
|
|
5099
|
+
type: "object",
|
|
5100
|
+
properties: {
|
|
5101
|
+
fixes: {
|
|
5102
|
+
type: "array",
|
|
5103
|
+
description: "Array of fix proposals",
|
|
5104
|
+
items: {
|
|
5105
|
+
type: "object",
|
|
5106
|
+
properties: {
|
|
5107
|
+
file: { type: "string", description: "File path with the goal violation" },
|
|
5108
|
+
goal: { type: "string", description: "The goal that was violated" },
|
|
5109
|
+
violation: { type: "string", description: "Description of the violation" },
|
|
5110
|
+
suggestedFix: { type: "string", description: "Suggested fix for the violation (optional)" }
|
|
5111
|
+
},
|
|
5112
|
+
required: ["file", "goal", "violation"]
|
|
5113
|
+
}
|
|
5114
|
+
}
|
|
5115
|
+
},
|
|
5116
|
+
required: ["fixes"]
|
|
5117
|
+
}
|
|
5118
|
+
},
|
|
5095
5119
|
{
|
|
5096
5120
|
name: "trie_search_files",
|
|
5097
5121
|
description: "Search source code files for text patterns using ripgrep. Note: Requires ripgrep to be installed. For emoji detection, use trie_scan_for_goal_violations instead.",
|
|
@@ -5304,6 +5328,38 @@ Type "yes" to proceed, or "no" to cancel.
|
|
|
5304
5328
|
|
|
5305
5329
|
[PENDING_FIX:${JSON.stringify(fixProposal)}]`;
|
|
5306
5330
|
}
|
|
5331
|
+
case "trie_propose_fixes_batch": {
|
|
5332
|
+
const fixes = input.fixes;
|
|
5333
|
+
if (!Array.isArray(fixes) || fixes.length === 0) {
|
|
5334
|
+
return "At least one fix is required.";
|
|
5335
|
+
}
|
|
5336
|
+
for (const fix of fixes) {
|
|
5337
|
+
if (!fix.file?.trim()) return "All fixes must have a file path.";
|
|
5338
|
+
if (!fix.goal?.trim()) return "All fixes must have a goal.";
|
|
5339
|
+
if (!fix.violation?.trim()) return "All fixes must have a violation description.";
|
|
5340
|
+
}
|
|
5341
|
+
const fixProposals = fixes.map((f) => ({
|
|
5342
|
+
file: f.file.trim(),
|
|
5343
|
+
goal: f.goal.trim(),
|
|
5344
|
+
violation: f.violation.trim(),
|
|
5345
|
+
suggestedFix: f.suggestedFix?.trim(),
|
|
5346
|
+
directory
|
|
5347
|
+
}));
|
|
5348
|
+
let message = `Found ${fixes.length} violation(s) to fix:
|
|
5349
|
+
|
|
5350
|
+
`;
|
|
5351
|
+
for (const fix of fixProposals) {
|
|
5352
|
+
message += `\u2022 ${fix.file}
|
|
5353
|
+
`;
|
|
5354
|
+
}
|
|
5355
|
+
message += `
|
|
5356
|
+
Type "yes to all" to fix all files, or "no" to cancel.`;
|
|
5357
|
+
for (const fixProposal of fixProposals) {
|
|
5358
|
+
message += `
|
|
5359
|
+
[PENDING_FIX:${JSON.stringify(fixProposal)}]`;
|
|
5360
|
+
}
|
|
5361
|
+
return message;
|
|
5362
|
+
}
|
|
5307
5363
|
case "trie_search_files": {
|
|
5308
5364
|
const pattern = String(input.pattern || "").trim();
|
|
5309
5365
|
const filePattern = input.filePattern ? String(input.filePattern).trim() : void 0;
|
|
@@ -5536,17 +5592,17 @@ var SYSTEM_PROMPT = `You are Trie, a code guardian assistant embedded in a termi
|
|
|
5536
5592
|
|
|
5537
5593
|
**When user asks to fix violations:**
|
|
5538
5594
|
1. Look in "Recent goal violations (nudges)" section of project context
|
|
5539
|
-
2. Extract: file path, goal description, and violation details
|
|
5540
|
-
3.
|
|
5541
|
-
4.
|
|
5542
|
-
5.
|
|
5543
|
-
6.
|
|
5595
|
+
2. Extract: file path, goal description, and violation details for ALL files
|
|
5596
|
+
3. If multiple violations: Call trie_propose_fixes_batch ONCE with all fixes
|
|
5597
|
+
4. If single violation: Call trie_propose_fix once
|
|
5598
|
+
5. AFTER the tool call completes, the system will ask for user confirmation - do NOT add your own confirmation message
|
|
5599
|
+
6. When the user says "yes", "yes to all", or "no", the system handles spawning Claude Code automatically
|
|
5544
5600
|
|
|
5545
5601
|
Examples:
|
|
5546
5602
|
- User: "do we have emojis?" \u2192 Check nudges first. If none or unclear: Call trie_scan_for_goal_violations to scan the codebase.
|
|
5547
5603
|
- User: "run a full scan for emojis" \u2192 Call trie_scan_for_goal_violations directly.
|
|
5548
|
-
- User: "fix the emoji
|
|
5549
|
-
- User responds "yes" after
|
|
5604
|
+
- User: "fix the emoji violations" \u2192 Find ALL emoji violations in nudges, call trie_propose_fixes_batch ONCE with all fixes, then STOP
|
|
5605
|
+
- User responds "yes to all" after proposal \u2192 Just say "Spawning Claude Code to fix all files..." The system handles it.
|
|
5550
5606
|
- User: "search for TODO comments" \u2192 If there's a goal about TODOs, use trie_scan_for_goal_violations. Otherwise explain no such goal exists.
|
|
5551
5607
|
|
|
5552
5608
|
Answer concisely. Reference specific files, decisions, and patterns when relevant.`;
|
|
@@ -5697,7 +5753,7 @@ ${contextBlock}`;
|
|
|
5697
5753
|
tools: CHAT_TOOLS,
|
|
5698
5754
|
executeTool,
|
|
5699
5755
|
maxTokens: 4096,
|
|
5700
|
-
maxToolRounds:
|
|
5756
|
+
maxToolRounds: 8
|
|
5701
5757
|
});
|
|
5702
5758
|
if (result.success) {
|
|
5703
5759
|
const action = {
|
|
@@ -6487,4 +6543,4 @@ export {
|
|
|
6487
6543
|
handleCheckpointTool,
|
|
6488
6544
|
InteractiveDashboard
|
|
6489
6545
|
};
|
|
6490
|
-
//# sourceMappingURL=chunk-
|
|
6546
|
+
//# sourceMappingURL=chunk-VHQBL2I7.js.map
|