midnight-mcp 0.0.7 → 0.0.8
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 +3 -1
- package/dist/tools/repository.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# Midnight MCP Server
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/midnight-mcp)
|
|
4
|
-
[](https://www.npmjs.com/package/midnight-mcp)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
5
7
|
[](https://github.com/Olanetsoft/midnight-mcp/actions/workflows/ci.yml)
|
|
6
8
|
|
|
7
9
|
MCP server that gives AI assistants access to Midnight blockchain—search contracts, analyze code, and explore documentation.
|
package/dist/tools/repository.js
CHANGED
|
@@ -171,7 +171,9 @@ const EXAMPLES = [
|
|
|
171
171
|
* Resolve repository name alias to owner/repo
|
|
172
172
|
*/
|
|
173
173
|
function resolveRepo(repoName) {
|
|
174
|
-
|
|
174
|
+
// Default to compact if not provided
|
|
175
|
+
const name = repoName || "compact";
|
|
176
|
+
const normalized = name.toLowerCase().replace(/^midnightntwrk\//, "");
|
|
175
177
|
const alias = REPO_ALIASES[normalized];
|
|
176
178
|
if (alias)
|
|
177
179
|
return alias;
|
|
@@ -182,8 +184,8 @@ function resolveRepo(repoName) {
|
|
|
182
184
|
}
|
|
183
185
|
}
|
|
184
186
|
// Assume it's a full org/repo name
|
|
185
|
-
if (
|
|
186
|
-
const [owner, repo] =
|
|
187
|
+
if (name.includes("/")) {
|
|
188
|
+
const [owner, repo] = name.split("/");
|
|
187
189
|
return { owner, repo };
|
|
188
190
|
}
|
|
189
191
|
return null;
|