@nine-lab/nine-mu 0.1.188 → 0.1.190

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.188",
3
+ "version": "0.1.190",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -40,14 +40,19 @@ export class NineChatManager {
40
40
  .then(() => {
41
41
  this.#updateStatus("✅ MCP Connected");
42
42
 
43
- this.#mcpClient.onNotification((notification) => {
44
- trace.log(notification);
45
- if (notification.method === "notifications/logging/message") {
46
- const data = JSON.parse(notification.params.message);
47
- if (data.type === "BRAIN_DECISION") {
48
- // UI에 중간 진행 상황 출력 ("ai", data.message);
49
- //this.#pushMessage('assistant', data.message);
43
+ // 💡 [정석] notificationHandlers에 로깅 메시지 수신 핸들러를 등록합니다.
44
+ // 프라이빗 메서드 접근(__privateGet) 필요 없이 public 인터페이스로 제공됩니다.
45
+ this.#mcpClient.notificationHandlers.set("notifications/logging/message", (notification) => {
46
+ try {
47
+ // notification.params.message에 백엔드가 보낸 텍스트가 들어옵니다.
48
+ const logData = JSON.parse(notification.params.message);
49
+
50
+ if (logData.type === "BRAIN_DECISION") {
51
+ // UI에 실시간으로 관제탑의 중간 브리핑 메시지 출력!
52
+ //this.#pushMessage('assistant', logData.message);
50
53
  }
54
+ } catch (e) {
55
+ console.warn("알림 파싱 실패:", e);
51
56
  }
52
57
  });
53
58
  })