@triedotdev/mcp 1.0.3 → 1.0.4

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.
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  TrieFixTool,
4
4
  TrieScanTool
5
- } from "../chunk-E7CKHS3R.js";
5
+ } from "../chunk-6INDJQPJ.js";
6
6
  import "../chunk-3CS6Z2SL.js";
7
7
  import "../chunk-MR755QGT.js";
8
8
  import "../chunk-6NLHFIYA.js";
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  TrieScanTool,
11
11
  getPrompt,
12
12
  getSystemPrompt
13
- } from "./chunk-E7CKHS3R.js";
13
+ } from "./chunk-6INDJQPJ.js";
14
14
  import "./chunk-3CS6Z2SL.js";
15
15
  import "./chunk-MR755QGT.js";
16
16
  import "./chunk-6NLHFIYA.js";
@@ -2078,11 +2078,22 @@ var AGENT_TO_AI_TYPE = {
2078
2078
  };
2079
2079
  var TrieAgentTool = class {
2080
2080
  agentRegistry = new AgentRegistry();
2081
+ customAgentsLoaded = false;
2082
+ /**
2083
+ * Ensure custom agents are loaded before using the registry
2084
+ */
2085
+ async ensureCustomAgentsLoaded() {
2086
+ if (!this.customAgentsLoaded) {
2087
+ await this.agentRegistry.loadCustomAgents();
2088
+ this.customAgentsLoaded = true;
2089
+ }
2090
+ }
2081
2091
  async execute(args) {
2082
2092
  const { agent, files, directory, depth = "standard", lookup, output = "full" } = args;
2083
2093
  if (lookup) {
2084
2094
  return this.handleKnowledgeLookup(lookup);
2085
2095
  }
2096
+ await this.ensureCustomAgentsLoaded();
2086
2097
  if (!agent) {
2087
2098
  return this.listAgents();
2088
2099
  }