@mandujs/mcp 0.36.0 → 0.36.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mandujs/mcp",
3
- "version": "0.36.0",
3
+ "version": "0.36.2",
4
4
  "description": "Mandu MCP Server - Agent-native interface for Mandu framework operations",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -34,7 +34,7 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@mandujs/core": "^0.52.0",
37
+ "@mandujs/core": "^0.53.2",
38
38
  "@mandujs/ate": "^0.25.1",
39
39
  "@mandujs/skills": "^0.19.0",
40
40
  "@modelcontextprotocol/sdk": "^1.25.3"
@@ -6,8 +6,6 @@
6
6
 
7
7
  import {
8
8
  extractErrorInfo,
9
- classifyError,
10
- serializeError,
11
9
  isRetryableError,
12
10
  type ErrorCategory,
13
11
  type ExtractedErrorInfo,
@@ -4,7 +4,6 @@
4
4
  * 도구 실행 + 훅 + 에러 처리 통합
5
5
  */
6
6
 
7
- import type { McpToolPlugin } from "@mandujs/core/plugins";
8
7
  import type { ManduConfig } from "@mandujs/core";
9
8
  import { mcpToolRegistry } from "../registry/mcp-tool-registry.js";
10
9
  import { mcpHookRegistry, type McpToolContext } from "../hooks/mcp-hooks.js";
@@ -6,7 +6,6 @@
6
6
 
7
7
  import type { Server } from "@modelcontextprotocol/sdk/server/index.js";
8
8
  import { watchConfig, hasConfigChanged, getChangedSections, type ManduConfig } from "@mandujs/core";
9
- import { mcpToolRegistry } from "../registry/mcp-tool-registry.js";
10
9
 
11
10
  /**
12
11
  * MCP Config Watcher 옵션
@@ -101,7 +101,7 @@ export function teardownMcpLogging(): void {
101
101
  * ActivityMonitor에서 이 함수를 호출하여 로그 통합
102
102
  */
103
103
  export function dispatchMonitorEvent(event: MonitorEvent): void {
104
- const record = monitorEventToRecord(event);
104
+ const _record = monitorEventToRecord(event);
105
105
 
106
106
  // 직접 transport로 전달하지 않고,
107
107
  // 다른 transport들도 받을 수 있도록 registry를 통해 dispatch
package/src/server.ts CHANGED
@@ -28,7 +28,7 @@ import { mcpToolRegistry } from "./registry/mcp-tool-registry.js";
28
28
  import { registerBuiltinTools, getToolsSummary } from "./tools/index.js";
29
29
 
30
30
  // DNA-007: 에러 처리
31
- import { createToolResponse, logToolError } from "./executor/error-handler.js";
31
+
32
32
  import type { ToolExecutor} from "./executor/tool-executor.js";
33
33
  import { createToolExecutor } from "./executor/tool-executor.js";
34
34
 
@@ -36,7 +36,7 @@ import { createToolExecutor } from "./executor/tool-executor.js";
36
36
  import { setupMcpLogging, teardownMcpLogging } from "./logging/mcp-transport.js";
37
37
 
38
38
  // DNA-016: 훅 시스템
39
- import { mcpHookRegistry, registerDefaultMcpHooks, type McpToolContext } from "./hooks/mcp-hooks.js";
39
+ import { mcpHookRegistry, registerDefaultMcpHooks } from "./hooks/mcp-hooks.js";
40
40
 
41
41
  // DNA-006: 설정 핫 리로드
42
42
  import { startMcpConfigWatcher, type McpConfigWatcher } from "./hooks/config-watcher.js";
@@ -50,7 +50,7 @@ import { manduResourceDefinitions, manduResourceHandlers } from "./new-resources
50
50
  // 기존 컴포넌트
51
51
  import { resourceHandlers, resourceDefinitions } from "./resources/handlers.js";
52
52
  import { findProjectRoot } from "./utils/project.js";
53
- import { applyWarningInjection } from "./utils/withWarnings.js";
53
+
54
54
  import { ActivityMonitor } from "./activity-monitor.js";
55
55
  import { type McpProfile, isValidProfile } from "./profiles.js";
56
56
 
package/src/tools/ate.ts CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  detectCoverageGaps,
15
15
  precommitCheck,
16
16
  } from "@mandujs/ate";
17
- import type { OracleLevel, AteMonitorEvent, FailureV1 } from "@mandujs/ate";
17
+ import type { OracleLevel, AteMonitorEvent } from "@mandujs/ate";
18
18
  import { eventBus } from "@mandujs/core/observability";
19
19
  import {
20
20
  writePartialResults,
@@ -17,7 +17,6 @@ import {
17
17
  loadManifest,
18
18
  runGuardCheck,
19
19
  analyzeViolations,
20
- generateJsonReport,
21
20
  initializeBrain,
22
21
  getBrain,
23
22
  startWatcher,
@@ -497,9 +496,9 @@ export function brainTools(projectRoot: string, server?: Server, monitor?: Activ
497
496
  mcpWarningUnsubscribe = null;
498
497
  }
499
498
 
500
- stopWatcher();
501
-
502
- return {
499
+ await stopWatcher();
500
+
501
+ return {
503
502
  success: true,
504
503
  message: "Watch stopped and notifications cleaned up",
505
504
  };
@@ -6,10 +6,9 @@ import {
6
6
  generateOpenAPIDocument,
7
7
  openAPIToJSON,
8
8
  type RouteSpec,
9
- type RoutesManifest,
10
9
  type SpecHttpMethod,
11
10
  } from "@mandujs/core";
12
- import { getProjectPaths, readJsonFile, writeJsonFile } from "../utils/project.js";
11
+ import { getProjectPaths, writeJsonFile } from "../utils/project.js";
13
12
  import path from "path";
14
13
  import fs from "fs/promises";
15
14
 
@@ -250,7 +249,7 @@ export function contractTools(projectRoot: string) {
250
249
  },
251
250
 
252
251
  "mandu.contract.create": async (args: Record<string, unknown>) => {
253
- const { routeId, description, methods } = args as {
252
+ const { routeId, description: _description, methods } = args as {
254
253
  routeId: string;
255
254
  description?: string;
256
255
  methods?: string[];
@@ -1,3 +1,4 @@
1
+ import type * as __ManduNodeFsTypes0 from "node:fs";
1
2
  /**
2
3
  * MCP design discovery tools — Issue #245 M4 (Team C).
3
4
  *
@@ -27,7 +28,6 @@ import {
27
28
  extractDesignTokens,
28
29
  fetchUpstreamDesignMd,
29
30
  parseDesignMd,
30
- patchDesignMd,
31
31
  patchDesignMdBatch,
32
32
  type DesignSpec,
33
33
  type DesignSectionId,
@@ -314,7 +314,7 @@ async function componentList(
314
314
  async function collectFiles(root: string): Promise<string[]> {
315
315
  const out: string[] = [];
316
316
  async function walk(dir: string): Promise<void> {
317
- let names: import("node:fs").Dirent[];
317
+ let names: __ManduNodeFsTypes0.Dirent[];
318
318
  try {
319
319
  names = await fs.readdir(dir, { withFileTypes: true });
320
320
  } catch {
package/src/tools/docs.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type * as __ManduNodeFsTypes0 from "node:fs";
1
2
  /**
2
3
  * MCP tools — `mandu.docs.search` + `mandu.docs.get`
3
4
  *
@@ -113,7 +114,7 @@ function validateGet(raw: Record<string, unknown>): {
113
114
 
114
115
  async function walkDocs(rootDir: string, relPrefix = ""): Promise<string[]> {
115
116
  const out: string[] = [];
116
- let entries: import("node:fs").Dirent[];
117
+ let entries: __ManduNodeFsTypes0.Dirent[];
117
118
  try {
118
119
  entries = await fs.readdir(rootDir, { withFileTypes: true });
119
120
  } catch {
@@ -53,7 +53,7 @@ export function generateTools(projectRoot: string) {
53
53
  const { dryRun, resources = true } = args as { dryRun?: boolean; resources?: boolean };
54
54
 
55
55
  // Regenerate manifest from FS Routes first
56
- const fsResult = await generateManifest(projectRoot);
56
+ const _fsResult = await generateManifest(projectRoot);
57
57
 
58
58
  // Load the freshly generated manifest
59
59
  const manifestResult = await loadManifest(paths.manifestPath);
@@ -1,5 +1,5 @@
1
1
  import type { Tool } from "@modelcontextprotocol/sdk/types.js";
2
- import { ErrorClassifier, type ManduError } from "@mandujs/core/error";
2
+ import { type ManduError } from "@mandujs/core/error";
3
3
  import {
4
4
  loadManifest,
5
5
  runGuardCheck,
@@ -7,7 +7,6 @@ import {
7
7
  type GeneratedMap,
8
8
  // Self-Healing Guard imports
9
9
  checkWithHealing,
10
- applyHealing,
11
10
  healAll,
12
11
  explainRule,
13
12
  // Follow-up E — type-aware lint bridge
@@ -11,8 +11,6 @@ import {
11
11
  type ResourceDefinition,
12
12
  type ResourceField,
13
13
  type FieldType,
14
- type GeneratorOptions,
15
- type GeneratorResult,
16
14
  FieldTypes,
17
15
  } from "@mandujs/core";
18
16
  import path from "path";
@@ -4,10 +4,10 @@
4
4
  */
5
5
 
6
6
  import type { Tool } from "@modelcontextprotocol/sdk/types.js";
7
- import { getProjectPaths, readJsonFile } from "../utils/project.js";
7
+ import { getProjectPaths } from "../utils/project.js";
8
8
  import { loadManifest } from "@mandujs/core";
9
9
  import path from "path";
10
- import fs from "fs/promises";
10
+
11
11
 
12
12
  export const runtimeToolDefinitions: Tool[] = [
13
13
  {
package/src/tools/seo.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { Tool } from "@modelcontextprotocol/sdk/types.js";
2
2
  import {
3
3
  renderMetadata,
4
- createDefaultMetadata,
5
4
  resolveMetadata,
6
5
  renderSitemap,
7
6
  renderRobots,
@@ -20,7 +19,7 @@ import {
20
19
  type RobotsFile,
21
20
  type JsonLd,
22
21
  } from "@mandujs/core";
23
- import { getProjectPaths, readJsonFile, writeJsonFile } from "../utils/project.js";
22
+ import { getProjectPaths } from "../utils/project.js";
24
23
  import * as fs from "fs";
25
24
  import * as path from "path";
26
25
 
@@ -167,7 +166,7 @@ export const seoToolDefinitions: Tool[] = [
167
166
  ];
168
167
 
169
168
  export function seoTools(projectRoot: string) {
170
- const paths = getProjectPaths(projectRoot);
169
+ const _paths = getProjectPaths(projectRoot);
171
170
 
172
171
  const handlers: Record<string, (args: Record<string, unknown>) => Promise<unknown>> = {
173
172
  "mandu.seo.preview": async (args: Record<string, unknown>) => {
@@ -304,7 +303,7 @@ export function seoTools(projectRoot: string) {
304
303
  },
305
304
 
306
305
  "mandu.seo.write": async (args: Record<string, unknown>) => {
307
- const { fileType, config } = args as {
306
+ const { fileType, config: _config } = args as {
308
307
  fileType: "sitemap" | "robots";
309
308
  config?: Record<string, unknown>;
310
309
  };
@@ -369,7 +368,7 @@ export default function robots(): RobotsFile {
369
368
  },
370
369
 
371
370
  "mandu.seo.analyze": async (args: Record<string, unknown>) => {
372
- const { metadata, url } = args as { metadata: Metadata; url?: string };
371
+ const { metadata, url: _url } = args as { metadata: Metadata; url?: string };
373
372
 
374
373
  const issues: Array<{ severity: "error" | "warning" | "info"; message: string }> = [];
375
374
  const recommendations: string[] = [];
@@ -1,7 +1,6 @@
1
1
  import type { Tool } from "@modelcontextprotocol/sdk/types.js";
2
2
  import {
3
3
  validateSlotConstraints,
4
- validateSlots,
5
4
  DEFAULT_SLOT_CONSTRAINTS,
6
5
  API_SLOT_CONSTRAINTS,
7
6
  READONLY_SLOT_CONSTRAINTS,
package/src/tools/spec.ts CHANGED
@@ -1,13 +1,9 @@
1
1
  import type { Tool } from "@modelcontextprotocol/sdk/types.js";
2
2
  import {
3
3
  loadManifest,
4
- validateManifest,
5
4
  generateManifest,
6
- GENERATED_RELATIVE_PATHS,
7
- type RouteSpec,
8
- type RoutesManifest,
9
5
  } from "@mandujs/core";
10
- import { getProjectPaths, readJsonFile, writeJsonFile } from "../utils/project.js";
6
+ import { getProjectPaths } from "../utils/project.js";
11
7
  import path from "path";
12
8
  import fs from "fs/promises";
13
9