@triedotdev/mcp 1.0.123 → 1.0.125

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 (34) hide show
  1. package/README.md +11 -0
  2. package/dist/{chunk-F4ZIAHTZ.js → chunk-A4EDTN6R.js} +2 -2
  3. package/dist/{chunk-QIS2VDJL.js → chunk-BNVH2LY7.js} +56 -14
  4. package/dist/chunk-BNVH2LY7.js.map +1 -0
  5. package/dist/{chunk-B46FDUKR.js → chunk-D2CGMX7K.js} +4 -4
  6. package/dist/{chunk-CKT2A33R.js → chunk-W2DEBKZ2.js} +2 -2
  7. package/dist/{chunk-WRGSH5RT.js → chunk-WMI44VIC.js} +2 -2
  8. package/dist/{chunk-WRGSH5RT.js.map → chunk-WMI44VIC.js.map} +1 -1
  9. package/dist/cli/main.js +2 -2
  10. package/dist/cli/yolo-daemon.js +5 -5
  11. package/dist/{client-PMKE26IV.js → client-EWP4SIG3.js} +2 -2
  12. package/dist/{goal-validator-XYA364W3.js → goal-validator-CKFKJ46J.js} +2 -2
  13. package/dist/{guardian-agent-PTC6G37Q.js → guardian-agent-5QVLDPKB.js} +5 -5
  14. package/dist/{hypothesis-WWDONGPU.js → hypothesis-HFYZNIMZ.js} +2 -2
  15. package/dist/index.js +147 -27
  16. package/dist/index.js.map +1 -1
  17. package/dist/ui/chat.html +821 -0
  18. package/dist/ui/goals.html +724 -0
  19. package/dist/ui/hypotheses.html +768 -0
  20. package/dist/ui/ledger.html +711 -0
  21. package/dist/ui/nudges.html +752 -0
  22. package/package.json +1 -1
  23. package/dist/chunk-QIS2VDJL.js.map +0 -1
  24. package/dist/ui/memory-viewer.html +0 -773
  25. package/dist/ui/pr-review.html +0 -742
  26. package/dist/ui/scan-dashboard.html +0 -741
  27. package/dist/ui/visual-qa.html +0 -762
  28. /package/dist/{chunk-F4ZIAHTZ.js.map → chunk-A4EDTN6R.js.map} +0 -0
  29. /package/dist/{chunk-B46FDUKR.js.map → chunk-D2CGMX7K.js.map} +0 -0
  30. /package/dist/{chunk-CKT2A33R.js.map → chunk-W2DEBKZ2.js.map} +0 -0
  31. /package/dist/{client-PMKE26IV.js.map → client-EWP4SIG3.js.map} +0 -0
  32. /package/dist/{goal-validator-XYA364W3.js.map → goal-validator-CKFKJ46J.js.map} +0 -0
  33. /package/dist/{guardian-agent-PTC6G37Q.js.map → guardian-agent-5QVLDPKB.js.map} +0 -0
  34. /package/dist/{hypothesis-WWDONGPU.js.map → hypothesis-HFYZNIMZ.js.map} +0 -0
package/README.md CHANGED
@@ -635,6 +635,17 @@ What happens at the 10,000 issue cap: Trie will deduplicate new repeats, compact
635
635
 
636
636
  **Hooks not working**: Reinstall with `trie init`. Make sure you have write permissions to .git/hooks/.
637
637
 
638
+ **Goals showing but not detecting violations**: This happens when goals appear in the UI but aren't active in guardian state. The Goals view will show a yellow warning box. To fix:
639
+ ```bash
640
+ # Quick fix - activate a specific goal
641
+ node fix-goals.js "NO EMOJIS"
642
+
643
+ # Or use the proper CLI (recommended)
644
+ trie goal add "NO EMOJIS"
645
+ trie goal list
646
+ ```
647
+ See [Goal Detection Fix](./docs/GOAL_DETECTION_FIX.md) for details.
648
+
638
649
  ### Getting Help
639
650
  - Issues: [Report bugs and request features](https://x.com/louiskishfy)
640
651
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tryGetClient
3
- } from "./chunk-WRGSH5RT.js";
3
+ } from "./chunk-WMI44VIC.js";
4
4
  import {
5
5
  searchIssues
6
6
  } from "./chunk-K5EXATBF.js";
@@ -801,4 +801,4 @@ export {
801
801
  getStorage,
802
802
  GotchaPredictor
803
803
  };
804
- //# sourceMappingURL=chunk-F4ZIAHTZ.js.map
804
+ //# sourceMappingURL=chunk-A4EDTN6R.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getGuardian
3
- } from "./chunk-B46FDUKR.js";
3
+ } from "./chunk-D2CGMX7K.js";
4
4
  import {
5
5
  getChatStore
6
6
  } from "./chunk-DFPVUMVE.js";
@@ -18,13 +18,13 @@ import {
18
18
  TieredStorage,
19
19
  findCrossProjectPatterns,
20
20
  getStorage
21
- } from "./chunk-F4ZIAHTZ.js";
21
+ } from "./chunk-A4EDTN6R.js";
22
22
  import {
23
23
  getKeyFromKeychain,
24
24
  isAIAvailable,
25
25
  runAIWithTools,
26
26
  setAPIKey
27
- } from "./chunk-WRGSH5RT.js";
27
+ } from "./chunk-WMI44VIC.js";
28
28
  import {
29
29
  getGuardianState
30
30
  } from "./chunk-UHMMANC2.js";
@@ -537,8 +537,21 @@ function dashboardReducer(state, action) {
537
537
  });
538
538
  let s = { ...state, agentInsights: merged };
539
539
  const newAlerts = newOnes.filter((i) => i.type === "warning" && !i.dismissed).length;
540
+ console.debug("[State] ADD_INSIGHTS nudge count logic:", {
541
+ newOnesCount: newOnes.length,
542
+ newWarnings: newOnes.filter((i) => i.type === "warning").length,
543
+ newAlertsFiltered: newAlerts,
544
+ currentUnreadCount: state.unreadNudgesCount,
545
+ willIncrement: newAlerts > 0,
546
+ newInsightTypes: newOnes.map((i) => ({ type: i.type, dismissed: i.dismissed }))
547
+ });
540
548
  if (newAlerts > 0) {
541
549
  s.unreadNudgesCount = state.unreadNudgesCount + newAlerts;
550
+ console.debug("[State] Incremented unread nudges:", {
551
+ from: state.unreadNudgesCount,
552
+ to: s.unreadNudgesCount,
553
+ increment: newAlerts
554
+ });
542
555
  }
543
556
  if (newOnes.length > 0) {
544
557
  s = addActivity(s, `Trie Agent: ${newOnes.length} new insight${newOnes.length > 1 ? "s" : ""}`);
@@ -976,7 +989,7 @@ function Footer() {
976
989
  " (",
977
990
  unreadNudgesCount,
978
991
  ")"
979
- ] }) : /* @__PURE__ */ jsx3(Text2, { color: "green", children: labels[v] }),
992
+ ] }) : /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: labels[v] }),
980
993
  !isLast && /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: " \xB7 " })
981
994
  ] }, v);
982
995
  }) }),
@@ -997,7 +1010,7 @@ function Footer() {
997
1010
  " (",
998
1011
  unreadNudgesCount,
999
1012
  ")"
1000
- ] }) : /* @__PURE__ */ jsx3(Text2, { color: "green", children: labels[v] }),
1013
+ ] }) : /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: labels[v] }),
1001
1014
  !isLast && /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: " \xB7 " })
1002
1015
  ] }, v);
1003
1016
  }) }),
@@ -1763,7 +1776,7 @@ function GoalsView() {
1763
1776
  const { goalsPanel } = state;
1764
1777
  const activeGoals = goalsPanel.goals.filter((g) => g.status === "active");
1765
1778
  const achievedGoals = goalsPanel.goals.filter((g) => g.status === "achieved");
1766
- const otherGoals = goalsPanel.goals.filter((g) => g.status !== "active" && g.status !== "achieved");
1779
+ const otherGoals = goalsPanel.goals.filter((g) => g.status !== "active" && g.status !== "achieved" && g.status !== "rejected");
1767
1780
  const refreshGoals = useCallback2(async () => {
1768
1781
  try {
1769
1782
  const workDir = getWorkingDirectory(void 0, true);
@@ -1872,7 +1885,7 @@ function GoalsView() {
1872
1885
  if (!goal) return;
1873
1886
  dispatch({ type: "ADD_ACTIVITY", message: `Checking goal: ${goal.description.slice(0, 30)}...` });
1874
1887
  dispatch({ type: "SHOW_NOTIFICATION", message: `Scanning files for violations...`, severity: "info", autoHideMs: 3e3 });
1875
- const { checkFilesForGoalViolations } = await import("./goal-validator-XYA364W3.js");
1888
+ const { checkFilesForGoalViolations } = await import("./goal-validator-CKFKJ46J.js");
1876
1889
  const violations = await checkFilesForGoalViolations([goal], workDir);
1877
1890
  if (violations.length === 0) {
1878
1891
  dispatch({ type: "SHOW_NOTIFICATION", message: `\u2713 No violations found for: ${goal.description.slice(0, 40)}`, severity: "info", autoHideMs: 5e3 });
@@ -1941,6 +1954,11 @@ function GoalsView() {
1941
1954
  ] }) }),
1942
1955
  /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " enter save \xB7 esc cancel" })
1943
1956
  ] }) : /* @__PURE__ */ jsx9(Fragment2, { children: goalsPanel.goals.length === 0 ? /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: " No goals yet. Press a to add one." }) : /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
1957
+ activeGoals.length === 0 && goalsPanel.goals.length > 0 && /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginBottom: 1, paddingX: 1, borderStyle: "round", borderColor: "yellow", children: [
1958
+ /* @__PURE__ */ jsx9(Text8, { color: "yellow", bold: true, children: "\u26A0 No Active Goals" }),
1959
+ /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: "Goals exist but none are active. Violations won't be detected." }),
1960
+ /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: 'Press a to add a new goal, or run: trie goal add "your goal"' })
1961
+ ] }),
1944
1962
  activeGoals.map((goal, idx) => {
1945
1963
  const isSelected = goalsPanel.selectedIndex === idx;
1946
1964
  const progress = calculateGoalProgress(goal);
@@ -2069,7 +2087,7 @@ function HypothesesView() {
2069
2087
  if (!hypo) return;
2070
2088
  dispatch({ type: "ADD_ACTIVITY", message: `Testing hypothesis: ${hypo.statement.slice(0, 30)}...` });
2071
2089
  dispatch({ type: "SHOW_NOTIFICATION", message: `Gathering evidence for hypothesis...`, severity: "info", autoHideMs: 3e3 });
2072
- const { gatherEvidenceForHypothesis } = await import("./hypothesis-WWDONGPU.js");
2090
+ const { gatherEvidenceForHypothesis } = await import("./hypothesis-HFYZNIMZ.js");
2073
2091
  const evidence = await gatherEvidenceForHypothesis(hypoId, workDir);
2074
2092
  if (evidence.length === 0) {
2075
2093
  dispatch({ type: "SHOW_NOTIFICATION", message: `No evidence found for: ${hypo.statement.slice(0, 40)}`, severity: "info", autoHideMs: 5e3 });
@@ -5229,7 +5247,7 @@ ${truncated}`;
5229
5247
  case "trie_scan_for_goal_violations": {
5230
5248
  const goalId = input.goalId ? String(input.goalId).trim() : void 0;
5231
5249
  try {
5232
- const { checkFilesForGoalViolations, getActiveGoals } = await import("./goal-validator-XYA364W3.js");
5250
+ const { checkFilesForGoalViolations, getActiveGoals } = await import("./goal-validator-CKFKJ46J.js");
5233
5251
  const agentState = getGuardianState(directory);
5234
5252
  await agentState.load();
5235
5253
  const allGoals = await getActiveGoals(directory);
@@ -5850,7 +5868,7 @@ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
5850
5868
  var MAIN_VIEWS = ["overview", "memory", "goals", "hypotheses", "agent", "chat"];
5851
5869
  async function applyGoalFix(fix, dispatch) {
5852
5870
  try {
5853
- const { runAIAnalysis, isAIAvailable: isAIAvailable2 } = await import("./client-PMKE26IV.js");
5871
+ const { runAIAnalysis, isAIAvailable: isAIAvailable2 } = await import("./client-EWP4SIG3.js");
5854
5872
  if (!isAIAvailable2()) {
5855
5873
  dispatch({ type: "DISMISS_FIX", id: fix.id });
5856
5874
  getOutputManager().nudge("AI not available for fix", "warning");
@@ -5885,7 +5903,7 @@ ${content}
5885
5903
  fixedContent = fixedContent.replace(/^```\w*\n?/, "").replace(/\n?```$/, "");
5886
5904
  }
5887
5905
  await writeFile(fullPath, fixedContent, "utf-8");
5888
- const { recordGoalViolationFixed, getActiveGoals } = await import("./goal-validator-XYA364W3.js");
5906
+ const { recordGoalViolationFixed, getActiveGoals } = await import("./goal-validator-CKFKJ46J.js");
5889
5907
  const goals = await getActiveGoals(projectPath);
5890
5908
  const matchedGoal = goals.find((g) => g.description === fix.goalDescription);
5891
5909
  if (matchedGoal) {
@@ -6002,23 +6020,47 @@ function DashboardApp({ onReady }) {
6002
6020
  dispatchRef.current({ type: "STREAM_UPDATE", update: { type: "raw_log", data: { time, level, message }, timestamp: Date.now() } });
6003
6021
  },
6004
6022
  onNudge: (nudge) => {
6023
+ console.debug("[Dashboard] Nudge received:", {
6024
+ message: nudge.message.slice(0, 50) + "...",
6025
+ severity: nudge.severity,
6026
+ file: nudge.file,
6027
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
6028
+ });
6005
6029
  const action = { type: "SHOW_NOTIFICATION", message: nudge.message, severity: nudge.severity };
6006
6030
  if (nudge.file !== void 0) action.file = nudge.file;
6007
6031
  if (nudge.autoHideMs !== void 0) action.autoHideMs = nudge.autoHideMs;
6008
6032
  dispatchRef.current(action);
6009
6033
  if (nudge.severity === "critical" || nudge.severity === "warning") {
6034
+ const isGoalViolation = nudge.message.includes('Goal "') || nudge.message.includes("violated");
6010
6035
  const insight = {
6011
6036
  id: `nudge-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
6012
6037
  type: "warning",
6013
- category: "quality",
6038
+ category: isGoalViolation ? "quality" : "general",
6014
6039
  message: nudge.message,
6015
- priority: nudge.severity === "critical" ? 9 : 6,
6040
+ priority: isGoalViolation ? 8 : nudge.severity === "critical" ? 9 : 6,
6041
+ // Goal violations get priority 8
6016
6042
  timestamp: Date.now(),
6017
6043
  suggestedAction: nudge.file ? `Review ${nudge.file}` : void 0,
6018
6044
  relatedIssues: [],
6019
6045
  dismissed: false
6020
6046
  };
6047
+ console.debug("[Dashboard] Creating insight from nudge:", {
6048
+ id: insight.id,
6049
+ type: insight.type,
6050
+ priority: insight.priority,
6051
+ category: insight.category,
6052
+ isGoalViolation,
6053
+ severity: nudge.severity
6054
+ });
6021
6055
  dispatchRef.current({ type: "ADD_INSIGHTS", insights: [insight] });
6056
+ if (isGoalViolation) {
6057
+ console.debug("[Dashboard] Goal violation - extending notification display");
6058
+ const extendedAction = { ...action };
6059
+ if (!extendedAction.autoHideMs || extendedAction.autoHideMs < 15e3) {
6060
+ extendedAction.autoHideMs = 15e3;
6061
+ }
6062
+ dispatchRef.current(extendedAction);
6063
+ }
6022
6064
  }
6023
6065
  }
6024
6066
  });
@@ -6223,4 +6265,4 @@ export {
6223
6265
  handleCheckpointTool,
6224
6266
  InteractiveDashboard
6225
6267
  };
6226
- //# sourceMappingURL=chunk-QIS2VDJL.js.map
6268
+ //# sourceMappingURL=chunk-BNVH2LY7.js.map