kibi-mcp 0.19.0 → 0.19.2
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/bin/kibi-mcp +1 -1
- package/dist/runtime/mcp-runtime.js +43 -0
- package/dist/server/docs.js +4 -4
- package/dist/server/json-schema-to-zod.js +73 -2
- package/dist/server/session.js +33 -15
- package/dist/server/tool-registration.js +35 -62
- package/dist/server/tools-runtime.js +52 -2
- package/dist/server/tools.js +19 -5
- package/dist/server/transport.js +9 -5
- package/dist/tools/autopilot-generate.js +37 -646
- package/dist/tools/autopilot-test-compat.js +88 -0
- package/dist/tools/autopilot-test-parsers.js +120 -0
- package/dist/tools/check.js +13 -106
- package/dist/tools/coverage.js +11 -25
- package/dist/tools/delete.js +5 -112
- package/dist/tools/discovery-adapter.js +23 -0
- package/dist/tools/entity-query.js +1 -111
- package/dist/tools/find-gaps.js +11 -26
- package/dist/tools/graph.js +11 -24
- package/dist/tools/model-requirement.js +8 -347
- package/dist/tools/mutation-context.js +28 -0
- package/dist/tools/query.js +5 -50
- package/dist/tools/relationship-validation.js +9 -116
- package/dist/tools/search.js +4 -37
- package/dist/tools/semantic-advisor.js +2 -40
- package/dist/tools/skills.js +17 -57
- package/dist/tools/sparql.js +12 -93
- package/dist/tools/status.js +5 -19
- package/dist/tools/suggest-predicates.js +11 -2448
- package/dist/tools/upsert.js +21 -816
- package/dist/tools/validate-upsert.js +12 -48
- package/dist/tools-config.js +75 -802
- package/package.json +4 -3
- package/dist/semantic-advisor/analyze-prose.js +0 -1392
- package/dist/semantic-advisor/prose-coverage-evaluator.js +0 -66
- package/dist/semantic-advisor/types.js +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { analyzeSemanticAdvisorInput } from "./analyze-prose.js";
|
|
2
|
-
export function evaluateProseCoverageCorpus(cases) {
|
|
3
|
-
const failures = cases.flatMap((testCase) => evaluateCase(testCase));
|
|
4
|
-
const passed = cases.length - failures.length;
|
|
5
|
-
return {
|
|
6
|
-
coverage: cases.length === 0 ? 1 : passed / cases.length,
|
|
7
|
-
summary: {
|
|
8
|
-
total: cases.length,
|
|
9
|
-
passed,
|
|
10
|
-
failed: failures.length,
|
|
11
|
-
},
|
|
12
|
-
failures,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
function evaluateCase(testCase) {
|
|
16
|
-
const result = analyzeSemanticAdvisorInput({
|
|
17
|
-
payload: {
|
|
18
|
-
type: "req",
|
|
19
|
-
id: `REQ-CORPUS-${testCase.id}`,
|
|
20
|
-
properties: {
|
|
21
|
-
title: testCase.id,
|
|
22
|
-
status: "open",
|
|
23
|
-
source: "mcp://kibi/prose-coverage-corpus",
|
|
24
|
-
text_ref: testCase.text,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
const suggestion = result.receipt.suggestions[0];
|
|
29
|
-
if (!suggestion) {
|
|
30
|
-
return [failure(testCase, "No semantic advisor suggestion was produced")];
|
|
31
|
-
}
|
|
32
|
-
if (suggestion.kind !== testCase.expected.kind) {
|
|
33
|
-
return [
|
|
34
|
-
failure(testCase, `Expected ${testCase.expected.kind} but received ${suggestion.kind}`),
|
|
35
|
-
];
|
|
36
|
-
}
|
|
37
|
-
if (testCase.expected.kind === "predicate" &&
|
|
38
|
-
testCase.expected.predicate_name &&
|
|
39
|
-
suggestion.kind === "predicate" &&
|
|
40
|
-
suggestion.predicate.predicate_name !== testCase.expected.predicate_name) {
|
|
41
|
-
return [
|
|
42
|
-
failure(testCase, `Expected predicate ${testCase.expected.predicate_name} but received ${suggestion.predicate.predicate_name}`),
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
if (testCase.expected.kind === "strict_property") {
|
|
46
|
-
if (suggestion.kind !== "strict_property") {
|
|
47
|
-
return [failure(testCase, "Expected strict property suggestion")];
|
|
48
|
-
}
|
|
49
|
-
if (testCase.expected.property_key &&
|
|
50
|
-
suggestion.claim.property_key !== testCase.expected.property_key) {
|
|
51
|
-
return [
|
|
52
|
-
failure(testCase, `Expected property ${testCase.expected.property_key} but received ${suggestion.claim.property_key}`),
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
if (testCase.expected.operator &&
|
|
56
|
-
suggestion.claim.operator !== testCase.expected.operator) {
|
|
57
|
-
return [
|
|
58
|
-
failure(testCase, `Expected operator ${testCase.expected.operator} but received ${suggestion.claim.operator}`),
|
|
59
|
-
];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
function failure(testCase, reason) {
|
|
65
|
-
return { id: testCase.id, text: testCase.text, reason };
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|