@mindexec/cli 0.2.111 → 0.2.113

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.111",
3
+ "version": "0.2.113",
4
4
  "description": "MindExec local runtime and bridge CLI",
5
5
  "main": "server.js",
6
6
  "type": "module",
package/remote-hub.js CHANGED
@@ -15,11 +15,11 @@ const MAX_AGENT_TASK_CHARS = 4000;
15
15
  const MAX_AGENT_TASK_RESULT_CHARS = 3000;
16
16
  const RECENT_TASK_LIMIT = 12;
17
17
  const RECENT_TASK_BATCH_LIMIT = 16;
18
- const RECENT_FRAME_CACHE_TTL_MS = 5000;
18
+ const RECENT_FRAME_CACHE_TTL_MS = 12000;
19
19
  const RECENT_THUMBNAIL_FRAME_CACHE_LIMIT = 4;
20
- const RECENT_LIVE_FRAME_CACHE_LIMIT = 24;
20
+ const RECENT_LIVE_FRAME_CACHE_LIMIT = 80;
21
21
  const RECENT_THUMBNAIL_FRAME_CACHE_MAX_BYTES = 3 * 1024 * 1024;
22
- const RECENT_LIVE_FRAME_CACHE_MAX_BYTES = 8 * 1024 * 1024;
22
+ const RECENT_LIVE_FRAME_CACHE_MAX_BYTES = 24 * 1024 * 1024;
23
23
  const REMOTE_PROTOCOL_VERSION = 1;
24
24
  const MAX_SYNTHETIC_DEVICES = 1000;
25
25
  const DEFAULT_HOST_TARGET_LEASE_MS = 30000;
@@ -5,7 +5,7 @@
5
5
  const DEBUG = false;
6
6
  const FPS_DEBUG = false;
7
7
  const FRAME_PERF_DEBUG = false;
8
- const MINDMAP_CORE_BUILD_ID = '20260616-project-gallery-rendered-thumb-v569';
8
+ const MINDMAP_CORE_BUILD_ID = '20260616-remote-agent-sticky-overlay-frames-v571';
9
9
  const CanvasPhase = Object.freeze({
10
10
  Booting: 'booting',
11
11
  BoardFileLoading: 'board-file-loading',
@@ -13594,9 +13594,18 @@
13594
13594
 
13595
13595
  function isRemoteFleetFrameSource(value) {
13596
13596
  const source = String(value || '').trim();
13597
- return /^data:image\/(png|jpe?g|webp|svg\+xml);base64,/i.test(source)
13598
- || /^https?:\/\/(?:127(?:\.\d{1,3}){3}|localhost|\[::1\])(?::\d+)?\/api\/remote\//i.test(source)
13599
- || /^\/api\/remote\//i.test(source);
13597
+ if (/^data:image\/(png|jpe?g|webp|svg\+xml);base64,/i.test(source)
13598
+ || /^\/api\/remote\//i.test(source)) {
13599
+ return true;
13600
+ }
13601
+
13602
+ try {
13603
+ const url = new URL(source, window.location?.origin || 'http://localhost');
13604
+ return /^https?:$/i.test(url.protocol)
13605
+ && /^\/api\/remote\//i.test(url.pathname);
13606
+ } catch {
13607
+ return false;
13608
+ }
13600
13609
  }
13601
13610
 
13602
13611
  function getRemoteFleetFrameSource(device, frameKind) {
@@ -13946,9 +13955,9 @@
13946
13955
  }
13947
13956
 
13948
13957
  if (comparePending) {
13949
- const pendingUrl = String(preview.dataset.remoteFleetPendingFrameUrl || '');
13950
- const pendingKind = String(preview.dataset.remoteFleetPendingFrameKind || '').toLowerCase();
13951
- const pendingSeq = Number(preview.dataset.remoteFleetPendingFrameSeq || '0');
13958
+ const pendingUrl = String(preview.dataset.remoteFleetPendingImageUrl || preview.dataset.remoteFleetPendingFrameUrl || '');
13959
+ const pendingKind = String(preview.dataset.remoteFleetPendingImageKind || preview.dataset.remoteFleetPendingFrameKind || '').toLowerCase();
13960
+ const pendingSeq = Number(preview.dataset.remoteFleetPendingImageSeq || preview.dataset.remoteFleetPendingFrameSeq || '0');
13952
13961
  if (pendingUrl) {
13953
13962
  const samePending = pendingKind === frame.kind
13954
13963
  && pendingSeq === nextSeq
@@ -14257,69 +14266,176 @@
14257
14266
  return true;
14258
14267
  }
14259
14268
 
14260
- function applyRemoteFleetFramePatchToPreview(preview, frame) {
14261
- if (String(frame?.kind || '').toLowerCase() === 'live') {
14262
- if (!preview || !isRemoteFleetFrameNewerForPreview(preview, frame, false)) {
14263
- return false;
14264
- }
14269
+ function clearRemoteFleetPendingImageDataset(preview, frame) {
14270
+ if (!preview) {
14271
+ return;
14272
+ }
14265
14273
 
14266
- const image = ensureRemoteFleetFrameImage(preview, frame);
14267
- if (!image) {
14268
- return false;
14269
- }
14274
+ if (!frame
14275
+ || getRemoteFleetFrameIdentity(preview._remoteFleetPendingImageFrame) === getRemoteFleetFrameIdentity(frame)) {
14276
+ delete preview.dataset.remoteFleetPendingImageKind;
14277
+ delete preview.dataset.remoteFleetPendingImageSeq;
14278
+ delete preview.dataset.remoteFleetPendingImageUrl;
14279
+ preview._remoteFleetPendingImageFrame = null;
14280
+ }
14281
+ }
14270
14282
 
14271
- preview._remoteFleetPendingFrame = null;
14272
- delete preview.dataset.remoteFleetPendingFrameKind;
14273
- delete preview.dataset.remoteFleetPendingFrameSeq;
14274
- delete preview.dataset.remoteFleetPendingFrameUrl;
14283
+ function processRemoteFleetImageSwapQueue(preview, image) {
14284
+ if (!preview || !image || preview._remoteFleetImageLoaderActive === true) {
14285
+ return;
14286
+ }
14275
14287
 
14276
- const committed = commitRemoteFleetFrameToPreview(preview, image, cloneRemoteFleetFramePatch(frame));
14277
- if (committed) {
14288
+ const frame = preview._remoteFleetPendingImageFrame;
14289
+ if (!frame || !isRemoteFleetFrameSource(frame.frameUrl)) {
14290
+ clearRemoteFleetPendingImageDataset(preview, frame);
14291
+ return;
14292
+ }
14293
+
14294
+ preview._remoteFleetImageLoaderActive = true;
14295
+ const frameIdentity = getRemoteFleetFrameIdentity(frame);
14296
+ const timeoutMs = Math.max(1500, getRemoteFleetFrameDecodeTimeoutMs(frame));
14297
+ let settled = false;
14298
+ let timeout = null;
14299
+ const loader = new Image();
14300
+
14301
+ const finish = loaded => {
14302
+ if (settled) return;
14303
+ settled = true;
14304
+ if (timeout) {
14305
+ clearTimeout(timeout);
14306
+ timeout = null;
14307
+ }
14308
+
14309
+ const currentPending = preview._remoteFleetPendingImageFrame;
14310
+ const stillLatest = getRemoteFleetFrameIdentity(currentPending) === frameIdentity;
14311
+ let committed = false;
14312
+ if (loaded && stillLatest && document.body.contains(preview)) {
14313
+ committed = commitRemoteFleetFrameToPreview(preview, image, frame);
14278
14314
  window.RuntimeTrace?.emit?.('remote.frame.uiPatched', {
14279
- count: 1,
14315
+ count: committed ? 1 : 0,
14280
14316
  kind: frame.kind,
14281
14317
  seq: frame.frameSeq,
14282
- surface: 'img-direct-live',
14318
+ surface: 'img-preload',
14283
14319
  contentHash: frame.contentHash || '',
14284
14320
  sameContentStreak: Number(frame.sameContentStreak || 0) || 0,
14285
14321
  captureMs: Number(frame.captureMs || 0) || 0
14286
14322
  });
14323
+ } else if (!loaded) {
14324
+ window.RuntimeTrace?.emit?.('remote.frame.imageLoadFailed', {
14325
+ kind: frame.kind,
14326
+ seq: frame.frameSeq,
14327
+ url: frame.frameUrl
14328
+ });
14329
+ }
14330
+
14331
+ if (stillLatest) {
14332
+ clearRemoteFleetPendingImageDataset(preview, frame);
14333
+ }
14334
+
14335
+ preview._remoteFleetImageLoaderActive = false;
14336
+ if (preview._remoteFleetPendingImageFrame) {
14337
+ processRemoteFleetImageSwapQueue(preview, image);
14287
14338
  }
14288
- return committed;
14339
+ };
14340
+
14341
+ timeout = setTimeout(() => finish(false), timeoutMs);
14342
+ loader.decoding = 'async';
14343
+ loader.onload = () => {
14344
+ const decoded = typeof loader.decode === 'function'
14345
+ ? loader.decode().catch(() => undefined)
14346
+ : Promise.resolve();
14347
+ decoded.then(() => finish(true));
14348
+ };
14349
+ loader.onerror = () => finish(false);
14350
+ loader.src = frame.frameUrl;
14351
+ }
14352
+
14353
+ function queueRemoteFleetImageSwap(preview, frame) {
14354
+ if (!preview || !frame || !isRemoteFleetFrameNewerForPreview(preview, frame, true)) {
14355
+ return false;
14356
+ }
14357
+
14358
+ const image = ensureRemoteFleetFrameImage(preview, frame);
14359
+ if (!image) {
14360
+ return false;
14361
+ }
14362
+
14363
+ const nextFrame = cloneRemoteFleetFramePatch(frame);
14364
+ preview._remoteFleetPendingImageFrame = nextFrame;
14365
+ preview.dataset.remoteFleetPendingImageKind = nextFrame.kind;
14366
+ preview.dataset.remoteFleetPendingImageSeq = String(nextFrame.frameSeq || 0);
14367
+ preview.dataset.remoteFleetPendingImageUrl = nextFrame.frameUrl;
14368
+ processRemoteFleetImageSwapQueue(preview, image);
14369
+ return true;
14370
+ }
14371
+
14372
+ function applyRemoteFleetFramePatchToPreview(preview, frame) {
14373
+ if (String(frame?.kind || '').toLowerCase() === 'live') {
14374
+ preview._remoteFleetPendingFrame = null;
14375
+ delete preview.dataset.remoteFleetPendingFrameKind;
14376
+ delete preview.dataset.remoteFleetPendingFrameSeq;
14377
+ delete preview.dataset.remoteFleetPendingFrameUrl;
14378
+ return queueRemoteFleetImageSwap(preview, frame);
14289
14379
  }
14290
14380
 
14291
14381
  return queueRemoteFleetFramePaint(preview, frame);
14292
14382
  }
14293
14383
 
14384
+ function getRemoteFleetFramePatchTargets(bodyView) {
14385
+ const targets = [];
14386
+ const addTarget = target => {
14387
+ if (target && document.body.contains(target) && !targets.includes(target)) {
14388
+ targets.push(target);
14389
+ }
14390
+ };
14391
+
14392
+ addTarget(bodyView);
14393
+ const nodeId = String(bodyView?.dataset?.nodeId || '').trim();
14394
+ if (nodeId) {
14395
+ document.querySelectorAll('.map-node-remote-fleet__body[data-node-id]').forEach(candidate => {
14396
+ if (String(candidate.dataset.nodeId || '').trim() === nodeId) {
14397
+ addTarget(candidate);
14398
+ }
14399
+ });
14400
+ }
14401
+
14402
+ return targets;
14403
+ }
14404
+
14294
14405
  function applyRemoteFleetFramePatches(bodyView, patches) {
14295
14406
  if (!bodyView || !Array.isArray(patches) || patches.length === 0) {
14296
14407
  return 0;
14297
14408
  }
14298
14409
 
14410
+ const targets = getRemoteFleetFramePatchTargets(bodyView);
14299
14411
  let applied = 0;
14300
14412
  patches.forEach(frame => {
14301
14413
  const deviceId = String(frame?.deviceId || '').trim();
14302
14414
  if (!deviceId) return;
14415
+ const frameKind = String(frame.kind || '').toLowerCase();
14416
+
14417
+ targets.forEach(target => {
14418
+ target.querySelectorAll('[data-remote-fleet-device-preview][data-device-id]').forEach(preview => {
14419
+ if (String(preview.dataset.deviceId || '').trim() !== deviceId) return;
14420
+ const currentKind = String(preview.dataset.remoteFleetFrameKind || '').toLowerCase();
14421
+ if (currentKind === 'live' && frameKind !== 'live') return;
14422
+ if (applyRemoteFleetFramePatchToPreview(preview, frame)) {
14423
+ applied += 1;
14424
+ }
14425
+ });
14303
14426
 
14304
- bodyView.querySelectorAll('[data-remote-fleet-device-preview][data-device-id]').forEach(preview => {
14305
- if (String(preview.dataset.deviceId || '').trim() !== deviceId) return;
14306
- const currentKind = String(preview.dataset.remoteFleetFrameKind || '').toLowerCase();
14307
- if (currentKind === 'live' && frame.kind !== 'live') return;
14308
- if (applyRemoteFleetFramePatchToPreview(preview, frame)) {
14309
- applied += 1;
14310
- }
14311
- });
14312
-
14313
- bodyView.querySelectorAll(`article[data-device-id]`).forEach(card => {
14314
- if (String(card.dataset.deviceId || '').trim() === deviceId && frame.kind) {
14315
- card.dataset.remoteFleetHasFrame = 'true';
14316
- }
14427
+ target.querySelectorAll(`article[data-device-id]`).forEach(card => {
14428
+ if (String(card.dataset.deviceId || '').trim() === deviceId && frame.kind) {
14429
+ card.dataset.remoteFleetHasFrame = 'true';
14430
+ }
14431
+ });
14317
14432
  });
14318
14433
  });
14319
14434
 
14320
14435
  if (applied > 0) {
14321
14436
  window.RuntimeTrace?.emit?.('remote.frame.uiQueued', {
14322
- count: applied
14437
+ count: applied,
14438
+ targets: targets.length
14323
14439
  });
14324
14440
  }
14325
14441
 
@@ -14343,8 +14459,10 @@
14343
14459
  lastTick = timestamp;
14344
14460
  bodyView._remoteFleetFrameRefreshInFlight = true;
14345
14461
  Promise.resolve(refreshCallback())
14346
- .catch(() => {
14347
- clearRemoteFleetTimers(bodyView);
14462
+ .catch(error => {
14463
+ window.RuntimeTrace?.emit?.('remote.frame.refreshFailed', {
14464
+ error: error?.message || String(error || '')
14465
+ });
14348
14466
  })
14349
14467
  .finally(() => {
14350
14468
  bodyView._remoteFleetFrameRefreshInFlight = false;
@@ -16403,6 +16521,16 @@
16403
16521
  error: error?.message || String(error || '')
16404
16522
  });
16405
16523
  }
16524
+
16525
+ try {
16526
+ await refreshRemoteFleetVisibleLiveFrames();
16527
+ } catch (error) {
16528
+ window.RuntimeTrace?.emit?.('remote.live.initialFrameFailed', {
16529
+ nodeId,
16530
+ started,
16531
+ error: error?.message || String(error || '')
16532
+ });
16533
+ }
16406
16534
  }
16407
16535
 
16408
16536
  return lastResult || { success: started > 0, started };
@@ -16427,7 +16555,10 @@
16427
16555
  return result;
16428
16556
  };
16429
16557
  const refreshRemoteFleetVisibleLiveFrames = async () => {
16430
- const deviceIds = getVisibleLiveFrameDeviceIds();
16558
+ let deviceIds = getVisibleLiveFrameDeviceIds();
16559
+ if (deviceIds.length === 0) {
16560
+ deviceIds = getVisibleFrameDeviceIds();
16561
+ }
16431
16562
  if (deviceIds.length === 0) {
16432
16563
  return null;
16433
16564
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mainAssemblyName": "MindExecution.Web",
3
3
  "resources": {
4
- "hash": "sha256-bvM7vg7AblT/seEKoL+4Phy9dck9BgqkamjNDnfDpwg=",
4
+ "hash": "sha256-8Fvmr2gwPca8frlDucd8gkb1BGymLVRCbTINI76yI5s=",
5
5
  "fingerprinting": {
6
6
  "Google.Protobuf.9h59ukbel7.dll": "Google.Protobuf.dll",
7
7
  "Markdig.d1j7v41cl1.dll": "Markdig.dll",
@@ -132,7 +132,7 @@
132
132
  "MindExecution.Plugins.PlanMaster.yfeqppy3kf.dll": "MindExecution.Plugins.PlanMaster.dll",
133
133
  "MindExecution.Plugins.YouTube.vzjd4jwanl.dll": "MindExecution.Plugins.YouTube.dll",
134
134
  "MindExecution.Shared.6xjhkrpfwd.dll": "MindExecution.Shared.dll",
135
- "MindExecution.Web.eo8m63n3u0.dll": "MindExecution.Web.dll",
135
+ "MindExecution.Web.03g8r8265y.dll": "MindExecution.Web.dll",
136
136
  "dotnet.js": "dotnet.js",
137
137
  "dotnet.native.qc8g39g30v.js": "dotnet.native.js",
138
138
  "dotnet.native.boem75ye5i.wasm": "dotnet.native.wasm",
@@ -283,7 +283,7 @@
283
283
  "MindExecution.Plugins.Concept.e1j4pkp0uf.dll": "sha256-nq1Uv/H+JSyGBzGym6AKbVMSa53sktNACog3+JqITI4=",
284
284
  "MindExecution.Plugins.PlanMaster.yfeqppy3kf.dll": "sha256-YpcXMAmctAWAbfzFrfcYmk3sOo7j8hZGGKsrv4VgqUs=",
285
285
  "MindExecution.Shared.6xjhkrpfwd.dll": "sha256-5lCRRlgeky/uSmxPrO5acuFLOjfRphWQwSyVY5E1Tq8=",
286
- "MindExecution.Web.eo8m63n3u0.dll": "sha256-kkgzLA1bgfPC2NiwMUdDwfXy+BCl672u6ZTZiqhY/qc="
286
+ "MindExecution.Web.03g8r8265y.dll": "sha256-lEHwMVSR1YHsNoejZYt53SRBrYrN/4Ak7dqMqNEnXrg="
287
287
  },
288
288
  "lazyAssembly": {
289
289
  "MindExecution.Plugins.Admin.gxzwlji1cf.dll": "sha256-5D5B2ZuUMj46zBMgH2dRA7CbQf++uukMPrEliFLuZWs=",
@@ -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=20260616-project-gallery-rendered-thumb-v569" />
11
- <link rel="stylesheet" href="_content/MindExecution.Shared/css/mind-map-overrides.css?v=20260616-project-gallery-rendered-thumb-v569" />
10
+ <link rel="stylesheet" href="_content/MindExecution.Shared/css/app.css?v=20260616-remote-agent-sticky-overlay-frames-v571" />
11
+ <link rel="stylesheet" href="_content/MindExecution.Shared/css/mind-map-overrides.css?v=20260616-remote-agent-sticky-overlay-frames-v571" />
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 = '20260616-project-gallery-rendered-thumb-v569';
582
+ const scriptVersion = '20260616-remote-agent-sticky-overlay-frames-v571';
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": "rvvD2Jxd",
2
+ "version": "WOO5ml3v",
3
3
  "assets": [
4
4
  {
5
5
  "hash": "sha256-+CSYMcqLNTsq3VnH11jgYyOCCdxvHzL74CBmo4sCmMU=",
@@ -78,7 +78,7 @@
78
78
  "url": "_content/MindExecution.Shared/js/marked.min.js"
79
79
  },
80
80
  {
81
- "hash": "sha256-I8levbQOMKm6+itQSEpmYXvCO/n1P5WLJT/PA/4b+CE=",
81
+ "hash": "sha256-UtXpHLTnYeP2BPz7IAicclCMMdLjzYd29I+u5rMi270=",
82
82
  "url": "_content/MindExecution.Shared/js/mind-map-core.js"
83
83
  },
84
84
  {
@@ -86,7 +86,7 @@
86
86
  "url": "_content/MindExecution.Shared/js/mind-map-core.js.backup"
87
87
  },
88
88
  {
89
- "hash": "sha256-/o9b8Gda8DwgDGaq9RBwBXb8C8uSvhppHN1cNPpUwO0=",
89
+ "hash": "sha256-itUEN+HfFS2lC/aHq02RNF70gDWhggsJok0F3uOLHT0=",
90
90
  "url": "_content/MindExecution.Shared/js/mind-map-css3d-manager.js"
91
91
  },
92
92
  {
@@ -446,8 +446,8 @@
446
446
  "url": "_framework/MindExecution.Shared.6xjhkrpfwd.dll"
447
447
  },
448
448
  {
449
- "hash": "sha256-kkgzLA1bgfPC2NiwMUdDwfXy+BCl672u6ZTZiqhY/qc=",
450
- "url": "_framework/MindExecution.Web.eo8m63n3u0.dll"
449
+ "hash": "sha256-lEHwMVSR1YHsNoejZYt53SRBrYrN/4Ak7dqMqNEnXrg=",
450
+ "url": "_framework/MindExecution.Web.03g8r8265y.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-BonMttrGCHvOz6hIMPLexN5XuSfRwKz3bAhpBPwosIQ=",
773
+ "hash": "sha256-pATnlidoWPOV2BpRonMlb3bDjtALaA8sXI+DiPFY4/0=",
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-UFZB2qaCXJGdgOPtv+tajsidaEOVYIjhWAHHu76lw28=",
837
+ "hash": "sha256-fojDZj+Dr+k8SI1esa0xdrCRBfXVHxr+cLNb3bvD7t8=",
838
838
  "url": "index.html"
839
839
  },
840
840
  {
@@ -1,4 +1,4 @@
1
- /* Manifest version: rvvD2Jxd */
1
+ /* Manifest version: WOO5ml3v */
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