@nine-lab/nine-mu 0.1.202 → 0.1.203

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": "@nine-lab/nine-mu",
3
- "version": "0.1.202",
3
+ "version": "0.1.203",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -47,16 +47,8 @@ export class NineChatManager {
47
47
  .then( async () => {
48
48
  this.#updateStatus("✅ MCP Connected");
49
49
 
50
- try {
51
- await this.#mcpClient.request(
52
- { method: "logging/setLevel", params: { level: "info" } },
53
- z.object({}) // 빈 응답 스키마 객체 검증
54
- );
55
- trace.log("🚀 MCP 로깅 세션 활성화 완료 (Level: info)");
56
- } catch (linkErr) {
57
- trace.error("❌ 로깅 세션 활성화 실패:", linkErr);
58
- }
59
50
 
51
+ /**
60
52
  transport._socket.onmessage = (event) => {
61
53
  try {
62
54
  trace.log(event);
@@ -68,53 +60,35 @@ export class NineChatManager {
68
60
  }
69
61
  } catch(e) {}
70
62
  };
71
-
72
- /**
73
- // 💡 [정석] notificationHandlers에 로깅 메시지 수신 핸들러를 등록합니다.
74
- // 프라이빗 메서드 접근(__privateGet) 필요 없이 public 인터페이스로 제공됩니다.
75
- this.#mcpClient.setNotificationHandler(
76
- LoggingMessageNotificationSchema, // 👈 검증기 통과 패스포트
77
- (notification) => {
78
- try {
79
- trace.log(notification);
80
- const logData = JSON.parse(notification.params.message);
81
- if (logData.type === "BRAIN_DECISION") {
82
- //this.#pushMessage('assistant', logData.message);
83
- }
84
- } catch (e) {
85
- trace.warn("알림 파싱 실패:", e);
86
- }
87
- }
88
- );*/
89
- /**
63
+ */
64
+ // 1️⃣ MCP 규격 기동을 위한 핸드셰이크 활성화
90
65
  try {
91
66
  await this.#mcpClient.request(
92
67
  { method: "logging/setLevel", params: { level: "info" } },
93
- z.object({}) // 빈 응답 스키마 객체 검증
68
+ z.object({})
94
69
  );
95
- trace.log("🚀 MCP 로깅 세션 활성화 완료 (Level: info)");
96
- } catch (linkErr) {
97
- trace.error("로깅 세션 활성화 실패:", linkErr);
70
+ trace.log("🚀 MCP 로깅 채널 활성화");
71
+ } catch (e) {
72
+ trace.warn("로깅 채널 초기화 패스 (커스텀 스트림 대응):", e);
98
73
  }
99
74
 
100
- this.#mcpClient.onnotification = (notification) => {
101
- trace.log("🔔 실시간 알림 도착:", notification);
102
- // MCP 공식 로깅 메커니즘 프로토콜 주소
103
- if (notification?.method === "notifications/logging/message") {
75
+ // 2️⃣ [MCP 정공법 복귀] 드디어 정식 스키마와 핸들러 구조로 당당하게 등록합니다!
76
+ this.#mcpClient.setNotificationHandler(
77
+ LoggingMessageNotificationSchema, // 👈 외부 임포트한 정식 Zod 스키마 객체
78
+ (notification) => {
104
79
  try {
105
- trace.log("🔔 실시간 알림 도착:", notification);
106
- const logData = JSON.parse(notification.params.message);
80
+ trace.log("🔔 [MCP 정식 엔진 수신 성공]:", notification);
107
81
 
82
+ const logData = JSON.parse(notification.params.message);
108
83
  if (logData.type === "BRAIN_DECISION") {
109
- // UI에 실시간 중간 메시지 꽂기 성공!
84
+ // 주석을 완전히 풀고 화면에 타다닥 뿌려줍니다!
110
85
  //this.#pushMessage('assistant', logData.message);
111
86
  }
112
87
  } catch (e) {
113
- trace.warn("알림 내부 JSON 파싱 실패:", e);
88
+ trace.warn("알림 내부 데이터 파싱 실패:", e);
114
89
  }
115
90
  }
116
- };
117
- */
91
+ );
118
92
  })
119
93
  .catch((err) => {
120
94
  trace.error("❌ MCP 연결 실패", err);