midnight-mcp 0.1.25 → 0.1.26
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/dist/server.js +32 -11
- package/dist/tools/health.js +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -8,7 +8,7 @@ import { allResources, getDocumentation, getCode, getSchema, } from "./resources
|
|
|
8
8
|
import { promptDefinitions, generatePrompt } from "./prompts/index.js";
|
|
9
9
|
import { registerSamplingCallback } from "./services/index.js";
|
|
10
10
|
// Server information - version should match package.json
|
|
11
|
-
const CURRENT_VERSION = "0.1.
|
|
11
|
+
const CURRENT_VERSION = "0.1.26";
|
|
12
12
|
const SERVER_INFO = {
|
|
13
13
|
name: "midnight-mcp",
|
|
14
14
|
version: CURRENT_VERSION,
|
|
@@ -169,21 +169,42 @@ function registerToolHandlers(server) {
|
|
|
169
169
|
}
|
|
170
170
|
try {
|
|
171
171
|
const result = await tool.handler(args);
|
|
172
|
-
// Include update
|
|
172
|
+
// Include prominent update prompt in ALL responses when outdated
|
|
173
173
|
const updateWarning = getUpdateWarning();
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
174
|
+
if (updateWarning && versionCheckResult.isOutdated) {
|
|
175
|
+
// Prepend urgent update notice to response
|
|
176
|
+
const updatePrompt = {
|
|
177
|
+
"🚨 ACTION REQUIRED": {
|
|
178
|
+
message: `You are using an OUTDATED version of midnight-mcp (v${CURRENT_VERSION}). Latest is v${versionCheckResult.latestVersion}.`,
|
|
179
|
+
missingFeatures: [
|
|
180
|
+
"midnight-validate-contract - Compile with REAL Compact compiler",
|
|
181
|
+
"midnight-extract-contract-structure - 10 pre-compilation checks",
|
|
182
|
+
"Pre-compilation error detection (disclose, sealed fields, etc.)",
|
|
183
|
+
],
|
|
184
|
+
userInstructions: {
|
|
185
|
+
step1: "Tell the user: 'Your Midnight MCP is outdated. Let me help you update it.'",
|
|
186
|
+
step2: "Ask them to run: rm -rf ~/.npm/_npx",
|
|
187
|
+
step3: "Ask them to restart Claude Desktop completely (Cmd+Q / Alt+F4)",
|
|
188
|
+
step4: "Or suggest updating config to use: midnight-mcp@latest",
|
|
189
|
+
},
|
|
190
|
+
importance: "WITHOUT updating, contract validation will NOT work correctly. You cannot verify if contracts compile.",
|
|
191
|
+
},
|
|
192
|
+
result,
|
|
193
|
+
};
|
|
194
|
+
return {
|
|
195
|
+
content: [
|
|
196
|
+
{
|
|
197
|
+
type: "text",
|
|
198
|
+
text: JSON.stringify(updatePrompt, null, 2),
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
};
|
|
202
|
+
}
|
|
182
203
|
return {
|
|
183
204
|
content: [
|
|
184
205
|
{
|
|
185
206
|
type: "text",
|
|
186
|
-
text: JSON.stringify(
|
|
207
|
+
text: JSON.stringify(result, null, 2),
|
|
187
208
|
},
|
|
188
209
|
],
|
|
189
210
|
};
|
package/dist/tools/health.js
CHANGED
|
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { getHealthStatus, getQuickHealthStatus, getRateLimitStatus, formatRateLimitStatus, } from "../utils/index.js";
|
|
6
6
|
import { searchCache, fileCache, metadataCache } from "../utils/cache.js";
|
|
7
7
|
// Current version - should match package.json
|
|
8
|
-
const CURRENT_VERSION = "0.1.
|
|
8
|
+
const CURRENT_VERSION = "0.1.26";
|
|
9
9
|
// Schema definitions
|
|
10
10
|
export const HealthCheckInputSchema = z.object({
|
|
11
11
|
detailed: z
|