@nine-lab/nine-mu 0.1.334 → 0.1.335

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.
@@ -946,6 +946,16 @@
946
946
  display: block;
947
947
  width: 100%;
948
948
  height: 100%;
949
+ color: inherit;
950
+ font-size: inherit;
951
+ line-height: inherit;
952
+
953
+ /* 내부 모든 엘리먼트의 여백 계산법을 어드민 기본형에 동기화 */
954
+ .nine-error-container *,
955
+ .nine-error-container *::before,
956
+ .nine-error-container *::after {
957
+ box-sizing: border-box;
958
+ }
949
959
 
950
960
  .nine-error-container {
951
961
  padding: 30px;
@@ -1012,10 +1022,10 @@
1012
1022
  font-size: 14px;
1013
1023
  color: #718096;
1014
1024
  }
1025
+ }
1015
1026
 
1016
- @keyframes pulse {
1017
- 0% { opacity: 0.6; }
1018
- 50% { opacity: 1; }
1019
- 100% { opacity: 0.6; }
1020
- }
1027
+ @keyframes pulse {
1028
+ 0% { opacity: 0.6; }
1029
+ 50% { opacity: 1; }
1030
+ 100% { opacity: 0.6; }
1021
1031
  }
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 _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _openRouteDiffPopup, _generateSource, _generateMenu, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _sourceGenHandler, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3, _renderer2, _ExceptionHook_instances, injectShadowStylesheet_fn, handleRuntimeError_fn, handlePromiseError_fn, handleLocationChange_fn, sendToAiAction_fn, renderError_fn;
12
+ var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _openRouteDiffPopup, _generateSource, _generateMenu, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _sourceGenHandler, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3, _lastPath, _hasError, _cssPath, _renderer2, _ExceptionHook_instances, injectShadowStylesheet_fn, _handleRuntimeError, _handlePromiseError, _handleLocationChange, _sendToAiAction, renderError_fn;
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() {
@@ -17537,7 +17537,7 @@ render_fn = function() {
17537
17537
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
17538
17538
  this.shadowRoot.innerHTML = `
17539
17539
  <style>
17540
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.333"}/dist/css/nine-mu.css";
17540
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.334"}/dist/css/nine-mu.css";
17541
17541
  ${customImport}
17542
17542
  </style>
17543
17543
  <div class="wrapper">
@@ -43787,7 +43787,7 @@ class NineDiff extends HTMLElement {
43787
43787
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
43788
43788
  this.shadowRoot.innerHTML = `
43789
43789
  <style>
43790
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.333"}/dist/css/nine-mu.css";
43790
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.334"}/dist/css/nine-mu.css";
43791
43791
  ${customImport}
43792
43792
  </style>
43793
43793
 
@@ -43927,7 +43927,7 @@ renderScaffolding_fn = function() {
43927
43927
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
43928
43928
  this.shadowRoot.innerHTML = `
43929
43929
  <style>
43930
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.333"}/dist/css/nine-mu.css";
43930
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.334"}/dist/css/nine-mu.css";
43931
43931
  ${customImport}
43932
43932
  </style>
43933
43933
 
@@ -44036,7 +44036,7 @@ render_fn2 = function() {
44036
44036
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44037
44037
  this.shadowRoot.innerHTML = `
44038
44038
  <style>
44039
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.333"}/dist/css/nine-mu.css";
44039
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.334"}/dist/css/nine-mu.css";
44040
44040
  ${customImport}
44041
44041
  </style>
44042
44042
 
@@ -44366,7 +44366,7 @@ class ChatMessageBody extends HTMLElement {
44366
44366
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
44367
44367
  this.shadowRoot.innerHTML = `
44368
44368
  <style>
44369
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.333"}/dist/css/nine-mu.css";
44369
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.334"}/dist/css/nine-mu.css";
44370
44370
  ${customImport}
44371
44371
  </style>
44372
44372
 
@@ -44468,103 +44468,115 @@ class ExceptionHook extends HTMLElement {
44468
44468
  constructor() {
44469
44469
  super();
44470
44470
  __privateAdd(this, _ExceptionHook_instances);
44471
+ // 💡 [핵심] 비공개 인스턴스 필드는 클래스 최상단에 먼저 선언해야 합니다.
44472
+ __privateAdd(this, _lastPath, window.location.pathname);
44473
+ __privateAdd(this, _hasError, false);
44474
+ __privateAdd(this, _cssPath, "/css/nine-exception-hook.css");
44471
44475
  __privateAdd(this, _renderer2, () => {
44472
44476
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
44473
44477
  this.shadowRoot.innerHTML = `
44474
44478
  <style>
44475
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.333"}/dist/css/nine-mu.css";
44479
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.334"}/dist/css/nine-mu.css";
44476
44480
  ${customImport}
44477
44481
  </style>
44478
44482
 
44479
44483
  <div class="nine-hook-core">
44480
44484
  <slot></slot>
44481
44485
  </div>
44486
+ <div class="nine-exception-board"></div>
44482
44487
  `;
44483
44488
  });
44484
- this.lastPath = window.location.pathname;
44485
- this.hasError = false;
44486
- this.cssPath = "/css/nine-exception-hook.css";
44489
+ __privateAdd(this, _handleRuntimeError, (event) => {
44490
+ var _a2, _b;
44491
+ if (__privateGet(this, _hasError)) return;
44492
+ if (this.contains(event.target) || event.error) {
44493
+ __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, ((_a2 = event.error) == null ? void 0 : _a2.message) || event.message, (_b = event.error) == null ? void 0 : _b.stack);
44494
+ }
44495
+ });
44496
+ __privateAdd(this, _handlePromiseError, (event) => {
44497
+ var _a2, _b;
44498
+ if (__privateGet(this, _hasError)) return;
44499
+ __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, ((_a2 = event.reason) == null ? void 0 : _a2.message) || String(event.reason), (_b = event.reason) == null ? void 0 : _b.stack);
44500
+ });
44501
+ __privateAdd(this, _handleLocationChange, () => {
44502
+ setTimeout(() => {
44503
+ if (__privateGet(this, _hasError) && __privateGet(this, _lastPath) !== window.location.pathname) {
44504
+ console.log("✨ [nine-exception-hook] Shadow DOM 내부 예외 청소 및 정상 복구");
44505
+ __privateSet(this, _lastPath, window.location.pathname);
44506
+ __privateSet(this, _hasError, false);
44507
+ const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
44508
+ if (exceptionBoard) exceptionBoard.innerHTML = "";
44509
+ const coreContainer = this.shadowRoot.querySelector(".nine-hook-core");
44510
+ if (coreContainer) coreContainer.style.display = "";
44511
+ }
44512
+ }, 10);
44513
+ });
44514
+ __privateAdd(this, _sendToAiAction, async (errorMessage, errorStack) => {
44515
+ const btn = this.shadowRoot.querySelector(".nine-ai-btn");
44516
+ const footer = this.shadowRoot.querySelector(".nine-error-footer");
44517
+ if (!btn) return;
44518
+ btn.disabled = true;
44519
+ btn.innerText = "⚡ AI 관제탑에 소스 분석 요청 중...";
44520
+ btn.classList.add("loading");
44521
+ try {
44522
+ if (window.triggerAutoRecovery) {
44523
+ await window.triggerAutoRecovery({
44524
+ message: errorMessage,
44525
+ stack: errorStack || "No stack trace available",
44526
+ path: window.location.pathname
44527
+ });
44528
+ footer.innerHTML = `✅ <b>AI 관제탑 접수 완료:</b> 분석을 바탕으로 소스 코드를 교정하고 있습니다. 잠시만 기다려주세요.`;
44529
+ btn.innerText = "🚀 전송 완료";
44530
+ } else {
44531
+ throw new Error("window.triggerAutoRecovery 관제탑 엔진이 로드되지 않았습니다.");
44532
+ }
44533
+ } catch (err) {
44534
+ console.error("❌ AI 전송 실패:", err);
44535
+ btn.disabled = false;
44536
+ btn.innerText = "❌ 재전송 시도";
44537
+ footer.innerHTML = `<span style="color: #E53E3E;">⚠️ 전송 실패: ${err.message}</span>`;
44538
+ }
44539
+ });
44487
44540
  this.attachShadow({ mode: "open" });
44488
44541
  }
44489
44542
  connectedCallback() {
44490
44543
  __privateGet(this, _renderer2).call(this);
44491
44544
  __privateMethod(this, _ExceptionHook_instances, injectShadowStylesheet_fn).call(this);
44492
- window.addEventListener("error", __privateMethod(this, _ExceptionHook_instances, handleRuntimeError_fn).bind(this), true);
44493
- window.addEventListener("unhandledrejection", __privateMethod(this, _ExceptionHook_instances, handlePromiseError_fn).bind(this), true);
44494
- window.addEventListener("popstate", __privateMethod(this, _ExceptionHook_instances, handleLocationChange_fn).bind(this));
44495
- document.addEventListener("click", __privateMethod(this, _ExceptionHook_instances, handleLocationChange_fn).bind(this), true);
44545
+ window.addEventListener("error", __privateGet(this, _handleRuntimeError), true);
44546
+ window.addEventListener("unhandledrejection", __privateGet(this, _handlePromiseError), true);
44547
+ window.addEventListener("popstate", __privateGet(this, _handleLocationChange));
44548
+ document.addEventListener("click", __privateGet(this, _handleLocationChange), true);
44496
44549
  }
44497
44550
  disconnectedCallback() {
44498
- window.removeEventListener("error", __privateMethod(this, _ExceptionHook_instances, handleRuntimeError_fn));
44499
- window.removeEventListener("unhandledrejection", __privateMethod(this, _ExceptionHook_instances, handlePromiseError_fn));
44500
- window.removeEventListener("popstate", __privateMethod(this, _ExceptionHook_instances, handleLocationChange_fn));
44501
- document.removeEventListener("click", __privateMethod(this, _ExceptionHook_instances, handleLocationChange_fn), true);
44551
+ window.removeEventListener("error", __privateGet(this, _handleRuntimeError), true);
44552
+ window.removeEventListener("unhandledrejection", __privateGet(this, _handlePromiseError), true);
44553
+ window.removeEventListener("popstate", __privateGet(this, _handleLocationChange));
44554
+ document.removeEventListener("click", __privateGet(this, _handleLocationChange), true);
44502
44555
  }
44503
44556
  }
44557
+ _lastPath = new WeakMap();
44558
+ _hasError = new WeakMap();
44559
+ _cssPath = new WeakMap();
44504
44560
  _renderer2 = new WeakMap();
44505
44561
  _ExceptionHook_instances = new WeakSet();
44506
- // 💡 2. Shadow Root 내부 전용 스타일 링크 주입 함수
44507
44562
  injectShadowStylesheet_fn = function() {
44508
- if (this.shadowRoot.querySelector(`link[href="${this.cssPath}"]`)) return;
44563
+ if (this.shadowRoot.querySelector(`link[href="${__privateGet(this, _cssPath)}"]`)) return;
44509
44564
  const link = document.createElement("link");
44510
44565
  link.rel = "stylesheet";
44511
- link.href = this.cssPath;
44566
+ link.href = __privateGet(this, _cssPath);
44512
44567
  this.shadowRoot.appendChild(link);
44513
44568
  };
44514
- handleRuntimeError_fn = function(event) {
44515
- var _a2, _b;
44516
- if (this.contains(event.target) || event.error) {
44517
- __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, ((_a2 = event.error) == null ? void 0 : _a2.message) || event.message, (_b = event.error) == null ? void 0 : _b.stack);
44518
- }
44519
- };
44520
- handlePromiseError_fn = function(event) {
44521
- var _a2, _b;
44522
- __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, ((_a2 = event.reason) == null ? void 0 : _a2.message) || String(event.reason), (_b = event.reason) == null ? void 0 : _b.stack);
44523
- };
44524
- handleLocationChange_fn = function() {
44525
- setTimeout(() => {
44526
- if (this.hasError && this.lastPath !== window.location.pathname) {
44527
- console.log("✨ [nine-exception-hook] Shadow DOM 내부 예외 청소 및 정상 복구");
44528
- this.lastPath = window.location.pathname;
44529
- this.hasError = false;
44530
- const errorBox = this.shadowRoot.querySelector(".nine-error-container");
44531
- if (errorBox) errorBox.remove();
44532
- const coreContainer = this.shadowRoot.querySelector(".nine-hook-core");
44533
- if (coreContainer) coreContainer.style.display = "";
44534
- }
44535
- }, 10);
44536
- };
44537
- sendToAiAction_fn = async function(errorMessage, errorStack) {
44538
- const btn = this.shadowRoot.querySelector(".nine-ai-btn");
44539
- const footer = this.shadowRoot.querySelector(".nine-error-footer");
44540
- if (!btn) return;
44541
- btn.disabled = true;
44542
- btn.innerText = "⚡ AI 관제탑에 소스 분석 요청 중...";
44543
- btn.classList.add("loading");
44544
- try {
44545
- if (window.triggerAutoRecovery) {
44546
- await window.triggerAutoRecovery({
44547
- message: errorMessage,
44548
- stack: errorStack || "No stack trace available",
44549
- path: window.location.pathname
44550
- });
44551
- footer.innerHTML = `✅ <b>AI 관제탑 접수 완료:</b> 분석을 바탕으로 소스 코드를 교정하고 있습니다. 잠시만 기다려주세요.`;
44552
- btn.innerText = "🚀 전송 완료";
44553
- } else {
44554
- throw new Error("window.triggerAutoRecovery 관제탑 엔진이 로드되지 않았습니다.");
44555
- }
44556
- } catch (err) {
44557
- console.error("❌ AI 전송 실패:", err);
44558
- btn.disabled = false;
44559
- btn.innerText = "❌ 재전송 시도";
44560
- footer.innerHTML = `<span style="color: #E53E3E;">⚠️ 전송 실패: ${err.message}</span>`;
44561
- }
44562
- };
44569
+ _handleRuntimeError = new WeakMap();
44570
+ _handlePromiseError = new WeakMap();
44571
+ _handleLocationChange = new WeakMap();
44572
+ _sendToAiAction = new WeakMap();
44563
44573
  renderError_fn = function(errorMessage, errorStack) {
44564
- if (this.hasError) return;
44565
- this.hasError = true;
44574
+ if (__privateGet(this, _hasError)) return;
44575
+ __privateSet(this, _hasError, true);
44566
44576
  const coreContainer = this.shadowRoot.querySelector(".nine-hook-core");
44567
44577
  if (coreContainer) coreContainer.style.display = "none";
44578
+ const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
44579
+ if (!exceptionBoard) return;
44568
44580
  const errorHTML = `
44569
44581
  <div class="nine-error-container">
44570
44582
  <h3 class="nine-error-title">⚠️ 시스템 예외 감지 (${this.tagName.toLowerCase()})</h3>
@@ -44579,17 +44591,17 @@ renderError_fn = function(errorMessage, errorStack) {
44579
44591
  </div>
44580
44592
  </div>
44581
44593
  `;
44582
- this.shadowRoot.insertAdjacentHTML("beforeend", errorHTML);
44594
+ exceptionBoard.innerHTML = errorHTML;
44583
44595
  const aiBtn = this.shadowRoot.querySelector(".nine-ai-btn");
44584
44596
  if (aiBtn) {
44585
- aiBtn.addEventListener("click", () => __privateMethod(this, _ExceptionHook_instances, sendToAiAction_fn).call(this, errorMessage, errorStack));
44597
+ aiBtn.addEventListener("click", () => __privateGet(this, _sendToAiAction).call(this, errorMessage, errorStack));
44586
44598
  }
44587
44599
  };
44588
44600
  if (!customElements.get("nine-exception-hook")) {
44589
44601
  customElements.define("nine-exception-hook", ExceptionHook);
44590
44602
  }
44591
44603
  const NineMu = {
44592
- version: "0.1.333",
44604
+ version: "0.1.334",
44593
44605
  init: (config2) => {
44594
44606
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44595
44607
  }