@triedotdev/mcp 1.0.147 → 1.0.148
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.
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Trie:
|
|
1
|
+
# Trie: A trainable AI agent with cryptographic governance and portable context
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
**The ledger that keeps your work compliant when agents and humans ship together.**
|
|
@@ -6908,6 +6908,28 @@ function formatNudges(nudges) {
|
|
|
6908
6908
|
}
|
|
6909
6909
|
return out;
|
|
6910
6910
|
}
|
|
6911
|
+
function formatIncidents(incidents) {
|
|
6912
|
+
if (incidents.length === 0) return "No incidents found.";
|
|
6913
|
+
let out = `Found ${incidents.length} incident(s):
|
|
6914
|
+
|
|
6915
|
+
`;
|
|
6916
|
+
for (const inc of incidents) {
|
|
6917
|
+
const emoji = inc.severity === "critical" ? "\u{1F534}" : inc.severity === "major" ? "\u{1F7E0}" : "\u{1F7E1}";
|
|
6918
|
+
const status = inc.resolved ? "\u2705 RESOLVED" : "\u26A0\uFE0F ACTIVE";
|
|
6919
|
+
out += `${emoji} [${inc.severity.toUpperCase()}] ${status}
|
|
6920
|
+
`;
|
|
6921
|
+
out += ` ${inc.description}
|
|
6922
|
+
`;
|
|
6923
|
+
if (inc.affectedUsers != null) {
|
|
6924
|
+
out += ` Affected Users: ${inc.affectedUsers}
|
|
6925
|
+
`;
|
|
6926
|
+
}
|
|
6927
|
+
out += ` Reported: ${new Date(inc.timestamp).toLocaleString()}
|
|
6928
|
+
`;
|
|
6929
|
+
out += "\n";
|
|
6930
|
+
}
|
|
6931
|
+
return out;
|
|
6932
|
+
}
|
|
6911
6933
|
var TrieQueryContextTool = class {
|
|
6912
6934
|
async execute(input) {
|
|
6913
6935
|
const workDir = input.directory || getWorkingDirectory(void 0, true);
|
|
@@ -6923,6 +6945,7 @@ var TrieQueryContextTool = class {
|
|
|
6923
6945
|
const includeNudges = !input.type || input.type === "nudges" || input.type === "all";
|
|
6924
6946
|
const includeGovernance = !input.type || input.type === "governance" || input.type === "decisions" || input.type === "all";
|
|
6925
6947
|
const includeBlockers = !input.type || input.type === "blockers" || input.type === "all";
|
|
6948
|
+
const includeIncidents = !input.type || input.type === "incidents" || input.type === "all";
|
|
6926
6949
|
if (includeGoals) {
|
|
6927
6950
|
try {
|
|
6928
6951
|
const projectState = getProjectState(workDir);
|
|
@@ -7033,6 +7056,42 @@ var TrieQueryContextTool = class {
|
|
|
7033
7056
|
output += new TrieGetBlockersTool().formatBlockers(matches);
|
|
7034
7057
|
}
|
|
7035
7058
|
}
|
|
7059
|
+
if (includeIncidents) {
|
|
7060
|
+
try {
|
|
7061
|
+
const { ContextGraph: ContextGraph2 } = await import("./graph-J4OGTYCO.js");
|
|
7062
|
+
const graph = new ContextGraph2(workDir);
|
|
7063
|
+
const allNodes = await graph.listNodes();
|
|
7064
|
+
const incidentNodes = allNodes.filter((n) => n.type === "incident");
|
|
7065
|
+
const matches = incidentNodes.filter((n) => {
|
|
7066
|
+
const data = n.data;
|
|
7067
|
+
if (keywords.length > 0 && !keywords.some((kw) => kw === "incident" || kw === "incidents" || kw === "all")) {
|
|
7068
|
+
return keywords.some(
|
|
7069
|
+
(kw) => data.description.toLowerCase().includes(kw) || data.severity.toLowerCase().includes(kw)
|
|
7070
|
+
);
|
|
7071
|
+
}
|
|
7072
|
+
return true;
|
|
7073
|
+
}).slice(0, limit);
|
|
7074
|
+
if (matches.length > 0) {
|
|
7075
|
+
output += `\u{1F6A8} INCIDENTS (${matches.length}):
|
|
7076
|
+
`;
|
|
7077
|
+
output += formatIncidents(matches.map((n) => {
|
|
7078
|
+
const data = n.data;
|
|
7079
|
+
return {
|
|
7080
|
+
description: data.description,
|
|
7081
|
+
severity: data.severity,
|
|
7082
|
+
timestamp: data.timestamp,
|
|
7083
|
+
resolved: data.resolved,
|
|
7084
|
+
affectedUsers: data.affectedUsers
|
|
7085
|
+
};
|
|
7086
|
+
}));
|
|
7087
|
+
output += "\n";
|
|
7088
|
+
}
|
|
7089
|
+
} catch (e) {
|
|
7090
|
+
output += `(Incidents unavailable: ${e instanceof Error ? e.message : "unknown"})
|
|
7091
|
+
|
|
7092
|
+
`;
|
|
7093
|
+
}
|
|
7094
|
+
}
|
|
7036
7095
|
return {
|
|
7037
7096
|
content: [{
|
|
7038
7097
|
type: "text",
|
|
@@ -7736,12 +7795,12 @@ var CHAT_TOOLS = [
|
|
|
7736
7795
|
},
|
|
7737
7796
|
{
|
|
7738
7797
|
name: "trie_query_context",
|
|
7739
|
-
description: 'Natural-language search across ALL Trie context: goals, hypotheses, nudges (goal violations), governance, blockers, facts, and questions. Use for "what are my goals", "show hypotheses", "any nudges", "recent governance", etc.',
|
|
7798
|
+
description: 'Natural-language search across ALL Trie context: goals, hypotheses, nudges (goal violations), incidents, governance, blockers, facts, and questions. Use for "what are my goals", "show hypotheses", "any nudges", "show incidents", "recent governance", etc.',
|
|
7740
7799
|
input_schema: {
|
|
7741
7800
|
type: "object",
|
|
7742
7801
|
properties: {
|
|
7743
|
-
query: { type: "string", description: 'Natural language search query (e.g. "goals", "hypotheses", "nudges", "governance")' },
|
|
7744
|
-
type: { type: "string", enum: ["goals", "hypotheses", "nudges", "governance", "decisions", "blockers", "facts", "questions", "all"], description: "Narrow to a specific category (default all)" },
|
|
7802
|
+
query: { type: "string", description: 'Natural language search query (e.g. "goals", "hypotheses", "nudges", "incidents", "governance")' },
|
|
7803
|
+
type: { type: "string", enum: ["goals", "hypotheses", "nudges", "incidents", "governance", "decisions", "blockers", "facts", "questions", "all"], description: "Narrow to a specific category (default all)" },
|
|
7745
7804
|
limit: { type: "number", description: "Max results (default 10)" }
|
|
7746
7805
|
},
|
|
7747
7806
|
required: ["query"]
|
|
@@ -9679,4 +9738,4 @@ export {
|
|
|
9679
9738
|
GitHubBranchesTool,
|
|
9680
9739
|
InteractiveDashboard
|
|
9681
9740
|
};
|
|
9682
|
-
//# sourceMappingURL=chunk-
|
|
9741
|
+
//# sourceMappingURL=chunk-J7CEBSEB.js.map
|