@triedotdev/mcp 1.0.112 → 1.0.113

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.
@@ -2499,11 +2499,6 @@ function MemoryTreeView() {
2499
2499
  n.data.changeCount,
2500
2500
  " changes"
2501
2501
  ] }),
2502
- n.data.incidentCount > 0 && /* @__PURE__ */ jsxs9(Text9, { color: "red", children: [
2503
- " ",
2504
- n.data.incidentCount,
2505
- " incidents"
2506
- ] }),
2507
2502
  n.data.whyRisky && /* @__PURE__ */ jsxs9(Text9, { dimColor: true, children: [
2508
2503
  " ",
2509
2504
  n.data.whyRisky
@@ -5050,6 +5045,17 @@ var CHAT_TOOLS = [
5050
5045
  required: ["statement"]
5051
5046
  }
5052
5047
  },
5048
+ {
5049
+ name: "trie_delete_incident",
5050
+ description: "Delete an incident from the ledger. Use when the user says an incident was logged by mistake, is misclassified, or should be removed.",
5051
+ input_schema: {
5052
+ type: "object",
5053
+ properties: {
5054
+ search: { type: "string", description: "Text to match against incident descriptions to find the one to delete" }
5055
+ },
5056
+ required: ["search"]
5057
+ }
5058
+ },
5053
5059
  {
5054
5060
  name: "trie_add_decision",
5055
5061
  description: "Record an architectural or coding decision. Use when the user makes, announces, or wants to log a decision about the codebase.",
@@ -5153,6 +5159,22 @@ async function executeTool(name, input) {
5153
5159
  await agentState.addHypothesis(hypothesis);
5154
5160
  return `Hypothesis created: "${stmt}" [${category}]`;
5155
5161
  }
5162
+ case "trie_delete_incident": {
5163
+ const search = String(input.search || "").trim().toLowerCase();
5164
+ if (!search) return "Search text is required to find the incident.";
5165
+ const graph = new ContextGraph(directory);
5166
+ const nodes = await graph.listNodes();
5167
+ const incidents = nodes.filter(
5168
+ (n) => n.type === "incident" && n.data.description?.toLowerCase().includes(search)
5169
+ );
5170
+ if (incidents.length === 0) return `No incidents found matching "${search}".`;
5171
+ for (const inc of incidents) {
5172
+ await graph.deleteNode("incident", inc.id);
5173
+ }
5174
+ await exportToJson(graph);
5175
+ const descs = incidents.map((i) => `"${i.data.description.slice(0, 60)}"`);
5176
+ return `Deleted ${incidents.length} incident(s): ${descs.join(", ")}`;
5177
+ }
5156
5178
  case "trie_add_decision": {
5157
5179
  const dec = String(input.decision || "").trim();
5158
5180
  const ctx = String(input.context || "").trim();
@@ -5308,7 +5330,37 @@ ${contextBlock}`;
5308
5330
  role: "assistant",
5309
5331
  content: result.content
5310
5332
  };
5311
- if (result.toolCalls && result.toolCalls.length > 0) action.toolCalls = result.toolCalls;
5333
+ if (result.toolCalls && result.toolCalls.length > 0) {
5334
+ action.toolCalls = result.toolCalls;
5335
+ const toolNames = new Set(result.toolCalls.map((tc) => tc.name));
5336
+ if (toolNames.has("trie_add_goal") || toolNames.has("trie_add_hypothesis")) {
5337
+ try {
5338
+ const agentState = getGuardianState(workDir);
5339
+ await agentState.load();
5340
+ if (toolNames.has("trie_add_goal")) {
5341
+ const goals = agentState.getAllGoals();
5342
+ dispatch({
5343
+ type: "SET_GOALS",
5344
+ goals: goals.map((g) => {
5345
+ const base = { id: g.id, description: g.description, type: g.type, target: g.target, currentValue: g.currentValue, status: g.status, autoGenerated: g.autoGenerated, updatedAt: g.updatedAt };
5346
+ return g.category ? { ...base, category: g.category } : base;
5347
+ })
5348
+ });
5349
+ }
5350
+ if (toolNames.has("trie_add_hypothesis")) {
5351
+ const hypotheses = agentState.getAllHypotheses();
5352
+ dispatch({
5353
+ type: "SET_HYPOTHESES",
5354
+ hypotheses: hypotheses.map((h) => {
5355
+ const base = { id: h.id, statement: h.statement, confidence: h.confidence, status: h.status, evidenceCount: h.evidence.length, updatedAt: h.updatedAt };
5356
+ return h.category ? { ...base, category: h.category } : base;
5357
+ })
5358
+ });
5359
+ }
5360
+ } catch {
5361
+ }
5362
+ }
5363
+ }
5312
5364
  dispatch(action);
5313
5365
  } else {
5314
5366
  dispatch({
@@ -5705,4 +5757,4 @@ export {
5705
5757
  handleCheckpointTool,
5706
5758
  InteractiveDashboard
5707
5759
  };
5708
- //# sourceMappingURL=chunk-WBAWHEYX.js.map
5760
+ //# sourceMappingURL=chunk-2764KZZQ.js.map