@triedotdev/mcp 1.0.165 → 1.0.166

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.
Files changed (41) hide show
  1. package/dist/{chunk-RQ6QZBIN.js → chunk-2Z3TQNNK.js} +2 -2
  2. package/dist/{chunk-CDG2GVBP.js → chunk-HOGKPDZA.js} +48 -26
  3. package/dist/chunk-HOGKPDZA.js.map +1 -0
  4. package/dist/{chunk-WRYQHVPD.js → chunk-JEZ7XJQN.js} +2 -2
  5. package/dist/{chunk-M7HMBZ3R.js → chunk-JNUOW2JS.js} +6 -6
  6. package/dist/{chunk-5LRDF2WB.js → chunk-LG5CBK6A.js} +3 -3
  7. package/dist/{chunk-YAL3SUBG.js → chunk-MVVPJ73K.js} +5 -2
  8. package/dist/chunk-MVVPJ73K.js.map +1 -0
  9. package/dist/{chunk-SS2O3MTC.js → chunk-S36IO3EE.js} +3 -3
  10. package/dist/{chunk-IPNPHPNN.js → chunk-TQOO6A4G.js} +2 -2
  11. package/dist/{chunk-IS5UBN2R.js → chunk-UXRW2YSP.js} +6 -6
  12. package/dist/{chunk-HC5P6FZD.js → chunk-ZKKKLRZZ.js} +4 -4
  13. package/dist/cli/main.js +6 -6
  14. package/dist/cli/yolo-daemon.js +9 -9
  15. package/dist/{fast-analyzer-54AHLVO5.js → fast-analyzer-NJQO3TFD.js} +3 -3
  16. package/dist/{goal-manager-563BNILQ.js → goal-manager-DVX24UPZ.js} +4 -4
  17. package/dist/{goal-validator-FJEDIYU7.js → goal-validator-6Y5CDEMJ.js} +4 -4
  18. package/dist/{hypothesis-4KC7XRBZ.js → hypothesis-UKPGOYY2.js} +4 -4
  19. package/dist/index.js +10 -10
  20. package/dist/{issue-store-FOS4T736.js → issue-store-UZAPI5DU.js} +3 -3
  21. package/dist/{ledger-EDLPF6SB.js → ledger-CNFCJKHX.js} +2 -2
  22. package/dist/server/mcp-server.js +10 -10
  23. package/dist/{trie-agent-TM6ATSNR.js → trie-agent-6SWUHCVO.js} +7 -7
  24. package/package.json +1 -1
  25. package/dist/chunk-CDG2GVBP.js.map +0 -1
  26. package/dist/chunk-YAL3SUBG.js.map +0 -1
  27. /package/dist/{chunk-RQ6QZBIN.js.map → chunk-2Z3TQNNK.js.map} +0 -0
  28. /package/dist/{chunk-WRYQHVPD.js.map → chunk-JEZ7XJQN.js.map} +0 -0
  29. /package/dist/{chunk-M7HMBZ3R.js.map → chunk-JNUOW2JS.js.map} +0 -0
  30. /package/dist/{chunk-5LRDF2WB.js.map → chunk-LG5CBK6A.js.map} +0 -0
  31. /package/dist/{chunk-SS2O3MTC.js.map → chunk-S36IO3EE.js.map} +0 -0
  32. /package/dist/{chunk-IPNPHPNN.js.map → chunk-TQOO6A4G.js.map} +0 -0
  33. /package/dist/{chunk-IS5UBN2R.js.map → chunk-UXRW2YSP.js.map} +0 -0
  34. /package/dist/{chunk-HC5P6FZD.js.map → chunk-ZKKKLRZZ.js.map} +0 -0
  35. /package/dist/{fast-analyzer-54AHLVO5.js.map → fast-analyzer-NJQO3TFD.js.map} +0 -0
  36. /package/dist/{goal-manager-563BNILQ.js.map → goal-manager-DVX24UPZ.js.map} +0 -0
  37. /package/dist/{goal-validator-FJEDIYU7.js.map → goal-validator-6Y5CDEMJ.js.map} +0 -0
  38. /package/dist/{hypothesis-4KC7XRBZ.js.map → hypothesis-UKPGOYY2.js.map} +0 -0
  39. /package/dist/{issue-store-FOS4T736.js.map → issue-store-UZAPI5DU.js.map} +0 -0
  40. /package/dist/{ledger-EDLPF6SB.js.map → ledger-CNFCJKHX.js.map} +0 -0
  41. /package/dist/{trie-agent-TM6ATSNR.js.map → trie-agent-6SWUHCVO.js.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getMemoryStats,
6
6
  searchIssues
7
- } from "./chunk-SS2O3MTC.js";
7
+ } from "./chunk-S36IO3EE.js";
8
8
  import {
9
9
  getProjectState
10
10
  } from "./chunk-GTKYBOXL.js";
@@ -659,4 +659,4 @@ export {
659
659
  getGoalManager,
660
660
  clearGoalManagers
661
661
  };
662
- //# sourceMappingURL=chunk-RQ6QZBIN.js.map
662
+ //# sourceMappingURL=chunk-2Z3TQNNK.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-JVMBCWKS.js";
4
4
  import {
5
5
  getTrieAgent
6
- } from "./chunk-M7HMBZ3R.js";
6
+ } from "./chunk-JNUOW2JS.js";
7
7
  import {
8
8
  parseGoalViolation
9
9
  } from "./chunk-WCN7S3EI.js";
@@ -25,10 +25,10 @@ import {
25
25
  perceiveCurrentChanges,
26
26
  reasonAboutChangesHumanReadable,
27
27
  saveCheckpoint
28
- } from "./chunk-5LRDF2WB.js";
28
+ } from "./chunk-LG5CBK6A.js";
29
29
  import {
30
30
  measureInitialGoalValue
31
- } from "./chunk-HC5P6FZD.js";
31
+ } from "./chunk-ZKKKLRZZ.js";
32
32
  import {
33
33
  exportToJson
34
34
  } from "./chunk-OBQ74FOU.js";
@@ -41,7 +41,7 @@ import {
41
41
  } from "./chunk-TN5WEKWI.js";
42
42
  import {
43
43
  findCrossProjectPatterns
44
- } from "./chunk-IPNPHPNN.js";
44
+ } from "./chunk-TQOO6A4G.js";
45
45
  import {
46
46
  ContextGraph
47
47
  } from "./chunk-VUL52BQL.js";
@@ -58,7 +58,7 @@ import {
58
58
  } from "./chunk-FQ45QP5A.js";
59
59
  import {
60
60
  storeIssues
61
- } from "./chunk-SS2O3MTC.js";
61
+ } from "./chunk-S36IO3EE.js";
62
62
  import {
63
63
  getProjectState
64
64
  } from "./chunk-GTKYBOXL.js";
@@ -75,7 +75,7 @@ import {
75
75
  getPublicKey,
76
76
  hasSigningKey,
77
77
  saveKeyPair
78
- } from "./chunk-YAL3SUBG.js";
78
+ } from "./chunk-MVVPJ73K.js";
79
79
  import {
80
80
  getTrieDirectory,
81
81
  getWorkingDirectory
@@ -2446,7 +2446,7 @@ function GoalsView() {
2446
2446
  dispatch({ type: "SET_GOAL_SCANNING", goalId, progress: "Starting scan..." });
2447
2447
  dispatch({ type: "ADD_ACTIVITY", message: `Scanning goal: ${goalSummary.description}...` });
2448
2448
  dispatch({ type: "SET_GOAL_SCANNING", goalId, progress: "Loading goal configuration..." });
2449
- const { checkFilesForGoalViolations } = await import("./goal-validator-FJEDIYU7.js");
2449
+ const { checkFilesForGoalViolations } = await import("./goal-validator-6Y5CDEMJ.js");
2450
2450
  const agentState = getProjectState(workDir);
2451
2451
  await agentState.load();
2452
2452
  const fullGoal = agentState.getAllGoals().find((g) => g.id === goalId);
@@ -2721,7 +2721,7 @@ function HypothesesView() {
2721
2721
  dispatch({ type: "SET_HYPOTHESIS_SCANNING", hypothesisId: hypoId, progress: "Gathering evidence..." });
2722
2722
  dispatch({ type: "ADD_ACTIVITY", message: `Testing hypothesis: ${hypo.statement}` });
2723
2723
  dispatch({ type: "SHOW_NOTIFICATION", message: `Gathering evidence for hypothesis...`, severity: "info", autoHideMs: 3e3 });
2724
- const { gatherEvidenceForHypothesis } = await import("./hypothesis-4KC7XRBZ.js");
2724
+ const { gatherEvidenceForHypothesis } = await import("./hypothesis-UKPGOYY2.js");
2725
2725
  const evidence = await gatherEvidenceForHypothesis(hypoId, workDir, signal);
2726
2726
  scanAbortRef.current = null;
2727
2727
  dispatch({ type: "SET_HYPOTHESIS_SCANNING", hypothesisId: null, progress: "" });
@@ -6602,7 +6602,7 @@ function getPendingFixes() {
6602
6602
  }
6603
6603
  async function loadPendingFixesFromMemory() {
6604
6604
  try {
6605
- const { getRecentIssues } = await import("./issue-store-FOS4T736.js");
6605
+ const { getRecentIssues } = await import("./issue-store-UZAPI5DU.js");
6606
6606
  pendingFixes.clear();
6607
6607
  const recentIssues = await getRecentIssues({ limit: 50, includeResolved: false });
6608
6608
  for (const storedIssue of recentIssues) {
@@ -6905,7 +6905,7 @@ var TrieCloudFixTool = class {
6905
6905
  if (pending.length === 0) {
6906
6906
  try {
6907
6907
  console.log("Loading issues from memory...");
6908
- const { getRecentIssues } = await import("./issue-store-FOS4T736.js");
6908
+ const { getRecentIssues } = await import("./issue-store-UZAPI5DU.js");
6909
6909
  const recentIssues = await getRecentIssues({ limit: 50, includeResolved: false });
6910
6910
  console.log(`Found ${recentIssues.length} recent issues in memory`);
6911
6911
  const memoryIssues = recentIssues.map((storedIssue) => ({
@@ -8760,7 +8760,7 @@ ${truncated}`;
8760
8760
  const goalId = input.goalId ? String(input.goalId).trim() : void 0;
8761
8761
  try {
8762
8762
  onProgress?.("Loading goals...");
8763
- const { getActiveGoals } = await import("./goal-validator-FJEDIYU7.js");
8763
+ const { getActiveGoals } = await import("./goal-validator-6Y5CDEMJ.js");
8764
8764
  const agentState = getProjectState(directory);
8765
8765
  await agentState.load();
8766
8766
  const allGoals = await getActiveGoals(directory);
@@ -8769,7 +8769,7 @@ ${truncated}`;
8769
8769
  return goalId ? `No active goal found with ID: ${goalId}` : "No active goals to check. Add goals in the Goals view first.";
8770
8770
  }
8771
8771
  onProgress?.("Scanning codebase for violations...");
8772
- const { analyzeFilesRapidly } = await import("./fast-analyzer-54AHLVO5.js");
8772
+ const { analyzeFilesRapidly } = await import("./fast-analyzer-NJQO3TFD.js");
8773
8773
  const analysisOptions = {
8774
8774
  maxFiles: 50,
8775
8775
  enableSmartBatching: true
@@ -8783,7 +8783,7 @@ ${truncated}`;
8783
8783
  const cacheInfo2 = analysisResult.cacheHitRatio > 0 ? ` (${Math.round(analysisResult.cacheHitRatio * 100)}% cache hit, ${analysisResult.timeMs}ms)` : ` (${analysisResult.timeMs}ms)`;
8784
8784
  return `\u2713 Scan complete! No violations found for ${goalsToCheck.length} goal(s).${cacheInfo2}`;
8785
8785
  }
8786
- const { storeIssues: storeIssues2 } = await import("./issue-store-FOS4T736.js");
8786
+ const { storeIssues: storeIssues2 } = await import("./issue-store-UZAPI5DU.js");
8787
8787
  const { basename: basename2 } = await import("path");
8788
8788
  const issuesToStore = violations.map((v, i) => ({
8789
8789
  id: `goal-violation-${Date.now()}-${i}`,
@@ -8862,7 +8862,7 @@ ${truncated}`;
8862
8862
  }
8863
8863
  try {
8864
8864
  onProgress?.("Gathering evidence for hypothesis...");
8865
- const { gatherEvidenceForHypothesis } = await import("./hypothesis-4KC7XRBZ.js");
8865
+ const { gatherEvidenceForHypothesis } = await import("./hypothesis-UKPGOYY2.js");
8866
8866
  const evidence = await gatherEvidenceForHypothesis(hypothesisId, directory);
8867
8867
  if (evidence.length === 0) {
8868
8868
  return `No evidence found for this hypothesis yet. The codebase may not have enough data to validate it \u2014 try running trie_scan_for_goal_violations first to populate issues, or add more context.`;
@@ -8952,6 +8952,23 @@ async function buildContext(workDir, dashboardState) {
8952
8952
  } catch (error) {
8953
8953
  console.error("Failed to load project state:", error);
8954
8954
  }
8955
+ try {
8956
+ const { getLedgerBlocks: getLedgerBlocks2 } = await import("./ledger-CNFCJKHX.js");
8957
+ const blocks = await getLedgerBlocks2(workDir);
8958
+ const allEntries = blocks.flatMap((b) => b.entries);
8959
+ const recentEntries = allEntries.filter((e) => e.status !== "false-positive" && e.issue).slice(-20);
8960
+ if (recentEntries.length > 0) {
8961
+ parts.push("Recent issues from ledger (learn from these patterns):\n" + recentEntries.map((e) => {
8962
+ const severity = e.severity === "critical" ? "\u{1F534}" : e.severity === "high" ? "\u{1F7E0}" : e.severity === "moderate" ? "\u{1F7E1}" : "\u{1F535}";
8963
+ const file = e.file.split("/").pop() || e.file;
8964
+ const issue = e.issue || "No description";
8965
+ const fix = e.fix ? ` \u2192 Fix: ${e.fix}` : "";
8966
+ return ` ${severity} [${file}] ${issue}${fix}`;
8967
+ }).join("\n"));
8968
+ }
8969
+ } catch (error) {
8970
+ console.error("Failed to load ledger entries:", error);
8971
+ }
8955
8972
  try {
8956
8973
  const storage = new TieredStorage(workDir);
8957
8974
  try {
@@ -9037,6 +9054,11 @@ var SYSTEM_PROMPT = `You are Trie, a code assistant embedded in a terminal TUI.
9037
9054
  - Run AI-powered scans to detect goal violations across the entire codebase
9038
9055
  - Save work checkpoints
9039
9056
 
9057
+ **AUTONOMOUS AWARENESS:**
9058
+ - The project context includes "Recent issues from ledger" \u2014 these are patterns you should AVOID in new code
9059
+ - Learn from past mistakes: If you see repeated issues in the ledger, proactively suggest preventive measures
9060
+ - When coding or reviewing code, check if similar issues appear in the ledger history
9061
+
9040
9062
  **IMPORTANT - Finding Code Issues:**
9041
9063
  - You have a trie_scan_for_goal_violations tool - use this to scan the codebase for goal violations
9042
9064
  - This is the BEST way to find emojis, TODOs, or other patterns that violate goals
@@ -9048,7 +9070,7 @@ var SYSTEM_PROMPT = `You are Trie, a code assistant embedded in a terminal TUI.
9048
9070
  - **Blockers** = Things preventing progress (from governance). Use trie_get_blockers when user asks about "blockers" or "what's blocking me".
9049
9071
 
9050
9072
  **When user asks "what are my goals", "show hypotheses", "any nudges", "latest decisions", etc.:**
9051
- - The project context block already includes goals, hypotheses, nudges, decisions, blockers
9073
+ - The project context block already includes goals, hypotheses, nudges, decisions, blockers, and recent ledger entries
9052
9074
  - If the user wants more detail or the context seems stale: Call trie_query_context with the relevant query (e.g. query: "goals", type: "goals")
9053
9075
  - trie_query_context returns goals, hypotheses, nudges, decisions, and blockers \u2014 use it for any "what do I have" questions
9054
9076
 
@@ -9801,7 +9823,7 @@ ${content}
9801
9823
  fixedContent = fixedContent.replace(/^```\w*\n?/, "").replace(/\n?```$/, "");
9802
9824
  }
9803
9825
  await writeFile2(fullPath, fixedContent, "utf-8");
9804
- const { recordGoalViolationFixed, getActiveGoals } = await import("./goal-validator-FJEDIYU7.js");
9826
+ const { recordGoalViolationFixed, getActiveGoals } = await import("./goal-validator-6Y5CDEMJ.js");
9805
9827
  const goals = await getActiveGoals(projectPath);
9806
9828
  const matchedGoal = goals.find((g) => g.description === fix.goalDescription);
9807
9829
  if (matchedGoal) {
@@ -10914,7 +10936,7 @@ ${f.content.slice(0, 1e3)}`
10914
10936
  async checkAndGenerateHypotheses(projectPath) {
10915
10937
  if (!isAIAvailable()) return;
10916
10938
  try {
10917
- const { getHypothesisEngine } = await import("./hypothesis-4KC7XRBZ.js");
10939
+ const { getHypothesisEngine } = await import("./hypothesis-UKPGOYY2.js");
10918
10940
  const { getOutputManager: getOutputManager2 } = await import("./output-manager-JNMEAXFO.js");
10919
10941
  const hypothesisEngine = getHypothesisEngine(projectPath);
10920
10942
  const recentIssues = Array.from(this.state.issueCache.values()).flat();
@@ -10979,7 +11001,7 @@ ${f.content.slice(0, 1e3)}`
10979
11001
  */
10980
11002
  async discoverPatternsFromIssues(projectPath) {
10981
11003
  try {
10982
- const { searchIssues } = await import("./issue-store-FOS4T736.js");
11004
+ const { searchIssues } = await import("./issue-store-UZAPI5DU.js");
10983
11005
  const allIssues = await searchIssues("", {
10984
11006
  workDir: projectPath,
10985
11007
  limit: 1e3,
@@ -11140,7 +11162,7 @@ ${f.content.slice(0, 1e3)}`
11140
11162
  if (remaining < 500) return;
11141
11163
  try {
11142
11164
  const graph = new ContextGraph(projectPath);
11143
- const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-FJEDIYU7.js");
11165
+ const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-6Y5CDEMJ.js");
11144
11166
  console.debug("[AI Watcher] Loading active goals...");
11145
11167
  const activeGoals = await getActiveGoals(projectPath);
11146
11168
  const hasGoals = activeGoals.length > 0;
@@ -11395,7 +11417,7 @@ ${filesBlock}`,
11395
11417
  const projectPath = this.watchedDirectory || getWorkingDirectory(void 0, true);
11396
11418
  console.debug("[Initial Hypothesis] Starting initial hypothesis generation", { projectPath });
11397
11419
  try {
11398
- const { getHypothesisEngine } = await import("./hypothesis-4KC7XRBZ.js");
11420
+ const { getHypothesisEngine } = await import("./hypothesis-UKPGOYY2.js");
11399
11421
  const hypothesisEngine = getHypothesisEngine(projectPath);
11400
11422
  console.debug("[Initial Hypothesis] Running AI-powered hypothesis generation...");
11401
11423
  const generated = await hypothesisEngine.generateHypothesesWithAI({
@@ -11453,7 +11475,7 @@ ${filesBlock}`,
11453
11475
  const projectPath = this.watchedDirectory || getWorkingDirectory(void 0, true);
11454
11476
  console.debug("[Initial Scan] Starting initial goal compliance scan", { projectPath });
11455
11477
  try {
11456
- const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-FJEDIYU7.js");
11478
+ const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-6Y5CDEMJ.js");
11457
11479
  const activeGoals = await getActiveGoals(projectPath);
11458
11480
  console.debug("[Initial Scan] Loaded goals for initial scan:", {
11459
11481
  goalCount: activeGoals.length,
@@ -11596,8 +11618,8 @@ ${filesBlock}`,
11596
11618
  this.streamingManager.reportLedgerUpdate(issuesToStore.length, "goal-violation");
11597
11619
  }
11598
11620
  }
11599
- const { resolveGoalViolation } = await import("./issue-store-FOS4T736.js");
11600
- const { recordGoalViolationFixed } = await import("./goal-validator-FJEDIYU7.js");
11621
+ const { resolveGoalViolation } = await import("./issue-store-UZAPI5DU.js");
11622
+ const { recordGoalViolationFixed } = await import("./goal-validator-6Y5CDEMJ.js");
11601
11623
  const scannedFiles = new Set(valid.map((f) => f.path));
11602
11624
  const filesWithViolations = new Set(issuesToStore.map((i) => i.file));
11603
11625
  for (const scannedFile of scannedFiles) {
@@ -11750,7 +11772,7 @@ Use \`trie_watch start\` to begin autonomous scanning.`
11750
11772
  ).join("\n");
11751
11773
  let agencyStatus = "";
11752
11774
  try {
11753
- const { getTrieAgent: getTrieAgent2 } = await import("./trie-agent-TM6ATSNR.js");
11775
+ const { getTrieAgent: getTrieAgent2 } = await import("./trie-agent-6SWUHCVO.js");
11754
11776
  const trieAgent = getTrieAgent2(this.watchedDirectory || getWorkingDirectory(void 0, true));
11755
11777
  await trieAgent.initialize();
11756
11778
  const status = await trieAgent.getAgencyStatus();
@@ -11923,7 +11945,7 @@ To get a full report, run \`trie watch\` on your codebase.`
11923
11945
  console.debug("[Watch] resolveNudgesForMissingFiles failed:", e);
11924
11946
  }
11925
11947
  try {
11926
- const { getActiveGoals } = await import("./goal-validator-FJEDIYU7.js");
11948
+ const { getActiveGoals } = await import("./goal-validator-6Y5CDEMJ.js");
11927
11949
  const { getProjectState: getProjectState2 } = await import("./project-state-AHPA77SM.js");
11928
11950
  const projectState = getProjectState2(directory);
11929
11951
  await projectState.load();
@@ -11972,4 +11994,4 @@ export {
11972
11994
  InteractiveDashboard,
11973
11995
  TrieWatchTool
11974
11996
  };
11975
- //# sourceMappingURL=chunk-CDG2GVBP.js.map
11997
+ //# sourceMappingURL=chunk-HOGKPDZA.js.map