kibi-mcp 0.19.0 → 0.20.1
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/diagnostics.js +8 -1
- package/dist/runtime/mcp-runtime.js +43 -0
- package/dist/server/docs.js +5 -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/startup-resolution.js +26 -9
- 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 +9 -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
|
@@ -44,6 +44,20 @@ function nearestPackageJson(startPath) {
|
|
|
44
44
|
current = parent;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
function nearestPackageJsonFromDirectory(startPath) {
|
|
48
|
+
let current = path.resolve(startPath);
|
|
49
|
+
while (true) {
|
|
50
|
+
const candidate = path.join(current, "package.json");
|
|
51
|
+
if (existsSync(candidate)) {
|
|
52
|
+
return candidate;
|
|
53
|
+
}
|
|
54
|
+
const parent = path.dirname(current);
|
|
55
|
+
if (parent === current) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
current = parent;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
47
61
|
function packageInfoFromEntrypoint(entrypoint) {
|
|
48
62
|
const normalizedEntrypoint = path.resolve(entrypoint);
|
|
49
63
|
const packageJsonPath = nearestPackageJson(normalizedEntrypoint);
|
|
@@ -62,7 +76,11 @@ export function readRunningPackageInfo(entrypointUrl) {
|
|
|
62
76
|
}
|
|
63
77
|
export function resolveProjectLocalMcp(cwd) {
|
|
64
78
|
try {
|
|
65
|
-
const
|
|
79
|
+
const projectPackageJson = nearestPackageJsonFromDirectory(cwd);
|
|
80
|
+
if (!projectPackageJson) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const projectRequire = createRequire(projectPackageJson);
|
|
66
84
|
const resolved = projectRequire.resolve(PACKAGE_NAME);
|
|
67
85
|
const entrypoint = realpathSync.native?.(resolved) ?? realpathSync(resolved);
|
|
68
86
|
return packageInfoFromEntrypoint(entrypoint);
|
|
@@ -76,6 +94,7 @@ export function resolveProjectLocalMcp(cwd) {
|
|
|
76
94
|
}
|
|
77
95
|
}
|
|
78
96
|
export function compareMcpResolution(running, projectLocal) {
|
|
97
|
+
// implements REQ-cursor-agent-plugin-standard-v1
|
|
79
98
|
const diagnosticText = JSON.stringify({ running, projectLocal });
|
|
80
99
|
const forbiddenVersionObserved = diagnosticText.includes(FORBIDDEN_VERSION);
|
|
81
100
|
if (!projectLocal) {
|
|
@@ -92,16 +111,14 @@ export function compareMcpResolution(running, projectLocal) {
|
|
|
92
111
|
forbiddenVersionObserved,
|
|
93
112
|
};
|
|
94
113
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
};
|
|
101
|
-
}
|
|
114
|
+
// Same version: the running build is the version the project pins. Re-entering
|
|
115
|
+
// a same-version copy (e.g. a bun-store published install) abandons the local
|
|
116
|
+
// dev build for an identical-version store copy, which defeats local
|
|
117
|
+
// dogfooding and can silently drop unreleased local fixes. Only re-enter on a
|
|
118
|
+
// genuine version mismatch.
|
|
102
119
|
return {
|
|
103
120
|
stale: false,
|
|
104
|
-
reason: "running kibi-mcp matches project-local
|
|
121
|
+
reason: "running kibi-mcp matches the project-local version",
|
|
105
122
|
forbiddenVersionObserved,
|
|
106
123
|
};
|
|
107
124
|
}
|