@mindexec/cli 0.2.147 → 0.2.149

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.147",
3
+ "version": "0.2.149",
4
4
  "description": "MindExec local runtime and bridge CLI",
5
5
  "main": "server.js",
6
6
  "type": "module",
@@ -434,6 +434,7 @@ async function loadCss3DManager() {
434
434
  const runtimeTrace = [];
435
435
  const webSocketConnections = [];
436
436
  const webSocketSends = [];
437
+ const textOverlayInvalidations = [];
437
438
  class SmokeURL extends URL {}
438
439
  SmokeURL.createObjectURL = blob => {
439
440
  objectUrlCalls.push(blob);
@@ -536,6 +537,15 @@ async function loadCss3DManager() {
536
537
  runtimeTrace.push({ type, ...data });
537
538
  }
538
539
  },
540
+ MindMapTextOverlayV2: {
541
+ invalidateReadonlySource(module, nodeId, reason) {
542
+ textOverlayInvalidations.push({ module, nodeId, reason });
543
+ return true;
544
+ },
545
+ invalidateNode(module, nodeId, reason) {
546
+ textOverlayInvalidations.push({ module, nodeId, reason, fallback: true });
547
+ }
548
+ },
539
549
  Promise
540
550
  };
541
551
  context.window = context;
@@ -552,7 +562,8 @@ async function loadCss3DManager() {
552
562
  fetchCalls,
553
563
  runtimeTrace,
554
564
  webSocketConnections,
555
- webSocketSends
565
+ webSocketSends,
566
+ textOverlayInvalidations
556
567
  }
557
568
  };
558
569
  }
@@ -891,6 +902,9 @@ try {
891
902
  document.body.appendChild(moduleRef._textOverlayV2State.layer);
892
903
 
893
904
  manager.renderRemoteFleetMonitorForTest(bodyView, monitorNode);
905
+ const { nodeShell: mirrorShell, bodyView: mirrorBodyView } = createRemoteFleetTemplateShell(document, focusedDevice.DeviceId);
906
+ document.body.appendChild(mirrorShell);
907
+ mirrorBodyView.dataset.remoteFleetDensity = 'cards';
894
908
 
895
909
  let cards = bodyView.querySelectorAll('article[data-device-id]');
896
910
  assert.equal(cards.length, connectedCount);
@@ -935,9 +949,22 @@ try {
935
949
  sizeControls.querySelector('[data-remote-fleet-action="monitor-size-up"]').dispatchEvent({ type: 'click' });
936
950
  assert.equal(bodyView.dataset.remoteFleetDensity, 'large');
937
951
  assert.match(bodyView.querySelector('[data-remote-fleet-device-grid="true"]')?.style.cssText || '', /minmax\(168px,\s*1fr\)/);
952
+ assert.equal(mirrorBodyView.dataset.remoteFleetDensity, 'large');
953
+ assert.match(mirrorBodyView.querySelector('[data-remote-fleet-device-grid="true"]')?.style.cssText || '', /minmax\(168px,\s*1fr\)/);
954
+ assert.ok(diagnostics.textOverlayInvalidations.some(entry =>
955
+ entry.nodeId === 'remote-fleet-render-smoke'
956
+ && entry.reason === 'remote-monitor-size'));
957
+ assert.ok(diagnostics.runtimeTrace.some(entry =>
958
+ entry.type === 'remote.monitor.sizeChanged'
959
+ && entry.nodeId === 'remote-fleet-render-smoke'
960
+ && entry.density === 'large'
961
+ && entry.overlayInvalidated === true));
938
962
  bodyView.querySelector('[data-remote-fleet-action="monitor-size-down"]').dispatchEvent({ type: 'click' });
939
963
  assert.equal(bodyView.dataset.remoteFleetDensity, 'cards');
940
964
  assert.match(bodyView.querySelector('[data-remote-fleet-device-grid="true"]')?.style.cssText || '', /minmax\(132px,\s*1fr\)/);
965
+ assert.equal(mirrorBodyView.dataset.remoteFleetDensity, 'cards');
966
+ assert.match(mirrorBodyView.querySelector('[data-remote-fleet-device-grid="true"]')?.style.cssText || '', /minmax\(132px,\s*1fr\)/);
967
+ mirrorShell.remove();
941
968
  cards = bodyView.querySelectorAll('article[data-device-id]');
942
969
  const patchTarget = devices.find(device =>
943
970
  device.Connected === true
@@ -1189,6 +1216,10 @@ try {
1189
1216
  assert.equal(bodyView.textContent.includes('No screen'), false);
1190
1217
  assert.equal(bodyView.textContent.includes('@mindexec/cli'), false);
1191
1218
  assert.equal(nodeShell.querySelector('[data-remote-fleet-host-indicator="true"]')?.dataset.remoteFleetHostActive, 'false');
1219
+ const { nodeShell: hostMirrorShell, bodyView: hostMirrorBodyView } = createRemoteFleetTemplateShell(document, focusedDevice.DeviceId);
1220
+ document.body.appendChild(hostMirrorShell);
1221
+ manager.renderRemoteFleetMonitorForTest(hostMirrorBodyView, monitorNode);
1222
+ assert.equal(hostMirrorShell.querySelector('[data-remote-fleet-host-indicator="true"]')?.dataset.remoteFleetHostActive, 'false');
1192
1223
  const initialHostButton = nodeShell.querySelector('[data-remote-fleet-action="set-host"]');
1193
1224
  assert.equal(initialHostButton?.textContent, 'Set Host');
1194
1225
  initialHostButton.dispatchEvent({ type: 'click' });
@@ -1200,6 +1231,17 @@ try {
1200
1231
  const hostFeedback = bodyView.querySelector('[data-remote-fleet-task-feedback="true"]');
1201
1232
  assert.equal(hostFeedback?.style.display, 'none');
1202
1233
  assert.equal(hostFeedback?.textContent, '');
1234
+ assert.equal(nodeShell.querySelector('[data-remote-fleet-host-indicator="true"]')?.dataset.remoteFleetHostActive, 'true');
1235
+ assert.equal(hostMirrorShell.querySelector('[data-remote-fleet-host-indicator="true"]')?.dataset.remoteFleetHostActive, 'true');
1236
+ assert.ok(diagnostics.textOverlayInvalidations.some(entry =>
1237
+ entry.nodeId === 'remote-fleet-render-smoke'
1238
+ && entry.reason === 'remote-monitor-host'));
1239
+ assert.ok(diagnostics.runtimeTrace.some(entry =>
1240
+ entry.type === 'remote.monitor.projectionInvalidated'
1241
+ && entry.nodeId === 'remote-fleet-render-smoke'
1242
+ && entry.reason === 'host'
1243
+ && entry.overlayInvalidated === true));
1244
+ hostMirrorShell.remove();
1203
1245
 
1204
1246
  hub.setHostTarget({
1205
1247
  nodeId: 'remote-fleet-render-smoke',
@@ -13652,6 +13652,52 @@
13652
13652
  return nodeState;
13653
13653
  }
13654
13654
 
13655
+ function applyRemoteFleetHostTargetResultToNodeModel(nodeModel, nodeId, enabled, result) {
13656
+ const id = String(nodeId || '').trim();
13657
+ if (!nodeModel || !id || !isRemoteFleetResultSuccess(result)) {
13658
+ return false;
13659
+ }
13660
+
13661
+ const metadata = ensureNodeMetadata(nodeModel);
13662
+ if (!metadata) {
13663
+ return false;
13664
+ }
13665
+
13666
+ const registryStatus = String(result?.registryStatus || result?.RegistryStatus || '').trim();
13667
+ const registryReason = String(result?.registryReason || result?.RegistryReason || '').trim();
13668
+ if (registryStatus) {
13669
+ metadata.RemoteFleetRegistryStatus = registryStatus;
13670
+ }
13671
+ if (registryReason) {
13672
+ metadata.RemoteFleetRegistryReason = registryReason;
13673
+ }
13674
+
13675
+ const active = enabled === true && isRemoteFleetResultActive(result);
13676
+ if (active) {
13677
+ applyRemoteFleetLocalHostTarget(nodeModel);
13678
+ metadata.RemoteFleetHostTargetState = 'hosting';
13679
+ metadata.RemoteFleetHostTargetNodeId = id;
13680
+ const hostTarget = result?.hostTarget || result?.HostTarget || {};
13681
+ const now = new Date().toISOString();
13682
+ metadata.RemoteFleetHostTargetLeaseId = String(readRemoteFleetObjectField(hostTarget, 'leaseId', 'LeaseId', metadata.RemoteFleetHostTargetLeaseId || '') || '').trim();
13683
+ metadata.RemoteFleetHostTargetEndpoint = String(readRemoteFleetObjectField(hostTarget, 'endpoint', 'Endpoint', metadata.RemoteFleetHostTargetEndpoint || metadata.RemoteFleetHubEndpoint || '') || '').trim();
13684
+ metadata.RemoteFleetHostTargetActivatedAtUtc = String(readRemoteFleetObjectField(hostTarget, 'activatedAt', 'ActivatedAt', metadata.RemoteFleetHostTargetActivatedAtUtc || now) || '').trim();
13685
+ metadata.RemoteFleetHostTargetUpdatedAtUtc = String(readRemoteFleetObjectField(hostTarget, 'updatedAt', 'UpdatedAt', now) || '').trim();
13686
+ metadata.RemoteFleetHostTargetExpiresAtUtc = String(readRemoteFleetObjectField(hostTarget, 'expiresAt', 'ExpiresAt', metadata.RemoteFleetHostTargetExpiresAtUtc || '') || '').trim();
13687
+ } else if (enabled !== true || isRemoteFleetResultExplicitlyInactive(result)) {
13688
+ metadata.RemoteFleetHostTargetState = 'inactive';
13689
+ metadata.RemoteFleetHostTargetNodeId = '';
13690
+ metadata.RemoteFleetHostTargetLeaseId = '';
13691
+ metadata.RemoteFleetHostTargetActivatedAtUtc = '';
13692
+ metadata.RemoteFleetHostTargetUpdatedAtUtc = '';
13693
+ metadata.RemoteFleetHostTargetExpiresAtUtc = '';
13694
+ }
13695
+
13696
+ nodeModel.metadata = metadata;
13697
+ nodeModel.Metadata = metadata;
13698
+ return true;
13699
+ }
13700
+
13655
13701
  function clearRemoteFleetTimers(bodyView, options = {}) {
13656
13702
  if (!bodyView) return;
13657
13703
  if (options.keepBinaryFrameSocket !== true) {
@@ -13898,6 +13944,94 @@
13898
13944
  ).trim();
13899
13945
  }
13900
13946
 
13947
+ function syncRemoteFleetMonitorSizeSurfaces(nodeId, sizeState, sourceBodyView, nodeModel) {
13948
+ const id = String(nodeId || '').trim();
13949
+ const density = normalizeRemoteFleetMonitorSize(sizeState);
13950
+ if (!id || !sourceBodyView) {
13951
+ return 0;
13952
+ }
13953
+
13954
+ const escapedId = cssEscapeValue(id);
13955
+ const bodies = new Set([
13956
+ ...Array.from(document.querySelectorAll(`.template-card__remote-fleet-body[data-node-id="${escapedId}"]`)),
13957
+ ...Array.from(document.querySelectorAll(`.template-card__remote-fleet-body[data-remote-fleet-monitor-node-id="${escapedId}"]`))
13958
+ ]);
13959
+
13960
+ let synced = 0;
13961
+ bodies.forEach(body => {
13962
+ if (!body || body === sourceBodyView) {
13963
+ return;
13964
+ }
13965
+
13966
+ body.dataset.remoteFleetDensity = density;
13967
+ renderRemoteFleetMonitor(body, nodeModel);
13968
+ synced += 1;
13969
+ });
13970
+
13971
+ return synced;
13972
+ }
13973
+
13974
+ function renderRemoteFleetMonitorSurfaces(nodeId, nodeModel, sourceBodyView = null) {
13975
+ const id = String(nodeId || '').trim();
13976
+ if (!id || !nodeModel) {
13977
+ return 0;
13978
+ }
13979
+
13980
+ const escapedId = cssEscapeValue(id);
13981
+ const bodies = new Set([
13982
+ ...Array.from(document.querySelectorAll(`.template-card__remote-fleet-body[data-node-id="${escapedId}"]`)),
13983
+ ...Array.from(document.querySelectorAll(`.template-card__remote-fleet-body[data-remote-fleet-monitor-node-id="${escapedId}"]`))
13984
+ ]);
13985
+
13986
+ if (sourceBodyView) {
13987
+ bodies.add(sourceBodyView);
13988
+ }
13989
+
13990
+ let rendered = 0;
13991
+ bodies.forEach(body => {
13992
+ if (!body) {
13993
+ return;
13994
+ }
13995
+
13996
+ renderRemoteFleetMonitor(body, nodeModel);
13997
+ rendered += 1;
13998
+ });
13999
+
14000
+ return rendered;
14001
+ }
14002
+
14003
+ function invalidateRemoteFleetMonitorProjection(nodeId, sizeState, reason = 'size') {
14004
+ const id = String(nodeId || '').trim();
14005
+ if (!_module || !id) {
14006
+ return false;
14007
+ }
14008
+
14009
+ const overlay = window.MindMapTextOverlayV2;
14010
+ let invalidated = false;
14011
+ if (typeof overlay?.invalidateReadonlySource === 'function') {
14012
+ invalidated = overlay.invalidateReadonlySource(_module, id, `remote-monitor-${reason}`) === true;
14013
+ } else if (typeof overlay?.invalidateNode === 'function') {
14014
+ overlay.invalidateNode(_module, id, 'layout');
14015
+ invalidated = true;
14016
+ }
14017
+
14018
+ _module._forceUpdateFrames = Math.max(Number(_module._forceUpdateFrames || 0), 2);
14019
+ _module._css3dVisualChangedThisFrame = true;
14020
+ _module._css3dVisualChangedSinceLastRender = true;
14021
+ wakeRemoteFleetModuleAnimation(_module, `remote-monitor-${reason}`);
14022
+ const tracePayload = {
14023
+ nodeId: id,
14024
+ density: normalizeRemoteFleetMonitorSize(sizeState),
14025
+ reason: String(reason || 'projection'),
14026
+ overlayInvalidated: invalidated
14027
+ };
14028
+ window.RuntimeTrace?.emit?.('remote.monitor.projectionInvalidated', tracePayload);
14029
+ if (reason === 'size') {
14030
+ window.RuntimeTrace?.emit?.('remote.monitor.sizeChanged', tracePayload);
14031
+ }
14032
+ return invalidated;
14033
+ }
14034
+
13901
14035
  function getRemoteFleetBodyFromPreview(preview) {
13902
14036
  if (!preview) {
13903
14037
  return null;
@@ -18063,6 +18197,10 @@
18063
18197
  rememberRemoteFleetLocalHostTarget(nodeId, enabled === true, result);
18064
18198
  if (isRemoteFleetResultSuccess(result)) {
18065
18199
  rememberRemoteFleetAutoHostPreference(nodeId, enabled === true && isRemoteFleetResultActive(result));
18200
+ if (applyRemoteFleetHostTargetResultToNodeModel(nodeModel, nodeId, enabled === true, result)) {
18201
+ renderRemoteFleetMonitorSurfaces(nodeId, nodeModel, bodyView);
18202
+ invalidateRemoteFleetMonitorProjection(nodeId, bodyView.dataset.remoteFleetDensity || densityState, 'host');
18203
+ }
18066
18204
  }
18067
18205
  if (quiet) {
18068
18206
  if (!isRemoteFleetResultSuccess(result) || !isRemoteFleetResultActive(result)) {
@@ -18105,8 +18243,11 @@
18105
18243
  return;
18106
18244
  }
18107
18245
 
18108
- bodyView.dataset.remoteFleetDensity = REMOTE_FLEET_MONITOR_SIZE_LEVELS[nextIndex];
18246
+ const nextDensity = REMOTE_FLEET_MONITOR_SIZE_LEVELS[nextIndex];
18247
+ bodyView.dataset.remoteFleetDensity = nextDensity;
18248
+ syncRemoteFleetMonitorSizeSurfaces(nodeId, nextDensity, bodyView, nodeModel);
18109
18249
  renderRemoteFleetMonitor(bodyView, nodeModel);
18250
+ invalidateRemoteFleetMonitorProjection(nodeId, nextDensity, 'size');
18110
18251
  };
18111
18252
 
18112
18253
  bodyView.querySelectorAll('[data-remote-fleet-action]').forEach(button => {
@@ -3706,6 +3706,44 @@
3706
3706
  module._lastOverlayKey = '';
3707
3707
  }
3708
3708
 
3709
+ function invalidateReadonlySource(module, nodeId = '', reason = 'source') {
3710
+ const state = ensureState(module);
3711
+ if (!state) {
3712
+ return false;
3713
+ }
3714
+
3715
+ const id = normalizeId(nodeId);
3716
+ if (id) {
3717
+ state.dirtyNodes.add(id);
3718
+ const card = state.cards.get(selectionCardKey(id)) || null;
3719
+ if (card?.dataset) {
3720
+ card.dataset.contentKey = '';
3721
+ card.dataset.sourceEpoch = '';
3722
+ }
3723
+ } else {
3724
+ state.cards.forEach(card => {
3725
+ if (!card?.dataset) {
3726
+ return;
3727
+ }
3728
+
3729
+ card.dataset.contentKey = '';
3730
+ card.dataset.sourceEpoch = '';
3731
+ });
3732
+ }
3733
+
3734
+ const epoch = bumpReadonlySourceEpoch(module);
3735
+ state.dirtyLayout = true;
3736
+ module._overlayDirty = true;
3737
+ module._lastOverlayKey = '';
3738
+ module.requestAnimationWake?.(`readonly-source:${reason || 'source'}`);
3739
+ window.RuntimeTrace?.emit?.('textOverlay.readonlySourceInvalidated', {
3740
+ nodeId: id,
3741
+ reason: String(reason || 'source'),
3742
+ epoch
3743
+ });
3744
+ return true;
3745
+ }
3746
+
3709
3747
  function hidePassiveSelectionCards(module, state = ensureState(module), options = {}) {
3710
3748
  if (!module || !state) {
3711
3749
  return 0;
@@ -4459,6 +4497,7 @@
4459
4497
  suspendSource: suspendSource,
4460
4498
  resumeSource: resumeSource,
4461
4499
  hasLiveInteractiveOverlay: hasLiveInteractiveOverlay,
4462
- syncReadonlySourceScroll: syncReadonlySourceScroll
4500
+ syncReadonlySourceScroll: syncReadonlySourceScroll,
4501
+ invalidateReadonlySource: invalidateReadonlySource
4463
4502
  };
4464
4503
  })();
@@ -7,8 +7,8 @@
7
7
  <title>MindExec | Run your ideas as AI task graphs</title>
8
8
  <meta name="description" content="MindExec is an AI execution canvas for solo builders, researchers, developers, and creators. Start with free browser tools, then move serious work into saved MindCanvas projects." />
9
9
  <base href="/" />
10
- <link rel="stylesheet" href="_content/MindExecution.Shared/css/app.css?v=20260617-mdm-monitor-wall-v582" />
11
- <link rel="stylesheet" href="_content/MindExecution.Shared/css/mind-map-overrides.css?v=20260617-mdm-monitor-wall-v582" />
10
+ <link rel="stylesheet" href="_content/MindExecution.Shared/css/app.css?v=20260617-mdm-host-lamp-v584" />
11
+ <link rel="stylesheet" href="_content/MindExecution.Shared/css/mind-map-overrides.css?v=20260617-mdm-host-lamp-v584" />
12
12
  <!-- ?쇄뼹??Font Awesome (local) ?쇄뼹??-->
13
13
  <link rel="stylesheet" href="_content/MindExecution.Shared/lib/font-awesome/css/all.min.css" />
14
14
  <!-- ?꿎뼯??-->
@@ -579,7 +579,7 @@
579
579
  }
580
580
 
581
581
  const base = '_content/MindExecution.Shared/js/';
582
- const scriptVersion = '20260617-mdm-monitor-wall-v582';
582
+ const scriptVersion = '20260617-mdm-host-lamp-v584';
583
583
  const scriptUrl = (script) => `${base}${script}?v=${scriptVersion}`;
584
584
  console.log(`[Script Loader] Shared JS version: ${scriptVersion}`);
585
585
  const criticalScripts = [
@@ -1,5 +1,5 @@
1
1
  self.assetsManifest = {
2
- "version": "7b1rjf6s",
2
+ "version": "D5pcdHTt",
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-N0yX4cRkRJsZGixBtFAt5IkDeSMDDcKAmNtERmwuC+0=",
89
+ "hash": "sha256-RSQ+302zp4KqLtkoQdqlFYULUOqzi/VO90NwHsGKcl8=",
90
90
  "url": "_content/MindExecution.Shared/js/mind-map-css3d-manager.js"
91
91
  },
92
92
  {
@@ -154,7 +154,7 @@
154
154
  "url": "_content/MindExecution.Shared/js/mind-map-text-lod-system.js"
155
155
  },
156
156
  {
157
- "hash": "sha256-3l28axG42hfZEY1kU745EtUjPK+at8T9yNb/OERee0U=",
157
+ "hash": "sha256-qwNb+PcesE9rgfkjiJrUOWHz/J2vwDUb6wzJ3j5Zj90=",
158
158
  "url": "_content/MindExecution.Shared/js/mind-map-text-overlay-v2.js"
159
159
  },
160
160
  {
@@ -834,7 +834,7 @@
834
834
  "url": "image-manifest.json"
835
835
  },
836
836
  {
837
- "hash": "sha256-OtihK34SGInpkBV5g69QHYb9Mt/yUTsekpGz4Jl29L0=",
837
+ "hash": "sha256-cQP7X8qq+FUS4hnGN9p8Gya3DsWc9dEG/9XlQWuu1Ms=",
838
838
  "url": "index.html"
839
839
  },
840
840
  {
@@ -1,4 +1,4 @@
1
- /* Manifest version: 7b1rjf6s */
1
+ /* Manifest version: D5pcdHTt */
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