@triedotdev/mcp 1.0.154 → 1.0.156

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 (115) hide show
  1. package/dist/{autonomy-config-RKLZW4XL.js → autonomy-config-FSERX3O3.js} +4 -4
  2. package/dist/{chat-store-O3IJ5PMN.js → chat-store-JNGNTDSN.js} +4 -4
  3. package/dist/{chunk-L4FODDDB.js → chunk-5BYSJ7XT.js} +2 -2
  4. package/dist/{chunk-LFNH3CSN.js → chunk-5TRCQAOE.js} +4 -4
  5. package/dist/{chunk-CBAMZERA.js → chunk-ACU2RJUJ.js} +2 -2
  6. package/dist/{chunk-LJISDV3A.js → chunk-CYKJIQNG.js} +13 -13
  7. package/dist/{chunk-EMJ7RVWB.js → chunk-EJKVKVWM.js} +18 -18
  8. package/dist/chunk-EJKVKVWM.js.map +1 -0
  9. package/dist/{chunk-ALSCZ7WR.js → chunk-FNZPMR62.js} +14 -3
  10. package/dist/chunk-FNZPMR62.js.map +1 -0
  11. package/dist/{chunk-UL337UDQ.js → chunk-FQ45QP5A.js} +2 -2
  12. package/dist/{chunk-FTOF3FHT.js → chunk-GDWA3CH3.js} +3 -3
  13. package/dist/{chunk-4ZAFQEP6.js → chunk-IRZXBQVQ.js} +4 -4
  14. package/dist/{chunk-3CYMLM35.js → chunk-JVMBCWKS.js} +2 -2
  15. package/dist/{chunk-JKEEQAG2.js → chunk-KDHN2ZQE.js} +2 -2
  16. package/dist/chunk-KDHN2ZQE.js.map +1 -0
  17. package/dist/{chunk-QAM5X5HM.js → chunk-LGDZXKC5.js} +107 -53
  18. package/dist/chunk-LGDZXKC5.js.map +1 -0
  19. package/dist/{chunk-NVZZUUEU.js → chunk-LR46VMIE.js} +5 -5
  20. package/dist/{chunk-XD2HKZVB.js → chunk-ME2OERF5.js} +2 -2
  21. package/dist/{chunk-FXZAABXO.js → chunk-OLNZJ3XV.js} +2 -2
  22. package/dist/{chunk-2LAJKFWU.js → chunk-OMR4YCBS.js} +2 -2
  23. package/dist/{chunk-OWSGJUUR.js → chunk-OMZSQAQ2.js} +6 -6
  24. package/dist/{chunk-YEQXKKZQ.js → chunk-Q5EKA5YA.js} +2 -2
  25. package/dist/{chunk-Z2E7X4WI.js → chunk-SSNOHUHY.js} +7 -7
  26. package/dist/{chunk-WO7CC5FH.js → chunk-SY6KQG44.js} +2 -2
  27. package/dist/{chunk-T7UAH7GE.js → chunk-T63OHG4Q.js} +2 -2
  28. package/dist/{chunk-KYKADM7P.js → chunk-TN5WEKWI.js} +2 -2
  29. package/dist/{chunk-KLMJKM63.js → chunk-VR4VWXXU.js} +3 -3
  30. package/dist/chunk-VR4VWXXU.js.map +1 -0
  31. package/dist/{chunk-JYWGYUKX.js → chunk-VUL52BQL.js} +6 -6
  32. package/dist/chunk-VUL52BQL.js.map +1 -0
  33. package/dist/{chunk-7F2R2ITA.js → chunk-VVITXIHN.js} +2 -2
  34. package/dist/{chunk-HD5H7YSW.js → chunk-Y4B3VEL7.js} +2 -2
  35. package/dist/{chunk-OVSYTWUU.js → chunk-ZBXW244P.js} +2 -2
  36. package/dist/cli/create-agent.js +2 -2
  37. package/dist/cli/main.js +86 -40
  38. package/dist/cli/main.js.map +1 -1
  39. package/dist/cli/yolo-daemon.js +39 -25
  40. package/dist/cli/yolo-daemon.js.map +1 -1
  41. package/dist/{client-ZHOLZTRW.js → client-NJPZE5JT.js} +4 -4
  42. package/dist/{codebase-index-N37NDF2A.js → codebase-index-VAPF32XX.js} +4 -4
  43. package/dist/{fast-analyzer-U6URGNQT.js → fast-analyzer-CRWPDN6C.js} +6 -6
  44. package/dist/github-ingester-TFBDUDIY.js +11 -0
  45. package/dist/{goal-manager-5QDITJKE.js → goal-manager-D6XKE3FY.js} +8 -8
  46. package/dist/{goal-validator-FU5QWDQT.js → goal-validator-4E5ZLCDH.js} +7 -7
  47. package/dist/graph-B3NA4S7I.js +10 -0
  48. package/dist/{hypothesis-JURDWVDC.js → hypothesis-RI3Q33JB.js} +8 -8
  49. package/dist/incident-index-EFNUSGWL.js +11 -0
  50. package/dist/index.js +29 -29
  51. package/dist/{insight-store-AMEP5PPF.js → insight-store-EC4PLSAW.js} +4 -4
  52. package/dist/{issue-store-RM3XLLKG.js → issue-store-DUR5UTYK.js} +5 -5
  53. package/dist/{ledger-PLE3C3X4.js → ledger-ZTR63P3L.js} +4 -4
  54. package/dist/linear-ingester-PLES2BRS.js +11 -0
  55. package/dist/{output-manager-FX4V7ERT.js → output-manager-JNMEAXFO.js} +3 -3
  56. package/dist/{progress-PAYTY7BF.js → progress-SRQ2V3BP.js} +2 -2
  57. package/dist/tiered-storage-SUYPBYJL.js +12 -0
  58. package/dist/trie-agent-GL3VQPCD.js +27 -0
  59. package/dist/{vibe-code-signatures-J4GD4JOV.js → vibe-code-signatures-F6URTBW3.js} +3 -3
  60. package/dist/{vulnerability-signatures-EIKOHFPK.js → vulnerability-signatures-T7SKHORW.js} +3 -3
  61. package/package.json +1 -1
  62. package/dist/chunk-ALSCZ7WR.js.map +0 -1
  63. package/dist/chunk-EMJ7RVWB.js.map +0 -1
  64. package/dist/chunk-JKEEQAG2.js.map +0 -1
  65. package/dist/chunk-JYWGYUKX.js.map +0 -1
  66. package/dist/chunk-KLMJKM63.js.map +0 -1
  67. package/dist/chunk-QAM5X5HM.js.map +0 -1
  68. package/dist/github-ingester-AR5A4RAC.js +0 -11
  69. package/dist/graph-JO7GG65P.js +0 -10
  70. package/dist/incident-index-7CAXUNTL.js +0 -11
  71. package/dist/linear-ingester-NHFMKJBZ.js +0 -11
  72. package/dist/tiered-storage-3TUUR3L2.js +0 -12
  73. package/dist/trie-agent-QHPS4C5Z.js +0 -27
  74. /package/dist/{autonomy-config-RKLZW4XL.js.map → autonomy-config-FSERX3O3.js.map} +0 -0
  75. /package/dist/{chat-store-O3IJ5PMN.js.map → chat-store-JNGNTDSN.js.map} +0 -0
  76. /package/dist/{chunk-L4FODDDB.js.map → chunk-5BYSJ7XT.js.map} +0 -0
  77. /package/dist/{chunk-LFNH3CSN.js.map → chunk-5TRCQAOE.js.map} +0 -0
  78. /package/dist/{chunk-CBAMZERA.js.map → chunk-ACU2RJUJ.js.map} +0 -0
  79. /package/dist/{chunk-LJISDV3A.js.map → chunk-CYKJIQNG.js.map} +0 -0
  80. /package/dist/{chunk-UL337UDQ.js.map → chunk-FQ45QP5A.js.map} +0 -0
  81. /package/dist/{chunk-FTOF3FHT.js.map → chunk-GDWA3CH3.js.map} +0 -0
  82. /package/dist/{chunk-4ZAFQEP6.js.map → chunk-IRZXBQVQ.js.map} +0 -0
  83. /package/dist/{chunk-3CYMLM35.js.map → chunk-JVMBCWKS.js.map} +0 -0
  84. /package/dist/{chunk-NVZZUUEU.js.map → chunk-LR46VMIE.js.map} +0 -0
  85. /package/dist/{chunk-XD2HKZVB.js.map → chunk-ME2OERF5.js.map} +0 -0
  86. /package/dist/{chunk-FXZAABXO.js.map → chunk-OLNZJ3XV.js.map} +0 -0
  87. /package/dist/{chunk-2LAJKFWU.js.map → chunk-OMR4YCBS.js.map} +0 -0
  88. /package/dist/{chunk-OWSGJUUR.js.map → chunk-OMZSQAQ2.js.map} +0 -0
  89. /package/dist/{chunk-YEQXKKZQ.js.map → chunk-Q5EKA5YA.js.map} +0 -0
  90. /package/dist/{chunk-Z2E7X4WI.js.map → chunk-SSNOHUHY.js.map} +0 -0
  91. /package/dist/{chunk-WO7CC5FH.js.map → chunk-SY6KQG44.js.map} +0 -0
  92. /package/dist/{chunk-T7UAH7GE.js.map → chunk-T63OHG4Q.js.map} +0 -0
  93. /package/dist/{chunk-KYKADM7P.js.map → chunk-TN5WEKWI.js.map} +0 -0
  94. /package/dist/{chunk-7F2R2ITA.js.map → chunk-VVITXIHN.js.map} +0 -0
  95. /package/dist/{chunk-HD5H7YSW.js.map → chunk-Y4B3VEL7.js.map} +0 -0
  96. /package/dist/{chunk-OVSYTWUU.js.map → chunk-ZBXW244P.js.map} +0 -0
  97. /package/dist/{client-ZHOLZTRW.js.map → client-NJPZE5JT.js.map} +0 -0
  98. /package/dist/{codebase-index-N37NDF2A.js.map → codebase-index-VAPF32XX.js.map} +0 -0
  99. /package/dist/{fast-analyzer-U6URGNQT.js.map → fast-analyzer-CRWPDN6C.js.map} +0 -0
  100. /package/dist/{github-ingester-AR5A4RAC.js.map → github-ingester-TFBDUDIY.js.map} +0 -0
  101. /package/dist/{goal-manager-5QDITJKE.js.map → goal-manager-D6XKE3FY.js.map} +0 -0
  102. /package/dist/{goal-validator-FU5QWDQT.js.map → goal-validator-4E5ZLCDH.js.map} +0 -0
  103. /package/dist/{graph-JO7GG65P.js.map → graph-B3NA4S7I.js.map} +0 -0
  104. /package/dist/{hypothesis-JURDWVDC.js.map → hypothesis-RI3Q33JB.js.map} +0 -0
  105. /package/dist/{incident-index-7CAXUNTL.js.map → incident-index-EFNUSGWL.js.map} +0 -0
  106. /package/dist/{insight-store-AMEP5PPF.js.map → insight-store-EC4PLSAW.js.map} +0 -0
  107. /package/dist/{issue-store-RM3XLLKG.js.map → issue-store-DUR5UTYK.js.map} +0 -0
  108. /package/dist/{ledger-PLE3C3X4.js.map → ledger-ZTR63P3L.js.map} +0 -0
  109. /package/dist/{linear-ingester-NHFMKJBZ.js.map → linear-ingester-PLES2BRS.js.map} +0 -0
  110. /package/dist/{output-manager-FX4V7ERT.js.map → output-manager-JNMEAXFO.js.map} +0 -0
  111. /package/dist/{progress-PAYTY7BF.js.map → progress-SRQ2V3BP.js.map} +0 -0
  112. /package/dist/{tiered-storage-3TUUR3L2.js.map → tiered-storage-SUYPBYJL.js.map} +0 -0
  113. /package/dist/{trie-agent-QHPS4C5Z.js.map → trie-agent-GL3VQPCD.js.map} +0 -0
  114. /package/dist/{vibe-code-signatures-J4GD4JOV.js.map → vibe-code-signatures-F6URTBW3.js.map} +0 -0
  115. /package/dist/{vulnerability-signatures-EIKOHFPK.js.map → vulnerability-signatures-T7SKHORW.js.map} +0 -0
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  getChatStore
3
- } from "./chunk-3CYMLM35.js";
3
+ } from "./chunk-JVMBCWKS.js";
4
4
  import {
5
5
  getTrieAgent
6
- } from "./chunk-LJISDV3A.js";
6
+ } from "./chunk-CYKJIQNG.js";
7
7
  import {
8
8
  CodebaseIndex
9
- } from "./chunk-YEQXKKZQ.js";
9
+ } from "./chunk-Q5EKA5YA.js";
10
10
  import {
11
11
  getOutputManager
12
- } from "./chunk-KLMJKM63.js";
12
+ } from "./chunk-VR4VWXXU.js";
13
13
  import {
14
14
  LearningEngine,
15
15
  exportToJson,
@@ -20,57 +20,57 @@ import {
20
20
  perceiveCurrentChanges,
21
21
  reasonAboutChangesHumanReadable,
22
22
  saveCheckpoint
23
- } from "./chunk-EMJ7RVWB.js";
23
+ } from "./chunk-EJKVKVWM.js";
24
24
  import {
25
25
  loadConfig,
26
26
  saveConfig
27
- } from "./chunk-FTOF3FHT.js";
27
+ } from "./chunk-GDWA3CH3.js";
28
28
  import {
29
29
  IncidentIndex
30
- } from "./chunk-KYKADM7P.js";
30
+ } from "./chunk-TN5WEKWI.js";
31
31
  import {
32
32
  findCrossProjectPatterns
33
- } from "./chunk-OWSGJUUR.js";
33
+ } from "./chunk-OMZSQAQ2.js";
34
34
  import {
35
35
  ContextGraph
36
- } from "./chunk-JYWGYUKX.js";
36
+ } from "./chunk-VUL52BQL.js";
37
37
  import {
38
38
  measureInitialGoalValue
39
- } from "./chunk-Z2E7X4WI.js";
39
+ } from "./chunk-SSNOHUHY.js";
40
40
  import {
41
41
  getKeyFromKeychain,
42
42
  isAIAvailable,
43
43
  runAIAnalysis,
44
44
  runAIWithTools,
45
45
  setAPIKey
46
- } from "./chunk-UL337UDQ.js";
46
+ } from "./chunk-FQ45QP5A.js";
47
47
  import {
48
48
  getProjectState
49
- } from "./chunk-L4FODDDB.js";
49
+ } from "./chunk-5BYSJ7XT.js";
50
50
  import {
51
51
  TieredStorage,
52
52
  getStorage
53
- } from "./chunk-ALSCZ7WR.js";
53
+ } from "./chunk-FNZPMR62.js";
54
54
  import {
55
55
  getAutonomyConfig,
56
56
  loadAutonomyConfig,
57
57
  saveAutonomyConfig
58
- } from "./chunk-XD2HKZVB.js";
58
+ } from "./chunk-ME2OERF5.js";
59
59
  import {
60
60
  storeIssues
61
- } from "./chunk-4ZAFQEP6.js";
61
+ } from "./chunk-IRZXBQVQ.js";
62
62
  import {
63
63
  getChangedFilesSinceTimestamp,
64
64
  getGitChangedFiles,
65
65
  getLedgerBlocks
66
- } from "./chunk-HD5H7YSW.js";
66
+ } from "./chunk-Y4B3VEL7.js";
67
67
  import {
68
68
  getTrieDirectory,
69
69
  getWorkingDirectory
70
- } from "./chunk-7F2R2ITA.js";
70
+ } from "./chunk-VVITXIHN.js";
71
71
  import {
72
72
  isInteractiveMode
73
- } from "./chunk-JKEEQAG2.js";
73
+ } from "./chunk-KDHN2ZQE.js";
74
74
 
75
75
  // src/utils/streaming.ts
76
76
  var shouldSuppressConsole = () => isInteractiveMode();
@@ -249,6 +249,12 @@ var StreamingManager = class {
249
249
  reportSignalExtraction(signals) {
250
250
  this.emit("signal_extracted", signals);
251
251
  }
252
+ /**
253
+ * Report ledger update (new entries added)
254
+ */
255
+ reportLedgerUpdate(entryCount, source) {
256
+ this.emit("ledger_updated", { entryCount, source });
257
+ }
252
258
  // ============================================
253
259
  // Rich Content Events (for TUI panes)
254
260
  // ============================================
@@ -454,6 +460,11 @@ function handleStreamUpdate(state, update) {
454
460
  }
455
461
  break;
456
462
  }
463
+ case "ledger_updated": {
464
+ s.memoryTree = { ...s.memoryTree, loaded: false };
465
+ s = addActivity(s, `[L] Ledger updated: ${update.data.entryCount} ${update.data.source} entries`);
466
+ break;
467
+ }
457
468
  case "memory":
458
469
  if (update.data.action === "saving") s = addActivity(s, "[~] Saving to memory...");
459
470
  else if (update.data.action === "saved") s = addActivity(s, `[+] Memory updated: ${update.data.details || "context saved"}`);
@@ -1205,7 +1216,7 @@ function ConfigDialog({ onClose }) {
1205
1216
  const loadStats = async () => {
1206
1217
  try {
1207
1218
  const workDir = getWorkingDirectory(void 0, true);
1208
- const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-index-N37NDF2A.js");
1219
+ const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-index-VAPF32XX.js");
1209
1220
  const index = new CodebaseIndex2(workDir);
1210
1221
  const stats = index.getStats();
1211
1222
  let lastUpdatedDisplay = "Never";
@@ -1398,7 +1409,7 @@ function ConfigDialog({ onClose }) {
1398
1409
  const loadStats = async () => {
1399
1410
  try {
1400
1411
  const workDir = getWorkingDirectory(void 0, true);
1401
- const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-index-N37NDF2A.js");
1412
+ const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-index-VAPF32XX.js");
1402
1413
  const index = new CodebaseIndex2(workDir);
1403
1414
  const stats = index.getStats();
1404
1415
  setIndexStats({
@@ -1473,7 +1484,7 @@ function ConfigDialog({ onClose }) {
1473
1484
  }
1474
1485
  async function reindexCodebase() {
1475
1486
  const workDir = getWorkingDirectory(void 0, true);
1476
- const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-index-N37NDF2A.js");
1487
+ const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-index-VAPF32XX.js");
1477
1488
  const { glob } = await import("glob");
1478
1489
  const index = new CodebaseIndex2(workDir);
1479
1490
  const indexPattern = `${workDir}/**/*.{ts,tsx,js,jsx,mjs,vue,svelte,astro,py,go,rs,java,c,cpp,h,hpp,cs,rb,php,css,scss,html}`;
@@ -1936,10 +1947,10 @@ function AgentView() {
1936
1947
  if (!insight) return;
1937
1948
  try {
1938
1949
  const workDir = getWorkingDirectory(void 0, true);
1939
- const { getInsightStore } = await import("./insight-store-AMEP5PPF.js");
1950
+ const { getInsightStore } = await import("./insight-store-EC4PLSAW.js");
1940
1951
  const store = getInsightStore(workDir);
1941
1952
  await store.dismissInsight(insight.id);
1942
- const { getStorage: getStorage2 } = await import("./tiered-storage-3TUUR3L2.js");
1953
+ const { getStorage: getStorage2 } = await import("./tiered-storage-SUYPBYJL.js");
1943
1954
  const storage = getStorage2(workDir);
1944
1955
  await storage.dismissNudge(insight.id).catch(() => {
1945
1956
  });
@@ -2298,7 +2309,7 @@ function GoalsView() {
2298
2309
  dispatch({ type: "SET_GOAL_SCANNING", goalId, progress: "Starting scan..." });
2299
2310
  dispatch({ type: "ADD_ACTIVITY", message: `Scanning goal: ${goalSummary.description}...` });
2300
2311
  dispatch({ type: "SET_GOAL_SCANNING", goalId, progress: "Loading goal configuration..." });
2301
- const { checkFilesForGoalViolations } = await import("./goal-validator-FU5QWDQT.js");
2312
+ const { checkFilesForGoalViolations } = await import("./goal-validator-4E5ZLCDH.js");
2302
2313
  const agentState = getProjectState(workDir);
2303
2314
  await agentState.load();
2304
2315
  const fullGoal = agentState.getAllGoals().find((g) => g.id === goalId);
@@ -2573,7 +2584,7 @@ function HypothesesView() {
2573
2584
  dispatch({ type: "SET_HYPOTHESIS_SCANNING", hypothesisId: hypoId, progress: "Gathering evidence..." });
2574
2585
  dispatch({ type: "ADD_ACTIVITY", message: `Testing hypothesis: ${hypo.statement}` });
2575
2586
  dispatch({ type: "SHOW_NOTIFICATION", message: `Gathering evidence for hypothesis...`, severity: "info", autoHideMs: 3e3 });
2576
- const { gatherEvidenceForHypothesis } = await import("./hypothesis-JURDWVDC.js");
2587
+ const { gatherEvidenceForHypothesis } = await import("./hypothesis-RI3Q33JB.js");
2577
2588
  const evidence = await gatherEvidenceForHypothesis(hypoId, workDir, signal);
2578
2589
  scanAbortRef.current = null;
2579
2590
  dispatch({ type: "SET_HYPOTHESIS_SCANNING", hypothesisId: null, progress: "" });
@@ -6249,7 +6260,7 @@ function getPendingFixes() {
6249
6260
  }
6250
6261
  async function loadPendingFixesFromMemory() {
6251
6262
  try {
6252
- const { getRecentIssues } = await import("./issue-store-RM3XLLKG.js");
6263
+ const { getRecentIssues } = await import("./issue-store-DUR5UTYK.js");
6253
6264
  pendingFixes.clear();
6254
6265
  const recentIssues = await getRecentIssues({ limit: 50, includeResolved: false });
6255
6266
  for (const storedIssue of recentIssues) {
@@ -6552,7 +6563,7 @@ var TrieCloudFixTool = class {
6552
6563
  if (pending.length === 0) {
6553
6564
  try {
6554
6565
  console.log("Loading issues from memory...");
6555
- const { getRecentIssues } = await import("./issue-store-RM3XLLKG.js");
6566
+ const { getRecentIssues } = await import("./issue-store-DUR5UTYK.js");
6556
6567
  const recentIssues = await getRecentIssues({ limit: 50, includeResolved: false });
6557
6568
  console.log(`Found ${recentIssues.length} recent issues in memory`);
6558
6569
  const memoryIssues = recentIssues.map((storedIssue) => ({
@@ -6992,7 +7003,7 @@ var TrieQueryContextTool = class {
6992
7003
  }
6993
7004
  if (includeIncidents) {
6994
7005
  try {
6995
- const { ContextGraph: ContextGraph2 } = await import("./graph-JO7GG65P.js");
7006
+ const { ContextGraph: ContextGraph2 } = await import("./graph-B3NA4S7I.js");
6996
7007
  const graph = new ContextGraph2(workDir);
6997
7008
  const allNodes = await graph.listNodes();
6998
7009
  const incidentNodes = allNodes.filter((n) => n.type === "incident");
@@ -8257,7 +8268,7 @@ ${truncated}`;
8257
8268
  const goalId = input.goalId ? String(input.goalId).trim() : void 0;
8258
8269
  try {
8259
8270
  onProgress?.("Loading goals...");
8260
- const { getActiveGoals } = await import("./goal-validator-FU5QWDQT.js");
8271
+ const { getActiveGoals } = await import("./goal-validator-4E5ZLCDH.js");
8261
8272
  const agentState = getProjectState(directory);
8262
8273
  await agentState.load();
8263
8274
  const allGoals = await getActiveGoals(directory);
@@ -8266,7 +8277,7 @@ ${truncated}`;
8266
8277
  return goalId ? `No active goal found with ID: ${goalId}` : "No active goals to check. Add goals in the Goals view first.";
8267
8278
  }
8268
8279
  onProgress?.("Scanning codebase for violations...");
8269
- const { analyzeFilesRapidly } = await import("./fast-analyzer-U6URGNQT.js");
8280
+ const { analyzeFilesRapidly } = await import("./fast-analyzer-CRWPDN6C.js");
8270
8281
  const analysisOptions = {
8271
8282
  maxFiles: 50,
8272
8283
  enableSmartBatching: true
@@ -8280,7 +8291,7 @@ ${truncated}`;
8280
8291
  const cacheInfo2 = analysisResult.cacheHitRatio > 0 ? ` (${Math.round(analysisResult.cacheHitRatio * 100)}% cache hit, ${analysisResult.timeMs}ms)` : ` (${analysisResult.timeMs}ms)`;
8281
8292
  return `\u2713 Scan complete! No violations found for ${goalsToCheck.length} goal(s).${cacheInfo2}`;
8282
8293
  }
8283
- const { storeIssues: storeIssues2 } = await import("./issue-store-RM3XLLKG.js");
8294
+ const { storeIssues: storeIssues2 } = await import("./issue-store-DUR5UTYK.js");
8284
8295
  const { basename: basename2 } = await import("path");
8285
8296
  const issuesToStore = violations.map((v, i) => ({
8286
8297
  id: `goal-violation-${Date.now()}-${i}`,
@@ -8359,7 +8370,7 @@ ${truncated}`;
8359
8370
  }
8360
8371
  try {
8361
8372
  onProgress?.("Gathering evidence for hypothesis...");
8362
- const { gatherEvidenceForHypothesis } = await import("./hypothesis-JURDWVDC.js");
8373
+ const { gatherEvidenceForHypothesis } = await import("./hypothesis-RI3Q33JB.js");
8363
8374
  const evidence = await gatherEvidenceForHypothesis(hypothesisId, directory);
8364
8375
  if (evidence.length === 0) {
8365
8376
  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.`;
@@ -8623,7 +8634,7 @@ function ChatView() {
8623
8634
  const saveChat = async () => {
8624
8635
  try {
8625
8636
  const workDir = getWorkingDirectory(void 0, true);
8626
- const { getChatStore: getChatStore2 } = await import("./chat-store-O3IJ5PMN.js");
8637
+ const { getChatStore: getChatStore2 } = await import("./chat-store-JNGNTDSN.js");
8627
8638
  const store = getChatStore2(workDir);
8628
8639
  const sessionId = await store.saveSession(
8629
8640
  messages,
@@ -9258,7 +9269,7 @@ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
9258
9269
  var MAIN_VIEWS = ["overview", "memory", "goals", "hypotheses", "agent", "chat"];
9259
9270
  async function applyGoalFix(fix, dispatch) {
9260
9271
  try {
9261
- const { runAIAnalysis: runAIAnalysis2, isAIAvailable: isAIAvailable2 } = await import("./client-ZHOLZTRW.js");
9272
+ const { runAIAnalysis: runAIAnalysis2, isAIAvailable: isAIAvailable2 } = await import("./client-NJPZE5JT.js");
9262
9273
  if (!isAIAvailable2()) {
9263
9274
  dispatch({ type: "DISMISS_FIX", id: fix.id });
9264
9275
  getOutputManager().nudge("AI not available for fix", "warning");
@@ -9293,7 +9304,7 @@ ${content}
9293
9304
  fixedContent = fixedContent.replace(/^```\w*\n?/, "").replace(/\n?```$/, "");
9294
9305
  }
9295
9306
  await writeFile2(fullPath, fixedContent, "utf-8");
9296
- const { recordGoalViolationFixed, getActiveGoals } = await import("./goal-validator-FU5QWDQT.js");
9307
+ const { recordGoalViolationFixed, getActiveGoals } = await import("./goal-validator-4E5ZLCDH.js");
9297
9308
  const goals = await getActiveGoals(projectPath);
9298
9309
  const matchedGoal = goals.find((g) => g.description === fix.goalDescription);
9299
9310
  if (matchedGoal) {
@@ -9331,7 +9342,7 @@ function DashboardApp({ onReady }) {
9331
9342
  const workDir = getWorkingDirectory(void 0, true);
9332
9343
  await mkdir2(getTrieDirectory(workDir), { recursive: true });
9333
9344
  await writeFile2(configPath, JSON.stringify(stateRef.current.agentConfig, null, 2), "utf-8");
9334
- const { saveAutonomyConfig: saveAutonomyConfig2, loadAutonomyConfig: loadAutonomyConfig2 } = await import("./autonomy-config-RKLZW4XL.js");
9345
+ const { saveAutonomyConfig: saveAutonomyConfig2, loadAutonomyConfig: loadAutonomyConfig2 } = await import("./autonomy-config-FSERX3O3.js");
9335
9346
  const autonomy = await loadAutonomyConfig2(workDir);
9336
9347
  autonomy.aiWatcher = stateRef.current.agentConfig.aiWatcher;
9337
9348
  await saveAutonomyConfig2(workDir, autonomy);
@@ -9409,7 +9420,7 @@ function DashboardApp({ onReady }) {
9409
9420
  const loadPersistedNudges = useCallback7(async () => {
9410
9421
  try {
9411
9422
  const workDir = getWorkingDirectory(void 0, true);
9412
- const { getStorage: getStorage2 } = await import("./tiered-storage-3TUUR3L2.js");
9423
+ const { getStorage: getStorage2 } = await import("./tiered-storage-SUYPBYJL.js");
9413
9424
  const storage = getStorage2(workDir);
9414
9425
  await storage.initialize();
9415
9426
  const nudges = await storage.queryNudges({ resolved: false, limit: 50 });
@@ -10106,6 +10117,10 @@ ${f.content.slice(0, 1e3)}`
10106
10117
  console.error(` [!] Signal extraction failed: ${error}`);
10107
10118
  }
10108
10119
  }
10120
+ } else {
10121
+ if (files.length > 0 && !isInteractiveMode()) {
10122
+ console.debug("[Watch] Signal extraction skipped: ANTHROPIC_API_KEY not set");
10123
+ }
10109
10124
  }
10110
10125
  void this.autoScanFiles(files).catch((err) => {
10111
10126
  getOutputManager().log("warn", `Auto scan failed: ${err}`);
@@ -10160,8 +10175,8 @@ ${f.content.slice(0, 1e3)}`
10160
10175
  async checkAndGenerateHypotheses(projectPath) {
10161
10176
  if (!isAIAvailable()) return;
10162
10177
  try {
10163
- const { getHypothesisEngine } = await import("./hypothesis-JURDWVDC.js");
10164
- const { getOutputManager: getOutputManager2 } = await import("./output-manager-FX4V7ERT.js");
10178
+ const { getHypothesisEngine } = await import("./hypothesis-RI3Q33JB.js");
10179
+ const { getOutputManager: getOutputManager2 } = await import("./output-manager-JNMEAXFO.js");
10165
10180
  const hypothesisEngine = getHypothesisEngine(projectPath);
10166
10181
  const recentIssues = Array.from(this.state.issueCache.values()).flat();
10167
10182
  const patterns = [];
@@ -10224,16 +10239,23 @@ ${f.content.slice(0, 1e3)}`
10224
10239
  * Patterns emerge naturally from your coding workflow
10225
10240
  */
10226
10241
  async discoverPatternsFromIssues(projectPath) {
10227
- const totalIssues = Array.from(this.state.issueCache.values()).flat().length;
10228
- if (totalIssues < 5) return;
10229
10242
  try {
10230
- const { ContextGraph: ContextGraph2 } = await import("./graph-JO7GG65P.js");
10231
- const { IncidentIndex: IncidentIndex2 } = await import("./incident-index-7CAXUNTL.js");
10243
+ const { searchIssues } = await import("./issue-store-DUR5UTYK.js");
10244
+ const allIssues = await searchIssues("", {
10245
+ workDir: projectPath,
10246
+ limit: 1e3,
10247
+ includeResolved: false
10248
+ // Only active issues
10249
+ });
10250
+ if (allIssues.length < 5) return;
10251
+ const { ContextGraph: ContextGraph2 } = await import("./graph-B3NA4S7I.js");
10252
+ const { IncidentIndex: IncidentIndex2 } = await import("./incident-index-EFNUSGWL.js");
10232
10253
  const { TriePatternDiscovery } = await import("./pattern-discovery-F7LU5K6E.js");
10233
10254
  const graph = new ContextGraph2(projectPath);
10234
10255
  const incidentIndex = await IncidentIndex2.build(graph, projectPath);
10235
10256
  const discovery = new TriePatternDiscovery(graph, incidentIndex);
10236
10257
  const hotPatterns = discovery.discoverHotPatterns(2);
10258
+ let patternsAdded = 0;
10237
10259
  for (const hot of hotPatterns) {
10238
10260
  const existingPatterns = await graph.listNodes();
10239
10261
  const alreadyExists = existingPatterns.some(
@@ -10251,6 +10273,7 @@ ${f.content.slice(0, 1e3)}`
10251
10273
  // 3+ incidents = anti-pattern
10252
10274
  source: "local"
10253
10275
  });
10276
+ patternsAdded++;
10254
10277
  if (!isInteractiveMode()) {
10255
10278
  console.error(` [+] Pattern discovered: ${hot.path} (${hot.incidentCount} issues)`);
10256
10279
  }
@@ -10265,7 +10288,7 @@ ${f.content.slice(0, 1e3)}`
10265
10288
  }
10266
10289
  }
10267
10290
  }
10268
- if (totalIssues >= 10) {
10291
+ if (allIssues.length >= 10) {
10269
10292
  const coOccurrences = await discovery.discoverCoOccurrences(2);
10270
10293
  for (const coOcc of coOccurrences.slice(0, 3)) {
10271
10294
  const desc = `Files break together: ${coOcc.files[0]} + ${coOcc.files[1]}`;
@@ -10284,12 +10307,20 @@ ${f.content.slice(0, 1e3)}`
10284
10307
  isAntiPattern: coOcc.confidence > 0.7,
10285
10308
  source: "local"
10286
10309
  });
10310
+ patternsAdded++;
10287
10311
  if (!isInteractiveMode()) {
10288
10312
  console.error(` [+] Co-occurrence pattern: ${coOcc.files[0]} + ${coOcc.files[1]}`);
10289
10313
  }
10290
10314
  }
10291
10315
  }
10292
10316
  }
10317
+ if (patternsAdded > 0) {
10318
+ const { exportToJson: exportToJson2 } = await import("./graph-B3NA4S7I.js");
10319
+ await exportToJson2(graph);
10320
+ if (!isInteractiveMode()) {
10321
+ console.error(` [\u2713] Discovered ${patternsAdded} pattern(s) from ${allIssues.length} issues`);
10322
+ }
10323
+ }
10293
10324
  } catch (error) {
10294
10325
  if (!isInteractiveMode()) {
10295
10326
  console.error(` [!] Pattern discovery failed: ${error}`);
@@ -10370,7 +10401,7 @@ ${f.content.slice(0, 1e3)}`
10370
10401
  if (remaining < 500) return;
10371
10402
  try {
10372
10403
  const graph = new ContextGraph(projectPath);
10373
- const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-FU5QWDQT.js");
10404
+ const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-4E5ZLCDH.js");
10374
10405
  console.debug("[AI Watcher] Loading active goals...");
10375
10406
  const activeGoals = await getActiveGoals(projectPath);
10376
10407
  const hasGoals = activeGoals.length > 0;
@@ -10518,6 +10549,9 @@ ${filesBlock}`,
10518
10549
  };
10519
10550
  await storeIssues([goalViolationIssue], basename(projectPath), projectPath);
10520
10551
  await recordGoalViolationCaught(goal, issue.file, projectPath);
10552
+ if (this.streamingManager) {
10553
+ this.streamingManager.reportLedgerUpdate(1, "goal-violation");
10554
+ }
10521
10555
  const confidenceStr = `${confidence}%`;
10522
10556
  const nudgeMsg = `Goal "${goal.description}" violated in ${issue.file}: ${issue.description} [${confidenceStr} confidence]`;
10523
10557
  console.debug("[AI Watcher] Sending nudge:", {
@@ -10622,7 +10656,7 @@ ${filesBlock}`,
10622
10656
  const projectPath = this.watchedDirectory || getWorkingDirectory(void 0, true);
10623
10657
  console.debug("[Initial Hypothesis] Starting initial hypothesis generation", { projectPath });
10624
10658
  try {
10625
- const { getHypothesisEngine } = await import("./hypothesis-JURDWVDC.js");
10659
+ const { getHypothesisEngine } = await import("./hypothesis-RI3Q33JB.js");
10626
10660
  const hypothesisEngine = getHypothesisEngine(projectPath);
10627
10661
  console.debug("[Initial Hypothesis] Running AI-powered hypothesis generation...");
10628
10662
  const generated = await hypothesisEngine.generateHypothesesWithAI({
@@ -10636,7 +10670,7 @@ ${filesBlock}`,
10636
10670
  hypotheses: generated.map((h) => ({ statement: h.statement, confidence: h.confidence }))
10637
10671
  });
10638
10672
  if (generated.length > 0) {
10639
- const { getOutputManager: getOutputManager2 } = await import("./output-manager-FX4V7ERT.js");
10673
+ const { getOutputManager: getOutputManager2 } = await import("./output-manager-JNMEAXFO.js");
10640
10674
  const outputManager = getOutputManager2();
10641
10675
  for (const hypothesis of generated.slice(0, 2)) {
10642
10676
  const message = `[Initial Hypothesis] "${hypothesis.statement}" (${Math.round(hypothesis.confidence * 100)}% confidence)`;
@@ -10680,7 +10714,7 @@ ${filesBlock}`,
10680
10714
  const projectPath = this.watchedDirectory || getWorkingDirectory(void 0, true);
10681
10715
  console.debug("[Initial Scan] Starting initial goal compliance scan", { projectPath });
10682
10716
  try {
10683
- const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-FU5QWDQT.js");
10717
+ const { getActiveGoals, recordGoalViolationCaught } = await import("./goal-validator-4E5ZLCDH.js");
10684
10718
  const activeGoals = await getActiveGoals(projectPath);
10685
10719
  console.debug("[Initial Scan] Loaded goals for initial scan:", {
10686
10720
  goalCount: activeGoals.length,
@@ -10819,6 +10853,26 @@ ${filesBlock}`,
10819
10853
  }
10820
10854
  if (issuesToStore.length > 0) {
10821
10855
  await storeIssues(issuesToStore, basename(projectPath), projectPath);
10856
+ if (this.streamingManager) {
10857
+ this.streamingManager.reportLedgerUpdate(issuesToStore.length, "goal-violation");
10858
+ }
10859
+ }
10860
+ const { resolveGoalViolation } = await import("./issue-store-DUR5UTYK.js");
10861
+ const { recordGoalViolationFixed } = await import("./goal-validator-4E5ZLCDH.js");
10862
+ const scannedFiles = new Set(issues.map((i) => i.file));
10863
+ const filesWithViolations = new Set(issuesToStore.map((i) => i.file));
10864
+ for (const scannedFile of scannedFiles) {
10865
+ if (!filesWithViolations.has(scannedFile)) {
10866
+ for (const goal of activeGoals) {
10867
+ const resolvedCount = await resolveGoalViolation(scannedFile, goal.description, projectPath);
10868
+ if (resolvedCount > 0) {
10869
+ await recordGoalViolationFixed(goal, scannedFile, projectPath);
10870
+ if (!isInteractiveMode()) {
10871
+ console.error(` [\u2713] Auto-resolved ${resolvedCount} violation(s) in ${scannedFile}`);
10872
+ }
10873
+ }
10874
+ }
10875
+ }
10822
10876
  }
10823
10877
  if (!isInteractiveMode()) {
10824
10878
  if (violationsFound > 0) {
@@ -10843,7 +10897,7 @@ ${filesBlock}`,
10843
10897
  const graph = new ContextGraph(projectPath);
10844
10898
  if (hasLinear) {
10845
10899
  try {
10846
- const { LinearIngester } = await import("./linear-ingester-NHFMKJBZ.js");
10900
+ const { LinearIngester } = await import("./linear-ingester-PLES2BRS.js");
10847
10901
  const ingester = new LinearIngester(projectPath, graph);
10848
10902
  await ingester.syncTickets();
10849
10903
  if (!isInteractiveMode()) {
@@ -10857,7 +10911,7 @@ ${filesBlock}`,
10857
10911
  }
10858
10912
  if (hasGithub) {
10859
10913
  try {
10860
- const { GitHubIngester } = await import("./github-ingester-AR5A4RAC.js");
10914
+ const { GitHubIngester } = await import("./github-ingester-TFBDUDIY.js");
10861
10915
  const ingester = new GitHubIngester(graph);
10862
10916
  const token = await ingester.getApiToken();
10863
10917
  const repoInfo = ingester.getRepoInfo(projectPath);
@@ -10886,7 +10940,7 @@ ${filesBlock}`,
10886
10940
  }]
10887
10941
  };
10888
10942
  }
10889
- for (const watcher of this.watchers.values()) {
10943
+ for (const watcher of Array.from(this.watchers.values())) {
10890
10944
  watcher.close();
10891
10945
  }
10892
10946
  this.watchers.clear();
@@ -10957,7 +11011,7 @@ Use \`trie_watch start\` to begin autonomous scanning.`
10957
11011
  ).join("\n");
10958
11012
  let agencyStatus = "";
10959
11013
  try {
10960
- const { getTrieAgent: getTrieAgent2 } = await import("./trie-agent-QHPS4C5Z.js");
11014
+ const { getTrieAgent: getTrieAgent2 } = await import("./trie-agent-GL3VQPCD.js");
10961
11015
  const trieAgent = getTrieAgent2(this.watchedDirectory || getWorkingDirectory(void 0, true));
10962
11016
  await trieAgent.initialize();
10963
11017
  const status = await trieAgent.getAgencyStatus();
@@ -11094,4 +11148,4 @@ export {
11094
11148
  InteractiveDashboard,
11095
11149
  TrieWatchTool
11096
11150
  };
11097
- //# sourceMappingURL=chunk-QAM5X5HM.js.map
11151
+ //# sourceMappingURL=chunk-LGDZXKC5.js.map