@nine-lab/nine-mu 0.1.144 → 0.1.146

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.144",
3
+ "version": "0.1.146",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -1,6 +1,6 @@
1
1
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
2
  import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/websocket.js";
3
- import { trace, api, nine } from "@nine-lab/nine-util";
3
+ import { trace } from "@nopeer";
4
4
 
5
5
  export class NineChatManager {
6
6
  #mcpClient;
@@ -31,6 +31,7 @@ export class NineChatManager {
31
31
  name: "nine-mu-client", version: "1.0.0"
32
32
  }, { capabilities: { tools: {} } });
33
33
 
34
+ trace.log(this.#mcpClient);
34
35
 
35
36
  this.#mcpClient.connect(transport)
36
37
  .then(() => {
@@ -120,15 +121,30 @@ export class NineChatManager {
120
121
  trace.log(`[Status]: ${msg}`);
121
122
  }
122
123
 
124
+ async #callTool(toolName, args = {}) {
125
+
126
+ this.#updateStatus("AI 분석 중...");
127
+
128
+ this.#mcpClient.callTool({ name: toolName, arguments: args })
129
+ .then((res) => {
130
+ trace.log(res);
131
+ //this.#updateStatus("✅ MCP Connected");
132
+ })
133
+ .catch((err) => {
134
+ trace.error(err);
135
+ this.#updateStatus("에러 발생");
136
+ throw err;
137
+ });
138
+ }
139
+
123
140
  handleChatSubmit = async el => {
124
- const response = await this.#mcpClient.callTool({
125
- name: "ask_nine_engine",
126
- arguments: {
127
- prompt: el.value.trim(),
128
- routes: [] // 현재 화면의 메뉴 정보
129
- }
130
- });
131
-
132
- console.log(response);
141
+
142
+ trace.log(this.#mcpClient);
143
+
144
+ this.#callTool("system-brain", {
145
+ user_input : el.value.trim(),
146
+ routes : routes,
147
+ current_path : "/group_member/student_management",
148
+ })
133
149
  }
134
150
  }