midnight-mcp 0.1.22 → 0.1.23
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/tools/analyze.js
CHANGED
|
@@ -377,7 +377,11 @@ const explainCircuitOutputSchema = {
|
|
|
377
377
|
export const analyzeTools = [
|
|
378
378
|
{
|
|
379
379
|
name: "midnight-analyze-contract",
|
|
380
|
-
description: "
|
|
380
|
+
description: "⚠️ STATIC ANALYSIS ONLY - Analyze contract structure and patterns. " +
|
|
381
|
+
"🚫 THIS DOES NOT COMPILE THE CONTRACT. Cannot catch: sealed field rules, disclose() requirements, semantic errors. " +
|
|
382
|
+
"👉 ALWAYS call 'midnight-validate-contract' FIRST to verify the code actually compiles. " +
|
|
383
|
+
"Use this for: understanding structure, security pattern analysis, recommendations. " +
|
|
384
|
+
"NEVER claim a contract 'works' or 'compiles' based on this tool alone.",
|
|
381
385
|
inputSchema: {
|
|
382
386
|
type: "object",
|
|
383
387
|
properties: {
|
|
@@ -358,7 +358,13 @@ export const repositoryTools = [
|
|
|
358
358
|
// ============================================================================
|
|
359
359
|
{
|
|
360
360
|
name: "midnight-validate-contract",
|
|
361
|
-
description: "
|
|
361
|
+
description: "� REQUIRED - ALWAYS CALL THIS FIRST: Compile a Compact contract using the REAL compiler. " +
|
|
362
|
+
"⚠️ CRITICAL: You MUST call this tool BEFORE telling the user a contract works or is correct. " +
|
|
363
|
+
"Static analysis tools like 'extract-contract-structure' or 'analyze-contract' CANNOT verify compilation - they miss semantic errors like: " +
|
|
364
|
+
"(1) sealed fields require constructor, (2) constructor params need disclose(), (3) export circuits cannot modify sealed fields. " +
|
|
365
|
+
"This tool runs the ACTUAL Compact compiler and returns real errors with line numbers. " +
|
|
366
|
+
"If compiler not installed, it provides installation instructions. " +
|
|
367
|
+
"WORKFLOW: Generate code → Call this tool → Fix errors → Repeat until success → THEN present to user.",
|
|
362
368
|
inputSchema: {
|
|
363
369
|
type: "object",
|
|
364
370
|
properties: {
|
|
@@ -454,7 +460,12 @@ export const repositoryTools = [
|
|
|
454
460
|
},
|
|
455
461
|
{
|
|
456
462
|
name: "midnight-extract-contract-structure",
|
|
457
|
-
description: "
|
|
463
|
+
description: "⚠️ STATIC ANALYSIS ONLY - NOT A COMPILER: Extracts contract structure (circuits, witnesses, ledger) and detects common patterns. " +
|
|
464
|
+
"🚫 THIS TOOL CANNOT VERIFY COMPILATION. It will NOT catch: sealed field rules, disclose() requirements, type mismatches, or semantic errors. " +
|
|
465
|
+
"✅ USE FOR: Understanding structure, quick pattern checks, fallback when compiler unavailable. " +
|
|
466
|
+
"❌ NEVER USE TO: Verify a contract works, claim code 'compiles correctly', or validate before presenting to user. " +
|
|
467
|
+
"👉 ALWAYS call 'midnight-validate-contract' FIRST to actually compile the code. " +
|
|
468
|
+
"Detects: module-level const, stdlib collisions, sealed+export conflicts, missing disclose(), Counter.value access, division operator.",
|
|
458
469
|
inputSchema: {
|
|
459
470
|
type: "object",
|
|
460
471
|
properties: {
|