midnight-mcp 0.2.12 → 0.2.14

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 CHANGED
@@ -104,12 +104,12 @@ Add to `~/.codeium/windsurf/mcp_config.json`:
104
104
 
105
105
  ## What's Included
106
106
 
107
- ### 28 Tools
107
+ ### 29 Tools
108
108
 
109
109
  | Category | Tools | Description |
110
110
  | ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
111
111
  | **Search** | `search-compact`, `search-typescript`, `search-docs`, `fetch-docs` | Semantic search + live docs fetching |
112
- | **Analysis** | `analyze-contract`, `explain-circuit`, `extract-contract-structure` | Static analysis with 15+ checks (P0-P2 severity) |
112
+ | **Analysis** | `analyze-contract`, `explain-circuit`, `extract-contract-structure`, `compile-contract` | Static analysis + real compilation |
113
113
  | **Repository** | `get-file`, `list-examples`, `get-latest-updates` | Access files and examples |
114
114
  | **Versioning** | `get-version-info`, `check-breaking-changes`, `get-migration-guide`, `get-file-at-version`, `compare-syntax`, `get-latest-syntax` | Version tracking and migration |
115
115
  | **AI Generation** | `generate-contract`, `review-contract`, `document-contract` | AI-powered code generation _(requires sampling)_ |
@@ -119,6 +119,20 @@ Add to `~/.codeium/windsurf/mcp_config.json`:
119
119
 
120
120
  All tools are prefixed with `midnight-` (e.g., `midnight-search-compact`).
121
121
 
122
+ ### Real Contract Compilation
123
+
124
+ The `midnight-compile-contract` tool validates Compact code using a hosted compiler service:
125
+
126
+ ```
127
+ ✅ Compilation successful (Compiler v0.18.0) in 2841ms
128
+ ```
129
+
130
+ - **Fast mode** (`skipZk=true`): Syntax validation in ~1-2 seconds
131
+ - **Full mode** (`fullCompile=true`): Complete ZK circuit generation in ~10-30 seconds
132
+ - **Automatic fallback**: Falls back to static analysis if the compiler service is unavailable
133
+
134
+ This catches semantic errors that static analysis misses (sealed fields, disclose rules, type mismatches).
135
+
122
136
  ### MCP Capabilities
123
137
 
124
138
  | Capability | Feature |
package/dist/bin.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  startHttpServer,
4
4
  startServer
5
- } from "./chunk-YT6DWZUA.js";
5
+ } from "./chunk-V7KK64OX.js";
6
6
  import {
7
7
  setOutputFormat
8
- } from "./chunk-B6UJ7ZQY.js";
8
+ } from "./chunk-WYQRVPIQ.js";
9
9
 
10
10
  // src/bin.ts
11
11
  import { config } from "dotenv";
@@ -13,7 +13,7 @@ import { resolve } from "path";
13
13
  import yargs from "yargs";
14
14
  import { hideBin } from "yargs/helpers";
15
15
  config({ path: resolve(process.cwd(), ".env") });
16
- var CURRENT_VERSION = "0.2.12";
16
+ var CURRENT_VERSION = "0.2.14";
17
17
  process.on("uncaughtException", (error) => {
18
18
  console.error("Uncaught exception:", error);
19
19
  process.exit(1);