loopctl-mcp-server 2.29.0 → 2.30.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 +50 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1163,6 +1163,20 @@ async function knowledgeRetrievalMetrics({ limit, offset } = {}) {
|
|
|
1163
1163
|
return toContent(result);
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
1166
|
+
async function knowledgeCurationLog({ kind, since, limit, offset } = {}) {
|
|
1167
|
+
const params = new URLSearchParams();
|
|
1168
|
+
if (kind) params.set("kind", kind);
|
|
1169
|
+
if (since) params.set("since", since);
|
|
1170
|
+
if (limit != null) params.set("limit", String(limit));
|
|
1171
|
+
if (offset != null) params.set("offset", String(offset));
|
|
1172
|
+
const qs = params.toString();
|
|
1173
|
+
const path = qs
|
|
1174
|
+
? `/api/v1/knowledge/curation-log?${qs}`
|
|
1175
|
+
: "/api/v1/knowledge/curation-log";
|
|
1176
|
+
const result = await apiCall("GET", path, null, process.env.LOOPCTL_ORCH_KEY);
|
|
1177
|
+
return toContent(result);
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1166
1180
|
async function knowledgeArticleStats({ article_id }) {
|
|
1167
1181
|
const result = await apiCall(
|
|
1168
1182
|
"GET",
|
|
@@ -3266,6 +3280,39 @@ const TOOLS = [
|
|
|
3266
3280
|
},
|
|
3267
3281
|
|
|
3268
3282
|
// Knowledge Analytics Tools (orchestrator key)
|
|
3283
|
+
{
|
|
3284
|
+
name: "knowledge_curation_log",
|
|
3285
|
+
description:
|
|
3286
|
+
"The concise, human-readable log of KB CURATION adjustments — novelty-gate decisions " +
|
|
3287
|
+
"(gate_duplicate/gate_draft) and conflict resolutions (supersede/merge/dismiss) — for " +
|
|
3288
|
+
"analyzing the agents'-KB rollout, distinct from the verbose audit log. Each entry is a " +
|
|
3289
|
+
"one-liner: {at, kind, summary, refs, actor, confidence}. RECORDED ONLY while the tenant " +
|
|
3290
|
+
"has the toggle on: settings.kb_curation_log (flip via the admin tenant API, " +
|
|
3291
|
+
"PATCH /api/v1/admin/tenants/:id with settings:{kb_curation_log:true}). Off by default = " +
|
|
3292
|
+
"no rows. Filter by kind and since (ISO8601). Most recent first. Requires orchestrator role.",
|
|
3293
|
+
inputSchema: {
|
|
3294
|
+
type: "object",
|
|
3295
|
+
properties: {
|
|
3296
|
+
kind: {
|
|
3297
|
+
type: "string",
|
|
3298
|
+
description:
|
|
3299
|
+
"Optional: filter by kind (gate_duplicate | gate_draft | supersede | merge | dismiss).",
|
|
3300
|
+
},
|
|
3301
|
+
since: {
|
|
3302
|
+
type: "string",
|
|
3303
|
+
description: "Optional: ISO8601 date or datetime lower bound (inclusive).",
|
|
3304
|
+
},
|
|
3305
|
+
limit: {
|
|
3306
|
+
type: "integer",
|
|
3307
|
+
description: "Events per page (default 50, max 500). Clamped, never rejected.",
|
|
3308
|
+
minimum: 1,
|
|
3309
|
+
maximum: 500,
|
|
3310
|
+
},
|
|
3311
|
+
offset: { type: "integer", description: "Events to skip. Default 0.", minimum: 0 },
|
|
3312
|
+
},
|
|
3313
|
+
required: [],
|
|
3314
|
+
},
|
|
3315
|
+
},
|
|
3269
3316
|
{
|
|
3270
3317
|
name: "knowledge_retrieval_metrics",
|
|
3271
3318
|
description:
|
|
@@ -3708,6 +3755,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
3708
3755
|
return await knowledgeIngestionJobs();
|
|
3709
3756
|
|
|
3710
3757
|
// Knowledge Analytics Tools
|
|
3758
|
+
case "knowledge_curation_log":
|
|
3759
|
+
return await knowledgeCurationLog(args);
|
|
3760
|
+
|
|
3711
3761
|
case "knowledge_retrieval_metrics":
|
|
3712
3762
|
return await knowledgeRetrievalMetrics(args);
|
|
3713
3763
|
|