@mindexec/cli 0.2.312 → 0.2.314

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.312",
3
+ "version": "0.2.314",
4
4
  "description": "MindExec local runtime and bridge CLI",
5
5
  "main": "server.js",
6
6
  "type": "module",
package/server.js CHANGED
@@ -6475,6 +6475,22 @@ function isRemoteHostTargetRenewSoftSkipReason(reason) {
6475
6475
  .test(String(reason || '').trim());
6476
6476
  }
6477
6477
 
6478
+ function getRemoteHostTargetRegistryErrorReason(error) {
6479
+ const statusCode = Number(error?.statusCode || 0);
6480
+ const text = String(error?.message || error || '');
6481
+ if (statusCode === 401
6482
+ || statusCode === 403
6483
+ || /registry-(rest|rpc)[^ ]*-40[13]|JWT expired|PGRST303/i.test(text)) {
6484
+ return 'registry-not-authenticated';
6485
+ }
6486
+
6487
+ if (/PGRST20[25]|remote_host_targets|set_remote_host_target|clear_remote_host_target/i.test(text)) {
6488
+ return 'registry-table-unavailable';
6489
+ }
6490
+
6491
+ return 'registry-publish-failed';
6492
+ }
6493
+
6478
6494
  async function publishLocalRemoteHostTargetToRegistry(hub, { takeover = false } = {}) {
6479
6495
  const registryPayload = buildRemoteHostTargetRegistryPayload(hub);
6480
6496
  if (!registryPayload.ok) {
@@ -6500,14 +6516,33 @@ async function publishLocalRemoteHostTargetToRegistry(hub, { takeover = false }
6500
6516
  };
6501
6517
  }
6502
6518
 
6503
- const row = await callRemoteRegistryRpc(
6504
- context.config,
6505
- context.session,
6506
- 'set_remote_host_target',
6507
- {
6508
- ...registryPayload.payload,
6509
- p_takeover: takeover === true
6510
- });
6519
+ let row = null;
6520
+ try {
6521
+ row = await callRemoteRegistryRpc(
6522
+ context.config,
6523
+ context.session,
6524
+ 'set_remote_host_target',
6525
+ {
6526
+ ...registryPayload.payload,
6527
+ p_takeover: takeover === true
6528
+ });
6529
+ } catch (error) {
6530
+ const reason = getRemoteHostTargetRegistryErrorReason(error);
6531
+ return {
6532
+ ok: false,
6533
+ active: false,
6534
+ reason,
6535
+ error: error?.message || String(error || reason),
6536
+ endpoint: registryPayload.endpoint,
6537
+ endpointCandidates: registryPayload.endpointCandidates,
6538
+ leaseId: registryPayload.leaseId,
6539
+ nodeId: registryPayload.nodeId,
6540
+ hostInstanceId: registryPayload.hostInstanceId,
6541
+ expiresAt: registryPayload.expiresAt,
6542
+ stale: false
6543
+ };
6544
+ }
6545
+
6511
6546
  const reason = row.reason || (row.ok ? 'ok' : 'registry-publish-failed');
6512
6547
  return {
6513
6548
  ok: row.ok,
@@ -6837,6 +6872,30 @@ async function runRemoteHostTargetRenewOnce(trigger = 'timer', options = {}) {
6837
6872
  retryDelay,
6838
6873
  registry.ok ? 'renewed' : 'renew-skipped');
6839
6874
  return serializeRemoteHostTargetRenewState();
6875
+ } catch (error) {
6876
+ const currentHub = remoteHub.getStatus({ includeSecrets: true });
6877
+ const reason = getRemoteHostTargetRegistryErrorReason(error);
6878
+ updateRemoteHostTargetRenewState({
6879
+ status: 'skipped',
6880
+ reason,
6881
+ nodeId: currentHub?.hostTargetNodeId || remoteHostTargetRenewState.nodeId,
6882
+ leaseId: currentHub?.hostTargetLeaseId || remoteHostTargetRenewState.leaseId,
6883
+ hostInstanceId: currentHub?.hostTargetHostInstanceId || currentHub?.hostInstanceId || remoteHostTargetRenewState.hostInstanceId,
6884
+ endpoint: currentHub?.hostTargetEndpoint || remoteHostTargetRenewState.endpoint,
6885
+ endpointCandidates: currentHub?.hostTargetEndpointCandidates || remoteHostTargetRenewState.endpointCandidates || [],
6886
+ expiresAt: currentHub?.hostTargetExpiresAt || remoteHostTargetRenewState.expiresAt,
6887
+ lastAttemptAt: attemptedAt,
6888
+ lastError: isRemoteHostTargetRenewSoftSkipReason(reason)
6889
+ ? ''
6890
+ : (error?.message || String(error || reason))
6891
+ });
6892
+ logRemoteHostTargetRenew('skipped', reason, remoteHostTargetRenewState.endpoint);
6893
+ scheduleRemoteHostTargetRenew(
6894
+ isRemoteHostTargetRenewSoftSkipReason(reason)
6895
+ ? REMOTE_HOST_TARGET_RENEW_MS
6896
+ : REMOTE_REGISTRY_FOLLOWER_FAST_RETRY_MS,
6897
+ 'renew-error');
6898
+ return serializeRemoteHostTargetRenewState();
6840
6899
  } finally {
6841
6900
  remoteHostTargetRenewInFlight = false;
6842
6901
  }
@@ -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 = '20260621-overlay-motion-single-host-v796';
8
+ const MINDMAP_CORE_BUILD_ID = '20260621-image-status-motion-v797';
9
9
  const CanvasPhase = Object.freeze({
10
10
  Booting: 'booting',
11
11
  BoardFileLoading: 'board-file-loading',
@@ -517,6 +517,85 @@
517
517
  return false;
518
518
  }
519
519
 
520
+ function isCssImageElementReady(cssObject) {
521
+ const mediaEl = cssObject?.element?.querySelector?.('img') || null;
522
+ if (!mediaEl) {
523
+ return false;
524
+ }
525
+
526
+ const mediaReady = String(mediaEl.dataset?.mediaReady || '').trim();
527
+ const naturalWidth = Number(mediaEl.naturalWidth || mediaEl.width || 0);
528
+ const naturalHeight = Number(mediaEl.naturalHeight || mediaEl.height || 0);
529
+ return mediaReady === '1' ||
530
+ (
531
+ mediaEl.complete === true &&
532
+ naturalWidth > 0 &&
533
+ naturalHeight > 0 &&
534
+ getComputedStyle(mediaEl).opacity !== '0'
535
+ );
536
+ }
537
+
538
+ function isVisibleImageStatusWebglDependency(entry) {
539
+ const model = entry?.model || {};
540
+ const contentType = String(model.contentType ?? model.ContentType ?? '').trim().toLowerCase();
541
+ if (contentType !== 'image') {
542
+ return false;
543
+ }
544
+
545
+ const body = entry?.bodyMesh || entry?.glObject?.getObjectByName?.('body') || null;
546
+ const bodyUserData = body?.userData || {};
547
+ const metadata = model.metadata ?? model.Metadata ?? {};
548
+ const hasImageError = !!(
549
+ String(metadata?.ImageGenerationError || '').trim() ||
550
+ String(bodyUserData.failedImageRenderKey || '').trim() ||
551
+ String(model._assetRefreshState || '').trim().toLowerCase() === 'failed'
552
+ );
553
+ const cssImageReady = isCssImageElementReady(entry?.cssObject);
554
+ const bridgeBodyVisible = model._showImageBodyInCssMode === true && cssImageReady !== true;
555
+ return hasImageError || bridgeBodyVisible;
556
+ }
557
+
558
+ function hasVisibleImageStatusWebglMotionDependency(module) {
559
+ const nodeObjectsById = module?.nodeObjectsById || null;
560
+ if (!(nodeObjectsById instanceof Map)) {
561
+ return false;
562
+ }
563
+
564
+ const visibleIds = module._visibleIds instanceof Set && module._visibleIds.size > 0
565
+ ? module._visibleIds
566
+ : (module._prevVisibleIds instanceof Set && module._prevVisibleIds.size > 0
567
+ ? module._prevVisibleIds
568
+ : null);
569
+ if (!visibleIds) {
570
+ return false;
571
+ }
572
+
573
+ const cacheKey = [
574
+ Number(module._visibilityVersion || 0),
575
+ Number(module.lodRenderer?._lodVisualEpoch || 0),
576
+ Number(visibleIds.size || 0),
577
+ Number(module.frameCount || 0)
578
+ ].join('|');
579
+ if (module._visibleImageStatusWebglMotionDependencyCache?.key === cacheKey) {
580
+ return module._visibleImageStatusWebglMotionDependencyCache.value === true;
581
+ }
582
+
583
+ let hasDependency = false;
584
+ visibleIds.forEach(nodeId => {
585
+ if (hasDependency === true) {
586
+ return;
587
+ }
588
+
589
+ hasDependency = isVisibleImageStatusWebglDependency(nodeObjectsById.get(nodeId)) === true;
590
+ });
591
+
592
+ module._visibleImageStatusWebglMotionDependencyCache = {
593
+ key: cacheKey,
594
+ value: hasDependency
595
+ };
596
+ return hasDependency;
597
+ }
598
+
520
599
  function isLocalSnapGridOnlyTheme(module) {
521
600
  return module?.currentThemeObject?.userData?.localSnapGrid === true;
522
601
  }
@@ -785,6 +864,10 @@
785
864
  return false;
786
865
  }
787
866
 
867
+ if (hasVisibleImageStatusWebglMotionDependency(module) === true) {
868
+ return false;
869
+ }
870
+
788
871
  const renderer = module.cssRenderer || null;
789
872
  const camera = module.camera || null;
790
873
  const flags = options.renderDebugFlags || module.renderDebugFlags || getRenderDebugFlagsSnapshot();
@@ -6213,6 +6296,10 @@ ${summaryLines.map(line => `<div>${escapeNodeFrameDebugHtml(line)}</div>`).join(
6213
6296
  return false;
6214
6297
  }
6215
6298
 
6299
+ if (hasVisibleImageStatusWebglMotionDependency(this) === true) {
6300
+ return false;
6301
+ }
6302
+
6216
6303
  const currentX = Number(this.camera.position?.x || 0);
6217
6304
  const currentY = Number(this.camera.position?.y || 0);
6218
6305
  const currentZ = Number(this.camera.position?.z || 1);
@@ -51,7 +51,7 @@
51
51
  // ▲▲▲ [Usage] ▲▲▲
52
52
 
53
53
  // Procedural line rendering settings
54
- const LOD_RENDERER_BUILD_ID = '20260621-overlay-motion-single-host-v796';
54
+ const LOD_RENDERER_BUILD_ID = '20260621-image-status-motion-v797';
55
55
  const DirtyKind = Object.freeze({
56
56
  ResidentFullRebuild: 'resident-full-rebuild',
57
57
  ResidentPatch: 'resident-patch',
@@ -7,8 +7,8 @@
7
7
  <title>MindExec | Business Execution OS for solo builders</title>
8
8
  <meta name="description" content="MindExec is an AI business execution OS for solo builders who want to turn notes, research, assets, and repeatable execution Skills into revenue-producing work." />
9
9
  <base href="/" />
10
- <link rel="stylesheet" href="_content/MindExecution.Shared/css/app.css?v=20260621-overlay-motion-single-host-v796" />
11
- <link rel="stylesheet" href="_content/MindExecution.Shared/css/mind-map-overrides.css?v=20260621-overlay-motion-single-host-v796" />
10
+ <link rel="stylesheet" href="_content/MindExecution.Shared/css/app.css?v=20260621-image-status-motion-v797" />
11
+ <link rel="stylesheet" href="_content/MindExecution.Shared/css/mind-map-overrides.css?v=20260621-image-status-motion-v797" />
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 = '20260621-overlay-motion-single-host-v796';
582
+ const scriptVersion = '20260621-image-status-motion-v797';
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": "/p0QLLkC",
2
+ "version": "wFN1UJXT",
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-841Z8gRUoJjzLhSNKqWJf7uAf3mftl5gTaSXmtafFdI=",
81
+ "hash": "sha256-thTfHQlQm3nsiP4n/lNhLoVtAUv4rw/dsFDZHjD3yLE=",
82
82
  "url": "_content/MindExecution.Shared/js/mind-map-core.js"
83
83
  },
84
84
  {
@@ -114,7 +114,7 @@
114
114
  "url": "_content/MindExecution.Shared/js/mind-map-lod-plan-worker.js"
115
115
  },
116
116
  {
117
- "hash": "sha256-NsBzTMi5Oqtq1uvHtKW4z5pfbx0ED8GRYeLLDeQzRPY=",
117
+ "hash": "sha256-sLOCNMHkGa+Z4ZTEWKFBTFnBLy02dJKqoEqE2/kvBkg=",
118
118
  "url": "_content/MindExecution.Shared/js/mind-map-lod-renderer.js"
119
119
  },
120
120
  {
@@ -834,7 +834,7 @@
834
834
  "url": "image-manifest.json"
835
835
  },
836
836
  {
837
- "hash": "sha256-zkcWFHtOVt22wq6yvcr4IlAWMRtnMjU2eaPZfUuXqX8=",
837
+ "hash": "sha256-7SMiDFZNZ7teL59KIbKhRhiR0+OKDVx8zX33YhGTeq4=",
838
838
  "url": "index.html"
839
839
  },
840
840
  {
@@ -1,4 +1,4 @@
1
- /* Manifest version: /p0QLLkC */
1
+ /* Manifest version: wFN1UJXT */
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