@mandujs/core 0.9.12 → 0.9.13
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 +1 -1
- package/src/brain/types.ts +2 -0
- package/src/watcher/rules.ts +20 -0
- package/src/watcher/watcher.ts +2 -3
package/package.json
CHANGED
package/src/brain/types.ts
CHANGED
package/src/watcher/rules.ts
CHANGED
|
@@ -63,6 +63,14 @@ export const MVP_RULES: ArchRule[] = [
|
|
|
63
63
|
message: "Generated 파일에서 금지된 모듈이 import되었습니다.",
|
|
64
64
|
forbiddenImports: ["fs", "child_process", "cluster", "worker_threads"],
|
|
65
65
|
},
|
|
66
|
+
{
|
|
67
|
+
id: "SLOT_MODIFIED",
|
|
68
|
+
name: "Slot File Modified",
|
|
69
|
+
description: "Slot 파일이 수정되었습니다",
|
|
70
|
+
pattern: "spec/slots/*.slot.ts",
|
|
71
|
+
action: "warn",
|
|
72
|
+
message: "Slot 수정 감지. mandu_validate_slot 또는 mandu_guard_check로 검증하세요.",
|
|
73
|
+
},
|
|
66
74
|
{
|
|
67
75
|
id: "ISLAND_FIRST_MODIFIED",
|
|
68
76
|
name: "Island-First ComponentModule Modified",
|
|
@@ -236,6 +244,18 @@ export async function validateFile(
|
|
|
236
244
|
event,
|
|
237
245
|
});
|
|
238
246
|
}
|
|
247
|
+
|
|
248
|
+
// Slot modified: info level notification
|
|
249
|
+
if (rule.id === "SLOT_MODIFIED" && event !== "delete") {
|
|
250
|
+
warnings.push({
|
|
251
|
+
ruleId: rule.id,
|
|
252
|
+
file: relativePath,
|
|
253
|
+
message: rule.message,
|
|
254
|
+
timestamp: new Date(),
|
|
255
|
+
event,
|
|
256
|
+
level: "info",
|
|
257
|
+
});
|
|
258
|
+
}
|
|
239
259
|
}
|
|
240
260
|
|
|
241
261
|
return warnings;
|
package/src/watcher/watcher.ts
CHANGED
|
@@ -21,7 +21,7 @@ import chokidar, { type FSWatcher } from "chokidar";
|
|
|
21
21
|
*/
|
|
22
22
|
function formatWarning(warning: WatchWarning): string {
|
|
23
23
|
const time = new Date().toLocaleTimeString("ko-KR", { hour12: false });
|
|
24
|
-
const icon = warning.event === "delete" ? "[DEL]" : "[WARN]";
|
|
24
|
+
const icon = warning.level === "info" ? "[INFO]" : warning.event === "delete" ? "[DEL]" : "[WARN]";
|
|
25
25
|
return `${time} ${icon} ${warning.ruleId}\n ${warning.file}\n ${warning.message}\n`;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -105,8 +105,7 @@ export class FileWatcher {
|
|
|
105
105
|
`${"=".repeat(50)}\n\n`
|
|
106
106
|
);
|
|
107
107
|
|
|
108
|
-
//
|
|
109
|
-
this.openLogTerminal(this.logFile, rootDir);
|
|
108
|
+
// Terminal is now handled by ActivityMonitor in MCP server
|
|
110
109
|
|
|
111
110
|
// Build sets for fast lookup
|
|
112
111
|
const ignoredSet = new Set(ignoreDirs || []);
|