midnight-mcp 0.2.14 → 0.2.16

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/bin.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  startHttpServer,
4
4
  startServer
5
- } from "./chunk-V7KK64OX.js";
5
+ } from "./chunk-TJ7QA5XT.js";
6
6
  import {
7
7
  setOutputFormat
8
- } from "./chunk-WYQRVPIQ.js";
8
+ } from "./chunk-P3MTQHP6.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.14";
16
+ var CURRENT_VERSION = "0.2.16";
17
17
  process.on("uncaughtException", (error) => {
18
18
  console.error("Uncaught exception:", error);
19
19
  process.exit(1);
@@ -1593,7 +1593,7 @@ var releaseTracker = new ReleaseTracker();
1593
1593
 
1594
1594
  // src/utils/health.ts
1595
1595
  var startTime = Date.now();
1596
- var VERSION = "0.2.14";
1596
+ var VERSION = "0.2.16";
1597
1597
  async function checkGitHubAPI() {
1598
1598
  const start = Date.now();
1599
1599
  try {
@@ -1621,7 +1621,7 @@ async function checkGitHubAPI() {
1621
1621
  }
1622
1622
  async function checkVectorStore() {
1623
1623
  try {
1624
- const { vectorStore: vectorStore2 } = await import("./db-UKVEAHIX.js");
1624
+ const { vectorStore: vectorStore2 } = await import("./db-72ZOGII3.js");
1625
1625
  if (vectorStore2) {
1626
1626
  return {
1627
1627
  status: "pass",
@@ -2096,7 +2096,7 @@ function serialize(data) {
2096
2096
  }
2097
2097
 
2098
2098
  // src/utils/version.ts
2099
- var CURRENT_VERSION = "0.2.14";
2099
+ var CURRENT_VERSION = "0.2.16";
2100
2100
 
2101
2101
  // src/db/vectorStore.ts
2102
2102
  var VectorStore = class {
@@ -2305,4 +2305,4 @@ export {
2305
2305
  serialize,
2306
2306
  CURRENT_VERSION
2307
2307
  };
2308
- //# sourceMappingURL=chunk-WYQRVPIQ.js.map
2308
+ //# sourceMappingURL=chunk-P3MTQHP6.js.map
@@ -25,7 +25,7 @@ import {
25
25
  validateNumber,
26
26
  validateQuery,
27
27
  vectorStore
28
- } from "./chunk-WYQRVPIQ.js";
28
+ } from "./chunk-P3MTQHP6.js";
29
29
 
30
30
  // src/tools/search/schemas.ts
31
31
  import { z } from "zod";
@@ -736,15 +736,15 @@ var ExplainCircuitInputSchema = z2.object({
736
736
  var CompileContractInputSchema = z2.object({
737
737
  code: z2.string().describe("Compact contract source code to compile"),
738
738
  skipZk: z2.boolean().optional().default(true).describe(
739
- "Skip ZK circuit generation for faster syntax-only validation (default: true)"
739
+ "Skip ZK circuit generation for faster syntax-only validation (default: true). Note: overridden by fullCompile if set to true."
740
740
  ),
741
741
  fullCompile: z2.boolean().optional().default(false).describe(
742
- "Perform full compilation including ZK generation (slower but complete)"
742
+ "Perform full compilation including ZK generation (slower but complete). When true, overrides skipZk to false."
743
743
  )
744
744
  });
745
745
 
746
746
  // src/services/compiler.ts
747
- var COMPILER_API_URL = process.env.COMPACT_COMPILER_URL || "https://compact-playground.onrender.com";
747
+ var COMPILER_API_URL = process.env.COMPACT_COMPILER_URL || "https://compact-playground.up.railway.app";
748
748
  var COMPILER_TIMEOUT = 3e4;
749
749
  var MAX_CODE_SIZE = 100 * 1024;
750
750
  async function compileContract(code, options = {}) {
@@ -764,9 +764,9 @@ async function compileContract(code, options = {}) {
764
764
  serviceAvailable: true
765
765
  };
766
766
  }
767
+ const controller = new AbortController();
768
+ const timeoutId = setTimeout(() => controller.abort(), COMPILER_TIMEOUT);
767
769
  try {
768
- const controller = new AbortController();
769
- const timeoutId = setTimeout(() => controller.abort(), COMPILER_TIMEOUT);
770
770
  const requestBody = {
771
771
  code,
772
772
  options: {
@@ -787,7 +787,6 @@ async function compileContract(code, options = {}) {
787
787
  body: JSON.stringify(requestBody),
788
788
  signal: controller.signal
789
789
  });
790
- clearTimeout(timeoutId);
791
790
  if (!response.ok) {
792
791
  const errorText = await response.text().catch(() => "Unknown error");
793
792
  logger.error("Compiler API returned error status", {
@@ -866,6 +865,8 @@ async function compileContract(code, options = {}) {
866
865
  error: "CONNECTION_FAILED",
867
866
  serviceAvailable: false
868
867
  };
868
+ } finally {
869
+ clearTimeout(timeoutId);
869
870
  }
870
871
  }
871
872
  function getCompilerUrl() {
@@ -1094,7 +1095,7 @@ function getPrivacyConsiderations(circuit) {
1094
1095
  }
1095
1096
  async function compileContract2(input) {
1096
1097
  logger.info("Compiling Compact contract via hosted service", {
1097
- codeLength: input.code.length,
1098
+ codeLength: input.code?.length ?? 0,
1098
1099
  skipZk: input.skipZk,
1099
1100
  fullCompile: input.fullCompile
1100
1101
  });
@@ -11185,4 +11186,4 @@ export {
11185
11186
  startServer,
11186
11187
  startHttpServer
11187
11188
  };
11188
- //# sourceMappingURL=chunk-V7KK64OX.js.map
11189
+ //# sourceMappingURL=chunk-TJ7QA5XT.js.map
@@ -0,0 +1,7 @@
1
+ import {
2
+ vectorStore
3
+ } from "./chunk-P3MTQHP6.js";
4
+ export {
5
+ vectorStore
6
+ };
7
+ //# sourceMappingURL=db-72ZOGII3.js.map
package/dist/index.js CHANGED
@@ -9,10 +9,10 @@ import {
9
9
  promptDefinitions,
10
10
  startHttpServer,
11
11
  startServer
12
- } from "./chunk-V7KK64OX.js";
12
+ } from "./chunk-TJ7QA5XT.js";
13
13
  import {
14
14
  logger
15
- } from "./chunk-WYQRVPIQ.js";
15
+ } from "./chunk-P3MTQHP6.js";
16
16
  export {
17
17
  allResources,
18
18
  allTools,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "midnight-mcp",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "Model Context Protocol Server for Midnight Blockchain Development",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,7 +0,0 @@
1
- import {
2
- vectorStore
3
- } from "./chunk-WYQRVPIQ.js";
4
- export {
5
- vectorStore
6
- };
7
- //# sourceMappingURL=db-UKVEAHIX.js.map