@nine-lab/nine-mu 0.1.257 → 0.1.258
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/dist/nine-mu.js
CHANGED
|
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
-
var _mcpClient, _onAction, _onStatus, _onMessage,
|
|
12
|
+
var _owner, _NotificationHandler_instances, handleLoggingMessage_fn, processSourceData_fn, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
|
|
13
13
|
import { trace as trace$1, api, nine as nine$1 } from "@nine-lab/nine-util";
|
|
14
14
|
class Trace extends trace$1.constructor {
|
|
15
15
|
constructor() {
|
|
@@ -17076,8 +17076,51 @@ class WebSocketClientTransport {
|
|
|
17076
17076
|
});
|
|
17077
17077
|
}
|
|
17078
17078
|
}
|
|
17079
|
+
class NotificationHandler {
|
|
17080
|
+
constructor(owner) {
|
|
17081
|
+
__privateAdd(this, _NotificationHandler_instances);
|
|
17082
|
+
__privateAdd(this, _owner);
|
|
17083
|
+
__privateSet(this, _owner, owner);
|
|
17084
|
+
}
|
|
17085
|
+
/**
|
|
17086
|
+
* MCP로부터 수신된 날것의 노티파이 데이터를 정석대로 라우팅하는 메인 메서드
|
|
17087
|
+
*/
|
|
17088
|
+
handle(notification) {
|
|
17089
|
+
try {
|
|
17090
|
+
const { method, params } = notification;
|
|
17091
|
+
if (method === "notifications/logging/message") {
|
|
17092
|
+
__privateMethod(this, _NotificationHandler_instances, handleLoggingMessage_fn).call(this, params);
|
|
17093
|
+
}
|
|
17094
|
+
} catch (error) {
|
|
17095
|
+
trace.error("🔥 노티파이 핸들러 내부 처리 실패:", error);
|
|
17096
|
+
}
|
|
17097
|
+
}
|
|
17098
|
+
}
|
|
17099
|
+
_owner = new WeakMap();
|
|
17100
|
+
_NotificationHandler_instances = new WeakSet();
|
|
17101
|
+
/**
|
|
17102
|
+
* [분리 비즈니스 로직 1] 로깅 및 UI 메시지 출력 제어
|
|
17103
|
+
*/
|
|
17104
|
+
handleLoggingMessage_fn = function(params) {
|
|
17105
|
+
const { message, data, logger } = params;
|
|
17106
|
+
if (message) {
|
|
17107
|
+
__privateGet(this, _owner).addMessage("ai", message);
|
|
17108
|
+
__privateGet(this, _owner).addMessage("ing", "");
|
|
17109
|
+
}
|
|
17110
|
+
if (data && data.status === "PROGRESS") {
|
|
17111
|
+
trace.log(`[시그널 감지] ${data.menu} - ${data.layer} 설계 완료`);
|
|
17112
|
+
}
|
|
17113
|
+
};
|
|
17114
|
+
/**
|
|
17115
|
+
* [분리 비즈니스 로직 2] 수신된 소스코드 데이터 유효성 검증 및 추후 파일 저장 연동
|
|
17116
|
+
*/
|
|
17117
|
+
processSourceData_fn = function(sourceData) {
|
|
17118
|
+
if (!sourceData.source || !sourceData.file_name) {
|
|
17119
|
+
trace.warn("⚠️ 소스 또는 파일명 누락 데이터 수신됨", sourceData);
|
|
17120
|
+
return;
|
|
17121
|
+
}
|
|
17122
|
+
};
|
|
17079
17123
|
class NineChatManager {
|
|
17080
|
-
// 💡 이전 대화들을 저장할 메모리 창고
|
|
17081
17124
|
constructor(owner, callbacks = {}) {
|
|
17082
17125
|
__privateAdd(this, _NineChatManager_instances);
|
|
17083
17126
|
__privateAdd(this, _mcpClient);
|
|
@@ -17085,9 +17128,11 @@ class NineChatManager {
|
|
|
17085
17128
|
__privateAdd(this, _onStatus);
|
|
17086
17129
|
__privateAdd(this, _onMessage);
|
|
17087
17130
|
// UI에 메시지를 뿌려줄 콜백 추가
|
|
17088
|
-
__privateAdd(this,
|
|
17131
|
+
__privateAdd(this, _owner2);
|
|
17089
17132
|
__privateAdd(this, _routeUrl);
|
|
17090
17133
|
__privateAdd(this, _chatHistory, []);
|
|
17134
|
+
// 💡 이전 대화들을 저장할 메모리 창고
|
|
17135
|
+
__privateAdd(this, _notiHandler);
|
|
17091
17136
|
__publicField(this, "handleChatSubmit", async (userInput) => {
|
|
17092
17137
|
__privateGet(this, _chatHistory).push({ role: "user", text: userInput });
|
|
17093
17138
|
const formattedHistory = __privateGet(this, _chatHistory).map((chat) => {
|
|
@@ -17122,11 +17167,12 @@ class NineChatManager {
|
|
|
17122
17167
|
trace.log(a);
|
|
17123
17168
|
return a;
|
|
17124
17169
|
});
|
|
17125
|
-
__privateSet(this,
|
|
17126
|
-
__privateSet(this, _routeUrl, __privateGet(this,
|
|
17170
|
+
__privateSet(this, _owner2, owner);
|
|
17171
|
+
__privateSet(this, _routeUrl, __privateGet(this, _owner2).getAttribute("route-url"));
|
|
17127
17172
|
__privateSet(this, _onAction, callbacks.onAction);
|
|
17128
17173
|
__privateSet(this, _onStatus, callbacks.onStatus);
|
|
17129
17174
|
__privateSet(this, _onMessage, callbacks.onMessage);
|
|
17175
|
+
__privateSet(this, _notiHandler, new NotificationHandler(__privateGet(this, _owner2)));
|
|
17130
17176
|
__privateMethod(this, _NineChatManager_instances, connect_fn).call(this);
|
|
17131
17177
|
}
|
|
17132
17178
|
/** 데이터 수집 (클라이언트 클릭 한방용) */
|
|
@@ -17154,13 +17200,14 @@ _mcpClient = new WeakMap();
|
|
|
17154
17200
|
_onAction = new WeakMap();
|
|
17155
17201
|
_onStatus = new WeakMap();
|
|
17156
17202
|
_onMessage = new WeakMap();
|
|
17157
|
-
|
|
17203
|
+
_owner2 = new WeakMap();
|
|
17158
17204
|
_routeUrl = new WeakMap();
|
|
17159
17205
|
_chatHistory = new WeakMap();
|
|
17206
|
+
_notiHandler = new WeakMap();
|
|
17160
17207
|
_NineChatManager_instances = new WeakSet();
|
|
17161
17208
|
connect_fn = async function() {
|
|
17162
17209
|
if (__privateGet(this, _mcpClient)) return;
|
|
17163
|
-
const connectorUrl = __privateGet(this,
|
|
17210
|
+
const connectorUrl = __privateGet(this, _owner2).getAttribute("connector-url");
|
|
17164
17211
|
const transport = new WebSocketClientTransport(new URL(connectorUrl));
|
|
17165
17212
|
__privateSet(this, _mcpClient, new Client({
|
|
17166
17213
|
name: "nine-mu-client",
|
|
@@ -17192,11 +17239,8 @@ connect_fn = async function() {
|
|
|
17192
17239
|
});
|
|
17193
17240
|
__privateGet(this, _mcpClient).setNotificationHandler(
|
|
17194
17241
|
customNotificationSchema,
|
|
17195
|
-
// 👈 껍데기 통과용 커스텀 스키마
|
|
17196
17242
|
(notification) => {
|
|
17197
|
-
|
|
17198
|
-
__privateGet(this, _owner).addMessage("ai", notification.params.message);
|
|
17199
|
-
__privateGet(this, _owner).addMessage("ing", "");
|
|
17243
|
+
__privateGet(this, _notiHandler).handle(notification);
|
|
17200
17244
|
}
|
|
17201
17245
|
);
|
|
17202
17246
|
}).catch((err) => {
|
|
@@ -17443,7 +17487,7 @@ render_fn = function() {
|
|
|
17443
17487
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
17444
17488
|
this.shadowRoot.innerHTML = `
|
|
17445
17489
|
<style>
|
|
17446
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17490
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.257"}/dist/css/nine-mu.css";
|
|
17447
17491
|
${customImport}
|
|
17448
17492
|
</style>
|
|
17449
17493
|
<div class="wrapper">
|
|
@@ -43660,7 +43704,7 @@ class NineDiff extends HTMLElement {
|
|
|
43660
43704
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43661
43705
|
this.shadowRoot.innerHTML = `
|
|
43662
43706
|
<style>
|
|
43663
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43707
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.257"}/dist/css/nine-mu.css";
|
|
43664
43708
|
${customImport}
|
|
43665
43709
|
</style>
|
|
43666
43710
|
|
|
@@ -43770,7 +43814,7 @@ render_fn2 = function() {
|
|
|
43770
43814
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43771
43815
|
this.shadowRoot.innerHTML = `
|
|
43772
43816
|
<style>
|
|
43773
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43817
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.257"}/dist/css/nine-mu.css";
|
|
43774
43818
|
${customImport}
|
|
43775
43819
|
</style>
|
|
43776
43820
|
|
|
@@ -44096,7 +44140,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44096
44140
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
44097
44141
|
this.shadowRoot.innerHTML = `
|
|
44098
44142
|
<style>
|
|
44099
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44143
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.257"}/dist/css/nine-mu.css";
|
|
44100
44144
|
${customImport}
|
|
44101
44145
|
</style>
|
|
44102
44146
|
|
|
@@ -44190,7 +44234,7 @@ if (!customElements.get("nine-chat-progress")) {
|
|
|
44190
44234
|
customElements.define("nine-chat-progress", ProgressMessage);
|
|
44191
44235
|
}
|
|
44192
44236
|
const NineMu = {
|
|
44193
|
-
version: "0.1.
|
|
44237
|
+
version: "0.1.257",
|
|
44194
44238
|
init: (config2) => {
|
|
44195
44239
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44196
44240
|
}
|