@mandujs/mcp 0.36.1 → 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 +2 -2
- package/src/executor/error-handler.ts +0 -2
- package/src/executor/tool-executor.ts +0 -1
- package/src/hooks/config-watcher.ts +0 -1
- package/src/logging/mcp-transport.ts +1 -1
- package/src/server.ts +3 -3
- package/src/tools/ate.ts +1 -1
- package/src/tools/brain.ts +3 -4
- package/src/tools/contract.ts +2 -3
- package/src/tools/design.ts +2 -2
- package/src/tools/docs.ts +2 -1
- package/src/tools/generate.ts +1 -1
- package/src/tools/guard.ts +1 -2
- package/src/tools/resource.ts +0 -2
- package/src/tools/runtime.ts +2 -2
- package/src/tools/seo.ts +4 -5
- package/src/tools/slot-validation.ts +0 -1
- package/src/tools/spec.ts +1 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mandujs/mcp",
|
|
3
|
-
"version": "0.36.
|
|
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.53.
|
|
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"
|
|
@@ -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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
17
|
+
import type { OracleLevel, AteMonitorEvent } from "@mandujs/ate";
|
|
18
18
|
import { eventBus } from "@mandujs/core/observability";
|
|
19
19
|
import {
|
|
20
20
|
writePartialResults,
|
package/src/tools/brain.ts
CHANGED
|
@@ -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
|
};
|
package/src/tools/contract.ts
CHANGED
|
@@ -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,
|
|
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[];
|
package/src/tools/design.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
117
|
+
let entries: __ManduNodeFsTypes0.Dirent[];
|
|
117
118
|
try {
|
|
118
119
|
entries = await fs.readdir(rootDir, { withFileTypes: true });
|
|
119
120
|
} catch {
|
package/src/tools/generate.ts
CHANGED
|
@@ -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
|
|
56
|
+
const _fsResult = await generateManifest(projectRoot);
|
|
57
57
|
|
|
58
58
|
// Load the freshly generated manifest
|
|
59
59
|
const manifestResult = await loadManifest(paths.manifestPath);
|
package/src/tools/guard.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import {
|
|
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
|
package/src/tools/resource.ts
CHANGED
package/src/tools/runtime.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
-
import { getProjectPaths
|
|
7
|
+
import { getProjectPaths } from "../utils/project.js";
|
|
8
8
|
import { loadManifest } from "@mandujs/core";
|
|
9
9
|
import path from "path";
|
|
10
|
-
|
|
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
|
|
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
|
|
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[] = [];
|
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
|
|
6
|
+
import { getProjectPaths } from "../utils/project.js";
|
|
11
7
|
import path from "path";
|
|
12
8
|
import fs from "fs/promises";
|
|
13
9
|
|