midnight-mcp 0.1.19 → 0.1.20
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.
|
@@ -358,7 +358,7 @@ export const repositoryTools = [
|
|
|
358
358
|
// ============================================================================
|
|
359
359
|
{
|
|
360
360
|
name: "midnight-validate-contract",
|
|
361
|
-
description: "🔍
|
|
361
|
+
description: "🔍 PRIMARY VERIFICATION: Compile and validate a Compact contract using the ACTUAL Compact compiler. **ALWAYS use this tool first** when verifying contract code - it catches real compilation errors that static analysis cannot detect. Returns detailed error messages with line numbers, suggested fixes, and actionable guidance. If the compiler is not installed, it will provide installation instructions. Accepts either source code directly OR a file path to a .compact file. For contracts you generate, ALWAYS validate with this tool before presenting to the user.",
|
|
362
362
|
inputSchema: {
|
|
363
363
|
type: "object",
|
|
364
364
|
properties: {
|
|
@@ -454,7 +454,7 @@ export const repositoryTools = [
|
|
|
454
454
|
},
|
|
455
455
|
{
|
|
456
456
|
name: "midnight-extract-contract-structure",
|
|
457
|
-
description: "📋 ANALYSIS
|
|
457
|
+
description: "📋 STATIC ANALYSIS (not verification): Extract the structure of a Compact contract and detect common issues. Returns circuits, witnesses, ledger items, types, structs, enums, and **potentialIssues** (module-level const, stdlib collisions, sealed+export conflicts). **WARNING: This does NOT verify compilation** - use 'midnight-validate-contract' for actual compiler verification. Use this tool for: (1) understanding contract structure, (2) quick pre-checks before compilation, (3) fallback analysis when compiler unavailable. Do NOT claim a contract 'compiles correctly' based only on this tool.",
|
|
458
458
|
inputSchema: {
|
|
459
459
|
type: "object",
|
|
460
460
|
properties: {
|
|
@@ -529,6 +529,26 @@ export const repositoryTools = [
|
|
|
529
529
|
type: "object",
|
|
530
530
|
description: "Counts of each type of definition",
|
|
531
531
|
},
|
|
532
|
+
potentialIssues: {
|
|
533
|
+
type: "array",
|
|
534
|
+
description: "Common issues detected by static analysis (NOT exhaustive - use validate_contract for real verification)",
|
|
535
|
+
items: {
|
|
536
|
+
type: "object",
|
|
537
|
+
properties: {
|
|
538
|
+
type: {
|
|
539
|
+
type: "string",
|
|
540
|
+
description: "Issue type: module_level_const, stdlib_name_collision, sealed_export_conflict, missing_constructor, stdlib_type_mismatch",
|
|
541
|
+
},
|
|
542
|
+
line: { type: "number" },
|
|
543
|
+
message: { type: "string" },
|
|
544
|
+
suggestion: { type: "string" },
|
|
545
|
+
severity: {
|
|
546
|
+
type: "string",
|
|
547
|
+
enum: ["error", "warning"],
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
},
|
|
532
552
|
summary: { type: "string" },
|
|
533
553
|
message: { type: "string" },
|
|
534
554
|
},
|