@triedotdev/mcp 1.0.128 → 1.0.130
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/{chunk-6LD7OPJL.js → chunk-7TTVDHXO.js} +4 -4
- package/dist/{chunk-D2CGMX7K.js → chunk-CDU4B7AC.js} +2 -2
- package/dist/{chunk-4GPN2QZ4.js → chunk-SUPXBOJD.js} +89 -20
- package/dist/chunk-SUPXBOJD.js.map +1 -0
- package/dist/{chunk-A4EDTN6R.js → chunk-WIMNGEY2.js} +4 -338
- package/dist/chunk-WIMNGEY2.js.map +1 -0
- package/dist/chunk-Z4DN527J.js +474 -0
- package/dist/chunk-Z4DN527J.js.map +1 -0
- package/dist/cli/main.js +7 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +7 -6
- package/dist/cli/yolo-daemon.js.map +1 -1
- package/dist/{guardian-agent-5QVLDPKB.js → guardian-agent-Q34YVH4J.js} +5 -4
- package/dist/index.js +84 -19
- package/dist/index.js.map +1 -1
- package/dist/tiered-storage-QW2G7GSG.js +12 -0
- package/dist/tiered-storage-QW2G7GSG.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-4GPN2QZ4.js.map +0 -1
- package/dist/chunk-A4EDTN6R.js.map +0 -1
- /package/dist/{chunk-6LD7OPJL.js.map → chunk-7TTVDHXO.js.map} +0 -0
- /package/dist/{chunk-D2CGMX7K.js.map → chunk-CDU4B7AC.js.map} +0 -0
- /package/dist/{guardian-agent-5QVLDPKB.js.map → guardian-agent-Q34YVH4J.js.map} +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IncidentIndex
|
|
3
|
+
} from "./chunk-WHIQAGB7.js";
|
|
1
4
|
import {
|
|
2
5
|
TriePatternDiscovery
|
|
3
6
|
} from "./chunk-ZV2K6M7T.js";
|
|
@@ -13,9 +16,6 @@ import {
|
|
|
13
16
|
import {
|
|
14
17
|
ContextGraph
|
|
15
18
|
} from "./chunk-55CBWOEZ.js";
|
|
16
|
-
import {
|
|
17
|
-
IncidentIndex
|
|
18
|
-
} from "./chunk-WHIQAGB7.js";
|
|
19
19
|
import {
|
|
20
20
|
getTrieDirectory,
|
|
21
21
|
getWorkingDirectory
|
|
@@ -1756,4 +1756,4 @@ export {
|
|
|
1756
1756
|
handleCheckpointCommand,
|
|
1757
1757
|
isTrieInitialized
|
|
1758
1758
|
};
|
|
1759
|
-
//# sourceMappingURL=chunk-
|
|
1759
|
+
//# sourceMappingURL=chunk-7TTVDHXO.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
GotchaPredictor,
|
|
12
12
|
findCrossProjectPatterns,
|
|
13
13
|
recordToGlobalMemory
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WIMNGEY2.js";
|
|
15
15
|
import {
|
|
16
16
|
isAIAvailable,
|
|
17
17
|
runAIAnalysis
|
|
@@ -2143,4 +2143,4 @@ export {
|
|
|
2143
2143
|
GuardianAgent,
|
|
2144
2144
|
getGuardian
|
|
2145
2145
|
};
|
|
2146
|
-
//# sourceMappingURL=chunk-
|
|
2146
|
+
//# sourceMappingURL=chunk-CDU4B7AC.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGuardian
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CDU4B7AC.js";
|
|
4
4
|
import {
|
|
5
5
|
getChatStore
|
|
6
6
|
} from "./chunk-DFPVUMVE.js";
|
|
@@ -13,12 +13,13 @@ import {
|
|
|
13
13
|
perceiveCurrentChanges,
|
|
14
14
|
reasonAboutChangesHumanReadable,
|
|
15
15
|
saveCheckpoint
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7TTVDHXO.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
IncidentIndex
|
|
19
|
+
} from "./chunk-WHIQAGB7.js";
|
|
20
|
+
import {
|
|
21
|
+
findCrossProjectPatterns
|
|
22
|
+
} from "./chunk-WIMNGEY2.js";
|
|
22
23
|
import {
|
|
23
24
|
getKeyFromKeychain,
|
|
24
25
|
isAIAvailable,
|
|
@@ -28,12 +29,13 @@ import {
|
|
|
28
29
|
import {
|
|
29
30
|
getGuardianState
|
|
30
31
|
} from "./chunk-UHMMANC2.js";
|
|
32
|
+
import {
|
|
33
|
+
TieredStorage,
|
|
34
|
+
getStorage
|
|
35
|
+
} from "./chunk-Z4DN527J.js";
|
|
31
36
|
import {
|
|
32
37
|
ContextGraph
|
|
33
38
|
} from "./chunk-55CBWOEZ.js";
|
|
34
|
-
import {
|
|
35
|
-
IncidentIndex
|
|
36
|
-
} from "./chunk-WHIQAGB7.js";
|
|
37
39
|
import {
|
|
38
40
|
getOutputManager
|
|
39
41
|
} from "./chunk-VRLMTOB6.js";
|
|
@@ -1758,6 +1760,10 @@ function AgentView() {
|
|
|
1758
1760
|
const { getInsightStore } = await import("./insight-store-F5KDBY5Y.js");
|
|
1759
1761
|
const store = getInsightStore(workDir);
|
|
1760
1762
|
await store.dismissInsight(insight.id);
|
|
1763
|
+
const { getStorage: getStorage2 } = await import("./tiered-storage-QW2G7GSG.js");
|
|
1764
|
+
const storage = getStorage2(workDir);
|
|
1765
|
+
await storage.dismissNudge(insight.id).catch(() => {
|
|
1766
|
+
});
|
|
1761
1767
|
} catch (error) {
|
|
1762
1768
|
console.error("Failed to persist insight dismissal:", error);
|
|
1763
1769
|
}
|
|
@@ -5092,6 +5098,30 @@ var CHAT_TOOLS = [
|
|
|
5092
5098
|
required: ["file", "goal", "violation"]
|
|
5093
5099
|
}
|
|
5094
5100
|
},
|
|
5101
|
+
{
|
|
5102
|
+
name: "trie_propose_fixes_batch",
|
|
5103
|
+
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.",
|
|
5104
|
+
input_schema: {
|
|
5105
|
+
type: "object",
|
|
5106
|
+
properties: {
|
|
5107
|
+
fixes: {
|
|
5108
|
+
type: "array",
|
|
5109
|
+
description: "Array of fix proposals",
|
|
5110
|
+
items: {
|
|
5111
|
+
type: "object",
|
|
5112
|
+
properties: {
|
|
5113
|
+
file: { type: "string", description: "File path with the goal violation" },
|
|
5114
|
+
goal: { type: "string", description: "The goal that was violated" },
|
|
5115
|
+
violation: { type: "string", description: "Description of the violation" },
|
|
5116
|
+
suggestedFix: { type: "string", description: "Suggested fix for the violation (optional)" }
|
|
5117
|
+
},
|
|
5118
|
+
required: ["file", "goal", "violation"]
|
|
5119
|
+
}
|
|
5120
|
+
}
|
|
5121
|
+
},
|
|
5122
|
+
required: ["fixes"]
|
|
5123
|
+
}
|
|
5124
|
+
},
|
|
5095
5125
|
{
|
|
5096
5126
|
name: "trie_search_files",
|
|
5097
5127
|
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 +5334,38 @@ Type "yes" to proceed, or "no" to cancel.
|
|
|
5304
5334
|
|
|
5305
5335
|
[PENDING_FIX:${JSON.stringify(fixProposal)}]`;
|
|
5306
5336
|
}
|
|
5337
|
+
case "trie_propose_fixes_batch": {
|
|
5338
|
+
const fixes = input.fixes;
|
|
5339
|
+
if (!Array.isArray(fixes) || fixes.length === 0) {
|
|
5340
|
+
return "At least one fix is required.";
|
|
5341
|
+
}
|
|
5342
|
+
for (const fix of fixes) {
|
|
5343
|
+
if (!fix.file?.trim()) return "All fixes must have a file path.";
|
|
5344
|
+
if (!fix.goal?.trim()) return "All fixes must have a goal.";
|
|
5345
|
+
if (!fix.violation?.trim()) return "All fixes must have a violation description.";
|
|
5346
|
+
}
|
|
5347
|
+
const fixProposals = fixes.map((f) => ({
|
|
5348
|
+
file: f.file.trim(),
|
|
5349
|
+
goal: f.goal.trim(),
|
|
5350
|
+
violation: f.violation.trim(),
|
|
5351
|
+
suggestedFix: f.suggestedFix?.trim(),
|
|
5352
|
+
directory
|
|
5353
|
+
}));
|
|
5354
|
+
let message = `Found ${fixes.length} violation(s) to fix:
|
|
5355
|
+
|
|
5356
|
+
`;
|
|
5357
|
+
for (const fix of fixProposals) {
|
|
5358
|
+
message += `\u2022 ${fix.file}
|
|
5359
|
+
`;
|
|
5360
|
+
}
|
|
5361
|
+
message += `
|
|
5362
|
+
Type "yes to all" to fix all files, or "no" to cancel.`;
|
|
5363
|
+
for (const fixProposal of fixProposals) {
|
|
5364
|
+
message += `
|
|
5365
|
+
[PENDING_FIX:${JSON.stringify(fixProposal)}]`;
|
|
5366
|
+
}
|
|
5367
|
+
return message;
|
|
5368
|
+
}
|
|
5307
5369
|
case "trie_search_files": {
|
|
5308
5370
|
const pattern = String(input.pattern || "").trim();
|
|
5309
5371
|
const filePattern = input.filePattern ? String(input.filePattern).trim() : void 0;
|
|
@@ -5536,17 +5598,17 @@ var SYSTEM_PROMPT = `You are Trie, a code guardian assistant embedded in a termi
|
|
|
5536
5598
|
|
|
5537
5599
|
**When user asks to fix violations:**
|
|
5538
5600
|
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.
|
|
5601
|
+
2. Extract: file path, goal description, and violation details for ALL files
|
|
5602
|
+
3. If multiple violations: Call trie_propose_fixes_batch ONCE with all fixes
|
|
5603
|
+
4. If single violation: Call trie_propose_fix once
|
|
5604
|
+
5. AFTER the tool call completes, the system will ask for user confirmation - do NOT add your own confirmation message
|
|
5605
|
+
6. When the user says "yes", "yes to all", or "no", the system handles spawning Claude Code automatically
|
|
5544
5606
|
|
|
5545
5607
|
Examples:
|
|
5546
5608
|
- User: "do we have emojis?" \u2192 Check nudges first. If none or unclear: Call trie_scan_for_goal_violations to scan the codebase.
|
|
5547
5609
|
- 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
|
|
5610
|
+
- User: "fix the emoji violations" \u2192 Find ALL emoji violations in nudges, call trie_propose_fixes_batch ONCE with all fixes, then STOP
|
|
5611
|
+
- User responds "yes to all" after proposal \u2192 Just say "Spawning Claude Code to fix all files..." The system handles it.
|
|
5550
5612
|
- 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
5613
|
|
|
5552
5614
|
Answer concisely. Reference specific files, decisions, and patterns when relevant.`;
|
|
@@ -5697,7 +5759,7 @@ ${contextBlock}`;
|
|
|
5697
5759
|
tools: CHAT_TOOLS,
|
|
5698
5760
|
executeTool,
|
|
5699
5761
|
maxTokens: 4096,
|
|
5700
|
-
maxToolRounds:
|
|
5762
|
+
maxToolRounds: 8
|
|
5701
5763
|
});
|
|
5702
5764
|
if (result.success) {
|
|
5703
5765
|
const action = {
|
|
@@ -5868,8 +5930,15 @@ function formatToolInput(input) {
|
|
|
5868
5930
|
const parts = [];
|
|
5869
5931
|
for (const [k, v] of Object.entries(input)) {
|
|
5870
5932
|
if (k === "directory") continue;
|
|
5871
|
-
if (Array.isArray(v))
|
|
5872
|
-
|
|
5933
|
+
if (Array.isArray(v)) {
|
|
5934
|
+
if (v.length > 0 && typeof v[0] === "object") {
|
|
5935
|
+
parts.push(`${k}: [${v.length} item${v.length !== 1 ? "s" : ""}]`);
|
|
5936
|
+
} else {
|
|
5937
|
+
parts.push(`${k}: [${v.join(", ")}]`);
|
|
5938
|
+
}
|
|
5939
|
+
} else {
|
|
5940
|
+
parts.push(`${k}: ${String(v)}`);
|
|
5941
|
+
}
|
|
5873
5942
|
}
|
|
5874
5943
|
return parts.length > 0 ? parts.join(", ") : "";
|
|
5875
5944
|
}
|
|
@@ -6487,4 +6556,4 @@ export {
|
|
|
6487
6556
|
handleCheckpointTool,
|
|
6488
6557
|
InteractiveDashboard
|
|
6489
6558
|
};
|
|
6490
|
-
//# sourceMappingURL=chunk-
|
|
6559
|
+
//# sourceMappingURL=chunk-SUPXBOJD.js.map
|