@triedotdev/mcp 1.0.115 → 1.0.117

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 (65) hide show
  1. package/dist/{autonomy-config-JXB7WCZ2.js → autonomy-config-QA6ATWLJ.js} +3 -3
  2. package/dist/{chunk-R4AAPFXC.js → chunk-45Y5TLQZ.js} +2 -2
  3. package/dist/{chunk-R4AAPFXC.js.map → chunk-45Y5TLQZ.js.map} +1 -1
  4. package/dist/{chunk-KRH642MT.js → chunk-4BGAVEO6.js} +2 -2
  5. package/dist/{chunk-NS2MSZMB.js → chunk-55CBWOEZ.js} +2 -2
  6. package/dist/{chunk-YR4BMGYO.js → chunk-7Q6I2CB4.js} +2 -2
  7. package/dist/{chunk-TKMV7JKN.js → chunk-DFHMB44X.js} +2 -2
  8. package/dist/{chunk-ZYKEILVK.js → chunk-EWVU7QUG.js} +464 -88
  9. package/dist/chunk-EWVU7QUG.js.map +1 -0
  10. package/dist/{chunk-D3EXBJE2.js → chunk-FNW7Z7ZS.js} +5 -5
  11. package/dist/{chunk-DZREHOGW.js → chunk-I7XKF5XD.js} +5 -5
  12. package/dist/{chunk-2SIFK7OW.js → chunk-IQBHPTV7.js} +4 -4
  13. package/dist/{chunk-AOFYU6T3.js → chunk-OMCEUJ5I.js} +12 -12
  14. package/dist/{chunk-MVNJPJBK.js → chunk-PPZYVTUO.js} +71 -5
  15. package/dist/{chunk-MVNJPJBK.js.map → chunk-PPZYVTUO.js.map} +1 -1
  16. package/dist/{chunk-55DOQNHJ.js → chunk-PRFHN2X6.js} +4 -4
  17. package/dist/{chunk-2GIAROBF.js → chunk-WHIQAGB7.js} +2 -2
  18. package/dist/{chunk-SWSK7ANT.js → chunk-WRGSH5RT.js} +2 -2
  19. package/dist/{chunk-6LXSA2OZ.js → chunk-Y52SNUW5.js} +3 -3
  20. package/dist/{chunk-I2GFI3AM.js → chunk-ZEXMMTIQ.js} +2 -2
  21. package/dist/cli/create-agent.js +1 -1
  22. package/dist/cli/main.js +66 -32
  23. package/dist/cli/main.js.map +1 -1
  24. package/dist/cli/yolo-daemon.js +14 -14
  25. package/dist/{client-7XZHCMD3.js → client-PMKE26IV.js} +3 -3
  26. package/dist/{goal-manager-LMS6ZJB7.js → goal-manager-JKTNFJQE.js} +7 -7
  27. package/dist/goal-validator-YSNN23D4.js +62 -0
  28. package/dist/goal-validator-YSNN23D4.js.map +1 -0
  29. package/dist/{graph-U5JWSAB5.js → graph-PAUZ5EMP.js} +3 -3
  30. package/dist/guardian-agent-UY2G56FT.js +25 -0
  31. package/dist/{hypothesis-KGC3P54C.js → hypothesis-RUCJ74X7.js} +7 -7
  32. package/dist/{incident-index-PNIVT47T.js → incident-index-ZCDSJ42L.js} +3 -3
  33. package/dist/index.js +215 -128
  34. package/dist/index.js.map +1 -1
  35. package/dist/{ledger-SR6OEBLO.js → ledger-JMPGJGLB.js} +3 -3
  36. package/package.json +1 -1
  37. package/dist/auto-fix-apply-PCAHWLXF.js +0 -10
  38. package/dist/chunk-DJ2YAGHK.js +0 -50
  39. package/dist/chunk-DJ2YAGHK.js.map +0 -1
  40. package/dist/chunk-ZYKEILVK.js.map +0 -1
  41. package/dist/goal-validator-T5HEYBC5.js +0 -186
  42. package/dist/goal-validator-T5HEYBC5.js.map +0 -1
  43. package/dist/guardian-agent-EXP7APLC.js +0 -25
  44. package/dist/ledger-SR6OEBLO.js.map +0 -1
  45. /package/dist/{auto-fix-apply-PCAHWLXF.js.map → autonomy-config-QA6ATWLJ.js.map} +0 -0
  46. /package/dist/{chunk-KRH642MT.js.map → chunk-4BGAVEO6.js.map} +0 -0
  47. /package/dist/{chunk-NS2MSZMB.js.map → chunk-55CBWOEZ.js.map} +0 -0
  48. /package/dist/{chunk-YR4BMGYO.js.map → chunk-7Q6I2CB4.js.map} +0 -0
  49. /package/dist/{chunk-TKMV7JKN.js.map → chunk-DFHMB44X.js.map} +0 -0
  50. /package/dist/{chunk-D3EXBJE2.js.map → chunk-FNW7Z7ZS.js.map} +0 -0
  51. /package/dist/{chunk-DZREHOGW.js.map → chunk-I7XKF5XD.js.map} +0 -0
  52. /package/dist/{chunk-2SIFK7OW.js.map → chunk-IQBHPTV7.js.map} +0 -0
  53. /package/dist/{chunk-AOFYU6T3.js.map → chunk-OMCEUJ5I.js.map} +0 -0
  54. /package/dist/{chunk-55DOQNHJ.js.map → chunk-PRFHN2X6.js.map} +0 -0
  55. /package/dist/{chunk-2GIAROBF.js.map → chunk-WHIQAGB7.js.map} +0 -0
  56. /package/dist/{chunk-SWSK7ANT.js.map → chunk-WRGSH5RT.js.map} +0 -0
  57. /package/dist/{chunk-6LXSA2OZ.js.map → chunk-Y52SNUW5.js.map} +0 -0
  58. /package/dist/{chunk-I2GFI3AM.js.map → chunk-ZEXMMTIQ.js.map} +0 -0
  59. /package/dist/{autonomy-config-JXB7WCZ2.js.map → client-PMKE26IV.js.map} +0 -0
  60. /package/dist/{client-7XZHCMD3.js.map → goal-manager-JKTNFJQE.js.map} +0 -0
  61. /package/dist/{goal-manager-LMS6ZJB7.js.map → graph-PAUZ5EMP.js.map} +0 -0
  62. /package/dist/{graph-U5JWSAB5.js.map → guardian-agent-UY2G56FT.js.map} +0 -0
  63. /package/dist/{guardian-agent-EXP7APLC.js.map → hypothesis-RUCJ74X7.js.map} +0 -0
  64. /package/dist/{hypothesis-KGC3P54C.js.map → incident-index-ZCDSJ42L.js.map} +0 -0
  65. /package/dist/{incident-index-PNIVT47T.js.map → ledger-JMPGJGLB.js.map} +0 -0
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  tryGetClient
3
- } from "./chunk-SWSK7ANT.js";
3
+ } from "./chunk-WRGSH5RT.js";
4
4
  import {
5
5
  searchIssues
6
- } from "./chunk-55DOQNHJ.js";
6
+ } from "./chunk-PRFHN2X6.js";
7
7
  import {
8
8
  BackupManager,
9
9
  GlobalPatternsIndexSchema,
10
10
  safeParseAndValidate
11
- } from "./chunk-KRH642MT.js";
11
+ } from "./chunk-4BGAVEO6.js";
12
12
  import {
13
13
  scanForVulnerabilities
14
14
  } from "./chunk-F4NJ4CBP.js";
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-43X6JBEM.js";
21
21
  import {
22
22
  getTrieDirectory
23
- } from "./chunk-R4AAPFXC.js";
23
+ } from "./chunk-45Y5TLQZ.js";
24
24
 
25
25
  // src/memory/global-memory.ts
26
26
  import { mkdir, writeFile, readFile, readdir } from "fs/promises";
@@ -801,4 +801,4 @@ export {
801
801
  getStorage,
802
802
  GotchaPredictor
803
803
  };
804
- //# sourceMappingURL=chunk-D3EXBJE2.js.map
804
+ //# sourceMappingURL=chunk-FNW7Z7ZS.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getInsightStore
3
- } from "./chunk-6LXSA2OZ.js";
3
+ } from "./chunk-Y52SNUW5.js";
4
4
  import {
5
5
  searchIssues
6
- } from "./chunk-55DOQNHJ.js";
6
+ } from "./chunk-PRFHN2X6.js";
7
7
  import {
8
8
  getGuardianState
9
- } from "./chunk-KRH642MT.js";
9
+ } from "./chunk-4BGAVEO6.js";
10
10
 
11
11
  // src/guardian/hypothesis.ts
12
12
  import { dirname } from "path";
@@ -133,7 +133,7 @@ var HypothesisEngine = class {
133
133
  * This enables fully agentic hypothesis creation based on actual codebase observations
134
134
  */
135
135
  async generateHypothesesWithAI(context) {
136
- const { isAIAvailable, runAIAnalysis } = await import("./client-7XZHCMD3.js");
136
+ const { isAIAvailable, runAIAnalysis } = await import("./client-PMKE26IV.js");
137
137
  if (!isAIAvailable()) {
138
138
  return [];
139
139
  }
@@ -703,4 +703,4 @@ export {
703
703
  getHypothesisEngine,
704
704
  clearHypothesisEngines
705
705
  };
706
- //# sourceMappingURL=chunk-DZREHOGW.js.map
706
+ //# sourceMappingURL=chunk-I7XKF5XD.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  getInsightStore
3
- } from "./chunk-6LXSA2OZ.js";
3
+ } from "./chunk-Y52SNUW5.js";
4
4
  import {
5
5
  getMemoryStats,
6
6
  searchIssues
7
- } from "./chunk-55DOQNHJ.js";
7
+ } from "./chunk-PRFHN2X6.js";
8
8
  import {
9
9
  getGuardianState
10
- } from "./chunk-KRH642MT.js";
10
+ } from "./chunk-4BGAVEO6.js";
11
11
 
12
12
  // src/guardian/goal-manager.ts
13
13
  import { basename } from "path";
@@ -627,4 +627,4 @@ export {
627
627
  getGoalManager,
628
628
  clearGoalManagers
629
629
  };
630
- //# sourceMappingURL=chunk-2SIFK7OW.js.map
630
+ //# sourceMappingURL=chunk-IQBHPTV7.js.map
@@ -1,34 +1,34 @@
1
1
  import {
2
2
  getGoalManager
3
- } from "./chunk-2SIFK7OW.js";
3
+ } from "./chunk-IQBHPTV7.js";
4
4
  import {
5
5
  getHypothesisEngine
6
- } from "./chunk-DZREHOGW.js";
6
+ } from "./chunk-I7XKF5XD.js";
7
7
  import {
8
8
  getInsightStore
9
- } from "./chunk-6LXSA2OZ.js";
9
+ } from "./chunk-Y52SNUW5.js";
10
10
  import {
11
11
  GotchaPredictor,
12
12
  findCrossProjectPatterns,
13
13
  recordToGlobalMemory
14
- } from "./chunk-D3EXBJE2.js";
14
+ } from "./chunk-FNW7Z7ZS.js";
15
15
  import {
16
16
  isAIAvailable,
17
17
  runAIAnalysis
18
- } from "./chunk-SWSK7ANT.js";
18
+ } from "./chunk-WRGSH5RT.js";
19
19
  import {
20
20
  autoResolveIssues,
21
21
  getHistoricalInsights,
22
22
  getIssueHash,
23
23
  searchIssues,
24
24
  storeIssues
25
- } from "./chunk-55DOQNHJ.js";
25
+ } from "./chunk-PRFHN2X6.js";
26
26
  import {
27
27
  getGuardianState
28
- } from "./chunk-KRH642MT.js";
28
+ } from "./chunk-4BGAVEO6.js";
29
29
  import {
30
30
  ContextGraph
31
- } from "./chunk-NS2MSZMB.js";
31
+ } from "./chunk-55CBWOEZ.js";
32
32
 
33
33
  // src/guardian/guardian-agent.ts
34
34
  import { basename as basename2 } from "path";
@@ -1672,9 +1672,9 @@ var GuardianAgent = class {
1672
1672
  }
1673
1673
  if (issues.length >= 5 && this.canCreateInsight("pattern-discovery")) {
1674
1674
  try {
1675
- const { IncidentIndex } = await import("./incident-index-PNIVT47T.js");
1675
+ const { IncidentIndex } = await import("./incident-index-ZCDSJ42L.js");
1676
1676
  const { TriePatternDiscovery } = await import("./pattern-discovery-F7LU5K6E.js");
1677
- const { ContextGraph: ContextGraph2 } = await import("./graph-U5JWSAB5.js");
1677
+ const { ContextGraph: ContextGraph2 } = await import("./graph-PAUZ5EMP.js");
1678
1678
  const graph = new ContextGraph2(this.projectPath);
1679
1679
  const incidentIndex = await IncidentIndex.build(graph, this.projectPath);
1680
1680
  const discovery = new TriePatternDiscovery(graph, incidentIndex);
@@ -1910,7 +1910,7 @@ var GuardianAgent = class {
1910
1910
  await this.guardianState.recordScan();
1911
1911
  try {
1912
1912
  const riskLevel = issues.filter((i) => i.severity === "critical").length > 0 ? "critical" : issues.filter((i) => i.severity === "serious").length >= 3 ? "high" : issues.length > 10 ? "medium" : "low";
1913
- const { calculateAdaptiveScanFrequency } = await import("./goal-manager-LMS6ZJB7.js");
1913
+ const { calculateAdaptiveScanFrequency } = await import("./goal-manager-JKTNFJQE.js");
1914
1914
  const result = await calculateAdaptiveScanFrequency(riskLevel);
1915
1915
  await this.guardianState.setScanFrequency(result.frequencyMs);
1916
1916
  } catch {
@@ -2143,4 +2143,4 @@ export {
2143
2143
  GuardianAgent,
2144
2144
  getGuardian
2145
2145
  };
2146
- //# sourceMappingURL=chunk-AOFYU6T3.js.map
2146
+ //# sourceMappingURL=chunk-OMCEUJ5I.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  storeIssues
3
- } from "./chunk-55DOQNHJ.js";
3
+ } from "./chunk-PRFHN2X6.js";
4
4
  import {
5
5
  scanForVulnerabilities
6
6
  } from "./chunk-F4NJ4CBP.js";
@@ -9,17 +9,17 @@ import {
9
9
  } from "./chunk-IXO4G4D3.js";
10
10
  import {
11
11
  ContextGraph
12
- } from "./chunk-NS2MSZMB.js";
12
+ } from "./chunk-55CBWOEZ.js";
13
13
  import {
14
14
  IncidentIndex
15
- } from "./chunk-2GIAROBF.js";
15
+ } from "./chunk-WHIQAGB7.js";
16
16
  import {
17
17
  TriePatternDiscovery
18
18
  } from "./chunk-ZV2K6M7T.js";
19
19
  import {
20
20
  getTrieDirectory,
21
21
  getWorkingDirectory
22
- } from "./chunk-R4AAPFXC.js";
22
+ } from "./chunk-45Y5TLQZ.js";
23
23
  import {
24
24
  isInteractiveMode
25
25
  } from "./chunk-APMV77PU.js";
@@ -472,6 +472,20 @@ async function getUncommittedChanges(projectPath) {
472
472
  }
473
473
  return changes;
474
474
  }
475
+ async function getGitChangedFiles(projectPath) {
476
+ const isRepo = await ensureRepo(projectPath);
477
+ if (!isRepo) return null;
478
+ const [staged, uncommitted] = await Promise.all([
479
+ getStagedChanges(projectPath).catch(() => []),
480
+ getUncommittedChanges(projectPath).catch(() => [])
481
+ ]);
482
+ const paths = /* @__PURE__ */ new Set();
483
+ for (const change of [...staged, ...uncommitted]) {
484
+ if (change.path) paths.add(change.path);
485
+ if (change.oldPath) paths.add(change.oldPath);
486
+ }
487
+ return [...paths];
488
+ }
475
489
  async function getDiff(projectPath, commitHash) {
476
490
  const isRepo = await ensureRepo(projectPath);
477
491
  if (!isRepo) return "";
@@ -485,6 +499,56 @@ async function getWorkingTreeDiff(projectPath, stagedOnly = false) {
485
499
  const diff = await execGit(args, projectPath);
486
500
  return diff ?? "";
487
501
  }
502
+ async function isGitRepo(projectPath) {
503
+ const result = await execGit(["rev-parse", "--is-inside-work-tree"], projectPath);
504
+ return result === "true";
505
+ }
506
+ async function getChangedFilesSinceTimestamp(projectPath, timestamp) {
507
+ const isRepo = await isGitRepo(projectPath);
508
+ if (!isRepo) return null;
509
+ try {
510
+ const sinceDate = new Date(timestamp).toISOString();
511
+ const GIT_TIMEOUT_MS = 5e3;
512
+ const startTime = Date.now();
513
+ const committedChangesPromise = execGit(
514
+ ["log", `--since=${sinceDate}`, "--name-only", "--pretty=format:"],
515
+ projectPath
516
+ );
517
+ const committedChangesTimeout = new Promise((resolve) => {
518
+ setTimeout(() => resolve(null), GIT_TIMEOUT_MS);
519
+ });
520
+ const committedChanges = await Promise.race([committedChangesPromise, committedChangesTimeout]);
521
+ if (Date.now() - startTime > GIT_TIMEOUT_MS) {
522
+ return null;
523
+ }
524
+ const stagedPromise = execGit(["diff", "--cached", "--name-only"], projectPath);
525
+ const unstagedPromise = execGit(["diff", "--name-only"], projectPath);
526
+ const untrackedPromise = execGit(
527
+ ["ls-files", "--others", "--exclude-standard"],
528
+ projectPath
529
+ );
530
+ const timeoutPromise = new Promise((resolve) => {
531
+ setTimeout(() => resolve(null), Math.max(0, GIT_TIMEOUT_MS - (Date.now() - startTime)));
532
+ });
533
+ const [stagedChanges, unstagedChanges, untrackedFiles] = await Promise.race([
534
+ Promise.all([stagedPromise, unstagedPromise, untrackedPromise]),
535
+ timeoutPromise.then(() => [null, null, null])
536
+ ]);
537
+ const changedFiles = /* @__PURE__ */ new Set();
538
+ const addFiles = (output) => {
539
+ if (output) {
540
+ output.split("\n").map((f) => f.trim()).filter(Boolean).forEach((f) => changedFiles.add(path2.join(projectPath, f)));
541
+ }
542
+ };
543
+ addFiles(committedChanges);
544
+ addFiles(stagedChanges);
545
+ addFiles(unstagedChanges);
546
+ addFiles(untrackedFiles);
547
+ return Array.from(changedFiles);
548
+ } catch {
549
+ return null;
550
+ }
551
+ }
488
552
 
489
553
  // src/agent/confidence.ts
490
554
  function adjustConfidence(current, outcome, step = 0.1) {
@@ -1681,6 +1745,8 @@ export {
1681
1745
  runShellCommandSync,
1682
1746
  getStagedChanges,
1683
1747
  getUncommittedChanges,
1748
+ getGitChangedFiles,
1749
+ getChangedFilesSinceTimestamp,
1684
1750
  LearningEngine,
1685
1751
  perceiveCurrentChanges,
1686
1752
  reasonAboutChangesHumanReadable,
@@ -1690,4 +1756,4 @@ export {
1690
1756
  handleCheckpointCommand,
1691
1757
  isTrieInitialized
1692
1758
  };
1693
- //# sourceMappingURL=chunk-MVNJPJBK.js.map
1759
+ //# sourceMappingURL=chunk-PPZYVTUO.js.map