loopctl-mcp-server 2.26.0 → 2.27.0
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/index.js +89 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1050,6 +1050,29 @@ async function knowledgeConflicts({ limit, offset }) {
|
|
|
1050
1050
|
return toContent(result);
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
|
+
async function knowledgeResolveConflict({
|
|
1054
|
+
source_article_id,
|
|
1055
|
+
target_article_id,
|
|
1056
|
+
disposition,
|
|
1057
|
+
authoritative_article_id,
|
|
1058
|
+
classification,
|
|
1059
|
+
evidence,
|
|
1060
|
+
confidence,
|
|
1061
|
+
}) {
|
|
1062
|
+
const payload = { source_article_id, target_article_id, disposition };
|
|
1063
|
+
if (authoritative_article_id) payload.authoritative_article_id = authoritative_article_id;
|
|
1064
|
+
if (classification) payload.classification = classification;
|
|
1065
|
+
if (evidence) payload.evidence = evidence;
|
|
1066
|
+
if (confidence) payload.confidence = confidence;
|
|
1067
|
+
const result = await apiCall(
|
|
1068
|
+
"POST",
|
|
1069
|
+
"/api/v1/knowledge/conflicts/resolve",
|
|
1070
|
+
payload,
|
|
1071
|
+
process.env.LOOPCTL_AGENT_KEY,
|
|
1072
|
+
);
|
|
1073
|
+
return toContent(result);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1053
1076
|
async function knowledgeLint({ project_id, stale_days, min_coverage, max_per_category }) {
|
|
1054
1077
|
const params = new URLSearchParams();
|
|
1055
1078
|
if (stale_days != null) params.set("stale_days", String(stale_days));
|
|
@@ -2925,6 +2948,69 @@ const TOOLS = [
|
|
|
2925
2948
|
required: [],
|
|
2926
2949
|
},
|
|
2927
2950
|
},
|
|
2951
|
+
{
|
|
2952
|
+
name: "knowledge_resolve_conflict",
|
|
2953
|
+
description:
|
|
2954
|
+
"Record YOUR verdict on a potential-conflict pair (from knowledge_conflicts or an " +
|
|
2955
|
+
"article's potential_conflicts). You have the live context the KB lacks — it never " +
|
|
2956
|
+
"re-judges, it acts on what you record. Dispositions: 'dismiss' (a false positive — " +
|
|
2957
|
+
"the two don't actually conflict; drops out of the queue immediately); 'supersede' " +
|
|
2958
|
+
"(one article wins — pass authoritative_article_id, the winner; the nightly executor " +
|
|
2959
|
+
"creates a supersedes link and retires the loser, but ONLY at confidence:\"high\" — " +
|
|
2960
|
+
"reversible and audited); 'merge' (recorded for the later merge step). Non-destructive " +
|
|
2961
|
+
"at agent role — you record intent; the privileged nightly job executes it. " +
|
|
2962
|
+
"Last-write-wins per pair, so re-recording with fresher ground truth overrides. " +
|
|
2963
|
+
"Resolve only conflicts material to your current task; adjudicate against the actual " +
|
|
2964
|
+
"system, and if you can't tell which is right, leave it (or record low confidence) " +
|
|
2965
|
+
"rather than guessing.",
|
|
2966
|
+
inputSchema: {
|
|
2967
|
+
type: "object",
|
|
2968
|
+
properties: {
|
|
2969
|
+
source_article_id: {
|
|
2970
|
+
type: "string",
|
|
2971
|
+
description: "One article of the conflict pair (UUID). Order does not matter.",
|
|
2972
|
+
},
|
|
2973
|
+
target_article_id: {
|
|
2974
|
+
type: "string",
|
|
2975
|
+
description: "The other article of the conflict pair (UUID).",
|
|
2976
|
+
},
|
|
2977
|
+
disposition: {
|
|
2978
|
+
type: "string",
|
|
2979
|
+
enum: ["dismiss", "supersede", "merge"],
|
|
2980
|
+
description:
|
|
2981
|
+
"dismiss = false positive; supersede = one wins (set authoritative_article_id); " +
|
|
2982
|
+
"merge = combine (recorded for the later merge step).",
|
|
2983
|
+
},
|
|
2984
|
+
authoritative_article_id: {
|
|
2985
|
+
type: "string",
|
|
2986
|
+
description:
|
|
2987
|
+
"For supersede/merge: the WINNING article (must be one of the pair). The other " +
|
|
2988
|
+
"is the loser to retire/merge into the winner.",
|
|
2989
|
+
},
|
|
2990
|
+
classification: {
|
|
2991
|
+
type: "string",
|
|
2992
|
+
enum: ["redundant", "complementary", "contradictory"],
|
|
2993
|
+
description:
|
|
2994
|
+
"Your judgment of the relationship: redundant (same claim), complementary (same " +
|
|
2995
|
+
"topic, different facets — usually a dismiss), or contradictory (can't both be true).",
|
|
2996
|
+
},
|
|
2997
|
+
evidence: {
|
|
2998
|
+
type: "string",
|
|
2999
|
+
description:
|
|
3000
|
+
"Why you're sure — ideally a ground-truth reference (commit, file:line, URL, or the " +
|
|
3001
|
+
"observed behavior). Recorded for audit and for a human reviewing low-confidence calls.",
|
|
3002
|
+
},
|
|
3003
|
+
confidence: {
|
|
3004
|
+
type: "string",
|
|
3005
|
+
enum: ["high", "medium", "low"],
|
|
3006
|
+
description:
|
|
3007
|
+
"high, medium, or low. supersede auto-executes only at 'high'; lower confidence is " +
|
|
3008
|
+
"recorded but left for review. Default medium.",
|
|
3009
|
+
},
|
|
3010
|
+
},
|
|
3011
|
+
required: ["source_article_id", "target_article_id", "disposition"],
|
|
3012
|
+
},
|
|
3013
|
+
},
|
|
2928
3014
|
{
|
|
2929
3015
|
name: "knowledge_lint",
|
|
2930
3016
|
description:
|
|
@@ -3548,6 +3634,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
3548
3634
|
case "knowledge_conflicts":
|
|
3549
3635
|
return await knowledgeConflicts(args);
|
|
3550
3636
|
|
|
3637
|
+
case "knowledge_resolve_conflict":
|
|
3638
|
+
return await knowledgeResolveConflict(args);
|
|
3639
|
+
|
|
3551
3640
|
case "knowledge_lint":
|
|
3552
3641
|
return await knowledgeLint(args);
|
|
3553
3642
|
|