@mindexec/cli 0.2.14 → 0.2.15

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": "@mindexec/cli",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "MindExec local runtime and bridge CLI",
5
5
  "main": "server.js",
6
6
  "type": "module",
@@ -408,6 +408,10 @@ async function loadCss3DManager() {
408
408
  return { manager: context.window.MindMapCss3DManager, document };
409
409
  }
410
410
 
411
+ function wait(ms = 0) {
412
+ return new Promise(resolve => setTimeout(resolve, ms));
413
+ }
414
+
411
415
  function buildMonitorNode(devices, hubStatus) {
412
416
  const connected = devices.filter(device => device.Connected).length;
413
417
  const endpoint = hubStatus.agentEndpoint || '127.0.0.1:5197';
@@ -531,6 +535,29 @@ try {
531
535
  const { manager, document } = await loadCss3DManager();
532
536
  assert.equal(typeof manager?.renderRemoteFleetMonitorForTest, 'function');
533
537
  assert.equal(typeof manager?.renderRemoteFleetDeviceForTest, 'function');
538
+ assert.equal(typeof manager?.setModuleForTest, 'function');
539
+
540
+ const dotNetCalls = [];
541
+ const dotNetHelper = {
542
+ invokeMethodAsync: async (methodName, ...args) => {
543
+ dotNetCalls.push({ methodName, args });
544
+ if (methodName === 'DispatchRemoteFleetTaskBatchFromJs') {
545
+ const targetIds = Array.isArray(args[1]) ? args[1] : [];
546
+ const failedDeviceId = targetIds[targetIds.length - 1] || 'synthetic-pc-failed';
547
+ return {
548
+ success: true,
549
+ total: targetIds.length,
550
+ queued: Math.max(0, targetIds.length - 1),
551
+ failed: 1,
552
+ failedDeviceIds: [failedDeviceId],
553
+ failurePreview: `${failedDeviceId}: device-ai-assist-unavailable`
554
+ };
555
+ }
556
+
557
+ return { success: true };
558
+ }
559
+ };
560
+ manager.setModuleForTest({ dotNetHelper });
534
561
 
535
562
  const bodyView = document.createElement('div');
536
563
  bodyView.dataset.remoteFleetAutoMonitor = 'false';
@@ -580,6 +607,23 @@ try {
580
607
  assert.ok(bodyView.querySelectorAll('[data-remote-fleet-group-header="true"]').length >= 2);
581
608
  assert.equal(bodyView.querySelectorAll('article[data-device-id]').length, SYNTHETIC_COUNT);
582
609
 
610
+ const taskInput = bodyView.querySelector('[data-remote-fleet-task-input="true"]');
611
+ const sendVisibleButton = bodyView.querySelector('[data-remote-fleet-action="task-visible"]');
612
+ assert.ok(taskInput);
613
+ assert.ok(sendVisibleButton);
614
+ taskInput.value = 'Dispatch smoke partial failure';
615
+ sendVisibleButton.dispatchEvent({ type: 'click' });
616
+ await wait();
617
+ const batchCall = dotNetCalls.find(call => call.methodName === 'DispatchRemoteFleetTaskBatchFromJs');
618
+ assert.ok(batchCall);
619
+ const batchTargetIds = Array.isArray(batchCall.args[1]) ? batchCall.args[1] : [];
620
+ assert.equal(batchTargetIds.length, connectedCount);
621
+ const feedback = bodyView.querySelector('[data-remote-fleet-task-feedback="true"]');
622
+ assert.ok(feedback);
623
+ assert.equal(feedback.style.display, 'block');
624
+ assert.match(feedback.textContent, new RegExp(`Queued ${connectedCount - 1}/${connectedCount} visible remote task\\(s\\); 1 failed`));
625
+ assert.match(feedback.textContent, /device-ai-assist-unavailable/);
626
+
583
627
  const deviceBody = document.createElement('div');
584
628
  document.body.appendChild(deviceBody);
585
629
  manager.renderRemoteFleetDeviceForTest(deviceBody, buildDeviceNode(focusedDevice, hub.getStatus()));
@@ -11350,6 +11350,10 @@
11350
11350
  });
11351
11351
  }
11352
11352
 
11353
+ function setModuleForTest(module) {
11354
+ _module = module || null;
11355
+ }
11356
+
11353
11357
  function getTemplateCardConfig(nodeModel) {
11354
11358
  const raw = nodeModel?.response ?? nodeModel?.Response ?? '';
11355
11359
  const metadata = nodeModel?.metadata ?? nodeModel?.Metadata ?? {};
@@ -13775,6 +13779,30 @@
13775
13779
  ? '#047857'
13776
13780
  : '#1d4ed8';
13777
13781
  };
13782
+ const formatRemoteFleetDispatchFeedback = (result, fallbackTargetCount = 0, modeLabel = 'remote task') => {
13783
+ const total = Number(result?.total || fallbackTargetCount || 0);
13784
+ const queued = Number(result?.queued || 0);
13785
+ const failed = Number(result?.failed || Math.max(0, total - queued));
13786
+ const failurePreview = String(result?.failurePreview || '').trim();
13787
+ if (!result?.success && queued <= 0) {
13788
+ return {
13789
+ tone: 'error',
13790
+ text: result?.error || `No ${modeLabel}s were queued.`
13791
+ };
13792
+ }
13793
+
13794
+ if (failed > 0) {
13795
+ return {
13796
+ tone: 'error',
13797
+ text: `Queued ${queued}/${total || queued} ${modeLabel}(s); ${failed} failed${failurePreview ? ` - ${failurePreview}` : ''}.`
13798
+ };
13799
+ }
13800
+
13801
+ return {
13802
+ tone: 'success',
13803
+ text: `Queued ${queued || total || 1}/${total || queued || 1} ${modeLabel}(s).`
13804
+ };
13805
+ };
13778
13806
 
13779
13807
  const readTaskInstruction = () => String(taskInput.value || '').trim();
13780
13808
  const useAiAssist = () => aiToggle.checked === true;
@@ -13930,12 +13958,9 @@
13930
13958
  try {
13931
13959
  const result = await invokeDotNetAsync('DispatchRemoteFleetTaskBatchFromJs', nodeId, targetIds, instruction, useAiAssist());
13932
13960
  await syncRemoteFleetNodeStateFromResult(result);
13933
- if (result?.success) {
13934
- const mode = useAiAssist() ? 'AI task' : 'remote task';
13935
- setTaskFeedback(`Queued ${result.queued || targetIds.length} visible ${mode}(s).`, 'success');
13936
- } else {
13937
- setTaskFeedback(result?.error || 'Task dispatch failed.', 'error');
13938
- }
13961
+ const mode = useAiAssist() ? 'visible AI task' : 'visible remote task';
13962
+ const feedback = formatRemoteFleetDispatchFeedback(result, targetIds.length, mode);
13963
+ setTaskFeedback(feedback.text, feedback.tone);
13939
13964
  } finally {
13940
13965
  applyRemoteFleetFilters();
13941
13966
  }
@@ -13956,12 +13981,9 @@
13956
13981
  try {
13957
13982
  const result = await invokeDotNetAsync('DispatchRemoteFleetTaskFromJs', nodeId, '', instruction, useAiAssist());
13958
13983
  await syncRemoteFleetNodeStateFromResult(result);
13959
- if (result?.success) {
13960
- const mode = useAiAssist() ? 'AI task' : 'remote task';
13961
- setTaskFeedback(`Queued ${result.queued || result.total || 1} ${mode}(s).`, 'success');
13962
- } else {
13963
- setTaskFeedback(result?.error || 'Task dispatch failed.', 'error');
13964
- }
13984
+ const mode = useAiAssist() ? 'AI task' : 'remote task';
13985
+ const feedback = formatRemoteFleetDispatchFeedback(result, result?.total || 0, mode);
13986
+ setTaskFeedback(feedback.text, feedback.tone);
13965
13987
  } finally {
13966
13988
  applyRemoteFleetFilters();
13967
13989
  }
@@ -18091,6 +18113,7 @@
18091
18113
  syncVideoNodeVisibilityPlayback: syncVideoNodeVisibilityPlayback,
18092
18114
  syncEditingOverlay: syncEditingOverlay,
18093
18115
  syncTextOverlays: syncTextOverlays,
18116
+ setModuleForTest: setModuleForTest,
18094
18117
  renderRemoteFleetMonitorForTest: renderRemoteFleetMonitor,
18095
18118
  renderRemoteFleetDeviceForTest: renderRemoteFleetDevice,
18096
18119
  renderBusinessAutomationEdges: renderBusinessAutomationEdges,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mainAssemblyName": "MindExecution.Web",
3
3
  "resources": {
4
- "hash": "sha256-GlTNEJ0ZfPP6DnkregRY8SmRVXZU12TGhQpfIuIwr0I=",
4
+ "hash": "sha256-SDDoFz4/uzWopUhjgpkiIgiLuIxFbjw0fze0ljEluiQ=",
5
5
  "fingerprinting": {
6
6
  "Google.Protobuf.9h59ukbel7.dll": "Google.Protobuf.dll",
7
7
  "Markdig.d1j7v41cl1.dll": "Markdig.dll",
@@ -127,12 +127,12 @@
127
127
  "MindExecution.Kernel.lqglgq2jmo.dll": "MindExecution.Kernel.dll",
128
128
  "MindExecution.Plugins.Admin.2jqptn6ylw.dll": "MindExecution.Plugins.Admin.dll",
129
129
  "MindExecution.Plugins.Business.8hzwity3fl.dll": "MindExecution.Plugins.Business.dll",
130
- "MindExecution.Plugins.Concept.wqdtoeuumu.dll": "MindExecution.Plugins.Concept.dll",
130
+ "MindExecution.Plugins.Concept.gc38fmee62.dll": "MindExecution.Plugins.Concept.dll",
131
131
  "MindExecution.Plugins.Directory.hr2p0grenr.dll": "MindExecution.Plugins.Directory.dll",
132
- "MindExecution.Plugins.PlanMaster.fpq5ydr4s0.dll": "MindExecution.Plugins.PlanMaster.dll",
133
- "MindExecution.Plugins.YouTube.43m89bf01o.dll": "MindExecution.Plugins.YouTube.dll",
134
- "MindExecution.Shared.y1hdnsq8zq.dll": "MindExecution.Shared.dll",
135
- "MindExecution.Web.ox678bzo06.dll": "MindExecution.Web.dll",
132
+ "MindExecution.Plugins.PlanMaster.ivqd47y3cx.dll": "MindExecution.Plugins.PlanMaster.dll",
133
+ "MindExecution.Plugins.YouTube.tpgm4p80hh.dll": "MindExecution.Plugins.YouTube.dll",
134
+ "MindExecution.Shared.2r4r7zx1ek.dll": "MindExecution.Shared.dll",
135
+ "MindExecution.Web.stbecd1tk9.dll": "MindExecution.Web.dll",
136
136
  "dotnet.js": "dotnet.js",
137
137
  "dotnet.native.xsn1d6x2kd.js": "dotnet.native.js",
138
138
  "dotnet.native.vz0adxojrz.wasm": "dotnet.native.wasm",
@@ -280,16 +280,16 @@
280
280
  "netstandard.0xet7jg7ky.dll": "sha256-xENDv620uJ8fHwLJ2bdhrTHz4QPjvqXOztnk2a4wr0c=",
281
281
  "MindExecution.Core.q469sducjw.dll": "sha256-tqgvXepOZPfdkyxH1BK3KlhL8azJjoV+iV/BismieCc=",
282
282
  "MindExecution.Kernel.lqglgq2jmo.dll": "sha256-AyAPsZpAwsH/HeC6cWVzRH50hBjGAoamzGup6clWJTg=",
283
- "MindExecution.Plugins.Concept.wqdtoeuumu.dll": "sha256-2FoeeE612eZV39wbEI+Soq3dmXibSZjHP/IKnbzok70=",
284
- "MindExecution.Plugins.PlanMaster.fpq5ydr4s0.dll": "sha256-c3xRnRTCa3xuB2/xJyrLoyuZ1owk3BM6ft/SmnV4u7U=",
285
- "MindExecution.Shared.y1hdnsq8zq.dll": "sha256-lp71ky431zxHwFMHmb2TKH+NQk4e+rs9Od4a0gOoBgU=",
286
- "MindExecution.Web.ox678bzo06.dll": "sha256-JJ17QCB0KRHtXGQKuM7WQHQLtCfLg+s+CW7j3X/TE+I="
283
+ "MindExecution.Plugins.Concept.gc38fmee62.dll": "sha256-EFZnHpuHNJzdkWPTkGXV7EYsZIkpMMOAHf6R5FBGzQ0=",
284
+ "MindExecution.Plugins.PlanMaster.ivqd47y3cx.dll": "sha256-slYqPeIeQ3yugnSA4ABLJ1eGGd7opYVqd11waq+hJBo=",
285
+ "MindExecution.Shared.2r4r7zx1ek.dll": "sha256-znMYyuG18GNFULfWrkwczymEkg1ZtSPHpHXKkw13h2A=",
286
+ "MindExecution.Web.stbecd1tk9.dll": "sha256-oJwTIFv6bY3dnlzZQafAf01epgSK3gOAbo2XK7nLaQA="
287
287
  },
288
288
  "lazyAssembly": {
289
289
  "MindExecution.Plugins.Admin.2jqptn6ylw.dll": "sha256-ctRNgHtUfPq0pCvAeG0DCzZPBRTgLtQC2c4pjGFM+Go=",
290
290
  "MindExecution.Plugins.Business.8hzwity3fl.dll": "sha256-ZL74Jut/WgaNdDBWZzhC6ECsjBdm+0cB1P5fx4ACugM=",
291
291
  "MindExecution.Plugins.Directory.hr2p0grenr.dll": "sha256-PUrdpFqGptJ5kxYaarWNwB2NmZ1TphHnFHlnyQL48DI=",
292
- "MindExecution.Plugins.YouTube.43m89bf01o.dll": "sha256-0MYkUpuqSUwsFGO/XYud82hbXMIngLds7GHRN4yyXjQ="
292
+ "MindExecution.Plugins.YouTube.tpgm4p80hh.dll": "sha256-3/nB2+iWQdfNdzktROztp/oVkSJbxu64mmWRShW2QMo="
293
293
  }
294
294
  },
295
295
  "cacheBootResources": true,
@@ -558,7 +558,7 @@
558
558
  }
559
559
 
560
560
  const base = '_content/MindExecution.Shared/js/';
561
- const scriptVersion = '20260612-remote-thumbnail-scheduler-v473';
561
+ const scriptVersion = '20260612-remote-dispatch-feedback-v474';
562
562
  const scriptUrl = (script) => `${base}${script}?v=${scriptVersion}`;
563
563
  console.log(`[Script Loader] Shared JS version: ${scriptVersion}`);
564
564
  const criticalScripts = [
@@ -1,5 +1,5 @@
1
1
  self.assetsManifest = {
2
- "version": "QLa+sMNb",
2
+ "version": "0KR50DAc",
3
3
  "assets": [
4
4
  {
5
5
  "hash": "sha256-+CSYMcqLNTsq3VnH11jgYyOCCdxvHzL74CBmo4sCmMU=",
@@ -86,7 +86,7 @@
86
86
  "url": "_content/MindExecution.Shared/js/mind-map-core.js.backup"
87
87
  },
88
88
  {
89
- "hash": "sha256-TRPlxHfTd5M/XAy1bnnYRmTFqExG/OMAo4jSJSVcZjk=",
89
+ "hash": "sha256-E87osNoVqhikMqj3XaJ+fZpNqyY0377QlQIjHfzZPhc=",
90
90
  "url": "_content/MindExecution.Shared/js/mind-map-css3d-manager.js"
91
91
  },
92
92
  {
@@ -426,28 +426,28 @@
426
426
  "url": "_framework/MindExecution.Plugins.Business.8hzwity3fl.dll"
427
427
  },
428
428
  {
429
- "hash": "sha256-2FoeeE612eZV39wbEI+Soq3dmXibSZjHP/IKnbzok70=",
430
- "url": "_framework/MindExecution.Plugins.Concept.wqdtoeuumu.dll"
429
+ "hash": "sha256-EFZnHpuHNJzdkWPTkGXV7EYsZIkpMMOAHf6R5FBGzQ0=",
430
+ "url": "_framework/MindExecution.Plugins.Concept.gc38fmee62.dll"
431
431
  },
432
432
  {
433
433
  "hash": "sha256-PUrdpFqGptJ5kxYaarWNwB2NmZ1TphHnFHlnyQL48DI=",
434
434
  "url": "_framework/MindExecution.Plugins.Directory.hr2p0grenr.dll"
435
435
  },
436
436
  {
437
- "hash": "sha256-c3xRnRTCa3xuB2/xJyrLoyuZ1owk3BM6ft/SmnV4u7U=",
438
- "url": "_framework/MindExecution.Plugins.PlanMaster.fpq5ydr4s0.dll"
437
+ "hash": "sha256-slYqPeIeQ3yugnSA4ABLJ1eGGd7opYVqd11waq+hJBo=",
438
+ "url": "_framework/MindExecution.Plugins.PlanMaster.ivqd47y3cx.dll"
439
439
  },
440
440
  {
441
- "hash": "sha256-0MYkUpuqSUwsFGO/XYud82hbXMIngLds7GHRN4yyXjQ=",
442
- "url": "_framework/MindExecution.Plugins.YouTube.43m89bf01o.dll"
441
+ "hash": "sha256-3/nB2+iWQdfNdzktROztp/oVkSJbxu64mmWRShW2QMo=",
442
+ "url": "_framework/MindExecution.Plugins.YouTube.tpgm4p80hh.dll"
443
443
  },
444
444
  {
445
- "hash": "sha256-lp71ky431zxHwFMHmb2TKH+NQk4e+rs9Od4a0gOoBgU=",
446
- "url": "_framework/MindExecution.Shared.y1hdnsq8zq.dll"
445
+ "hash": "sha256-znMYyuG18GNFULfWrkwczymEkg1ZtSPHpHXKkw13h2A=",
446
+ "url": "_framework/MindExecution.Shared.2r4r7zx1ek.dll"
447
447
  },
448
448
  {
449
- "hash": "sha256-JJ17QCB0KRHtXGQKuM7WQHQLtCfLg+s+CW7j3X/TE+I=",
450
- "url": "_framework/MindExecution.Web.ox678bzo06.dll"
449
+ "hash": "sha256-oJwTIFv6bY3dnlzZQafAf01epgSK3gOAbo2XK7nLaQA=",
450
+ "url": "_framework/MindExecution.Web.stbecd1tk9.dll"
451
451
  },
452
452
  {
453
453
  "hash": "sha256-IsZJ91/OW+fHzNqIgEc7Y072ns8z9dGritiSyvR9Wgc=",
@@ -770,7 +770,7 @@
770
770
  "url": "_framework/Websocket.Client.vapounvmnl.dll"
771
771
  },
772
772
  {
773
- "hash": "sha256-LPeEgdSHt/c+wCTt4C1Z8+0CvQSzl5rxeojM+0OQDcU=",
773
+ "hash": "sha256-y6Kp7jPu3NDwDsVpfK/DXAaN7ZSNGvq3LDKrIhURBio=",
774
774
  "url": "_framework/blazor.boot.json"
775
775
  },
776
776
  {
@@ -834,7 +834,7 @@
834
834
  "url": "image-manifest.json"
835
835
  },
836
836
  {
837
- "hash": "sha256-YtEozKS1KbDYp9w3j2ecyHIFvGm3zqvygqym/zN71vk=",
837
+ "hash": "sha256-kK0fdbwqbRSdpNq5r4LyomSjE6FQ2lhjrXkQVBWacL8=",
838
838
  "url": "index.html"
839
839
  },
840
840
  {
@@ -1,4 +1,4 @@
1
- /* Manifest version: QLa+sMNb */
1
+ /* Manifest version: 0KR50DAc */
2
2
  // Hosted deployments should prefer the network over stale offline caches.
3
3
  // This service worker immediately clears old Blazor offline caches and unregisters itself.
4
4