@andespindola/brainlink 0.1.0-beta.93 → 0.1.0-beta.95

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/README.md CHANGED
@@ -602,7 +602,7 @@ The graph UI shows:
602
602
  - WebGL node and edge acceleration when supported, falling back to Canvas 2D without changing graph behavior
603
603
  - compact macro-to-micro density progression so reset keeps the graph mass oriented and zoom-in separates local neighborhoods progressively
604
604
  - graph camera treats hub-centered navigation as structural only when the hub is dominant; diffuse stress graphs reset and zoom around the full graph mass
605
- - graph LOD progression: graphs up to 1000 notes render directly; larger graphs use a compact memory-hub-centered mesh of alpha-particle 1000-note points, zoom-in keeps focused child clusters latent at the parent position before fading them in and only then separating them through 500-note, 250-note, 125-note and 60-note subgraphs with aggregated real links plus local sibling mesh links, keeps parent points during expansion to avoid visual jumps, then progressively raises the focused node budget so local areas keep nearby notes and links visible
605
+ - graph LOD progression: graphs up to 1000 notes render directly; larger graphs use a compact memory-hub-centered mesh of alpha-particle 1000-note points, zoom-in keeps focused child clusters latent at the parent position before fading them in and only then separating them through 500-note, 250-note, 125-note, 60-note, 30-note, 15-note and 8-note subgraphs with aggregated real links plus local sibling mesh links, and in massive graphs keeps this subgraph mode active much longer with finer wheel steps so deep zoom does not abruptly switch to a broad sampled node cloud
606
606
 
607
607
  The server indexes before starting by default. Use `--no-index` to skip that step:
608
608
 
@@ -23,11 +23,12 @@ const transformCoordinateLimit = 20_000_000
23
23
  const hoverHitTestIntervalMs = 64
24
24
  const ecosystemGroupSize = 1000
25
25
  const ecosystemActivationNodeThreshold = 1000
26
- const ecosystemGroupSizes = [1000, 500, 250, 125, 60]
26
+ const ecosystemGroupSizes = [1000, 500, 250, 125, 60, 30, 15, 8]
27
27
  const ecosystemClusterEdgeLimit = 520
28
28
  const ecosystemHubEdgeLimit = 120
29
29
  const ecosystemSiblingEdgeLimit = 180
30
30
  const ecosystemClusterScaleThreshold = 0.78
31
+ const massiveEcosystemClusterScaleThreshold = 4.2
31
32
  const ecosystemSubgraphScaleThreshold = 0.18
32
33
  const ecosystemMicroScaleThreshold = 0.08
33
34
  const ecosystemFocusedParentLimit = 2
@@ -35,7 +36,10 @@ const ecosystemExpansionLevels = [
35
36
  { parentSize: 1000, childSize: 500, start: 0.04, end: 0.62 },
36
37
  { parentSize: 500, childSize: 250, start: 0.16, end: 0.72 },
37
38
  { parentSize: 250, childSize: 125, start: 0.3, end: 0.78 },
38
- { parentSize: 125, childSize: 60, start: 0.46, end: 0.86 }
39
+ { parentSize: 125, childSize: 60, start: 0.46, end: 0.86 },
40
+ { parentSize: 60, childSize: 30, start: 0.64, end: 1.06 },
41
+ { parentSize: 30, childSize: 15, start: 0.84, end: 1.38 },
42
+ { parentSize: 15, childSize: 8, start: 1.08, end: 1.82 }
39
43
  ]
40
44
  const zoomRecoveryGuardMs = 4200
41
45
  const zoomCapTargetViewportShare = 0.72
@@ -747,7 +751,10 @@ const ecosystemLayoutSpacingForSize = size => {
747
751
  if (size >= 500) return 92
748
752
  if (size >= 250) return 52
749
753
  if (size >= 125) return 28
750
- return 16
754
+ if (size >= 60) return 16
755
+ if (size >= 30) return 11
756
+ if (size >= 15) return 7
757
+ return 5
751
758
  }
752
759
 
753
760
  const ecosystemCompactPoint = (index, total, center, spacing) => {
@@ -2531,8 +2538,22 @@ const clusterRadiusPx = cluster => {
2531
2538
  return 3.2
2532
2539
  }
2533
2540
  if (String(cluster.id).startsWith('ecosystem-')) {
2534
- const base = cluster.size >= 1000 ? 0.68 : cluster.size >= 500 ? 0.64 : cluster.size >= 250 ? 0.6 : cluster.size >= 125 ? 0.56 : 0.52
2535
- return Math.max(0.5, Math.min(1.55, base + Math.log10(cluster.count + 1) * 0.12))
2541
+ const base = cluster.size >= 1000
2542
+ ? 0.64
2543
+ : cluster.size >= 500
2544
+ ? 0.6
2545
+ : cluster.size >= 250
2546
+ ? 0.56
2547
+ : cluster.size >= 125
2548
+ ? 0.52
2549
+ : cluster.size >= 60
2550
+ ? 0.5
2551
+ : cluster.size >= 30
2552
+ ? 0.58
2553
+ : cluster.size >= 15
2554
+ ? 0.72
2555
+ : 0.86
2556
+ return Math.max(0.48, Math.min(1.75, base + Math.log10(cluster.count + 1) * 0.11))
2536
2557
  }
2537
2558
  return Math.max(8, Math.min(28, 8 + Math.log2(cluster.count + 1) * 3))
2538
2559
  }
@@ -2701,9 +2722,12 @@ const computeRenderVisibility = () => {
2701
2722
  return
2702
2723
  }
2703
2724
 
2725
+ const ecosystemScaleThreshold = state.visibleNodes.length > massiveGraphNodeThreshold
2726
+ ? massiveEcosystemClusterScaleThreshold
2727
+ : ecosystemClusterScaleThreshold
2704
2728
  if (
2705
2729
  state.visibleNodes.length > ecosystemActivationNodeThreshold &&
2706
- state.transform.scale <= ecosystemClusterScaleThreshold &&
2730
+ state.transform.scale <= ecosystemScaleThreshold &&
2707
2731
  state.ecosystemClusters.length > 0
2708
2732
  ) {
2709
2733
  const clusters = selectHierarchicalEcosystemClusters(viewport)
@@ -3157,10 +3181,16 @@ const wheelZoomFactor = event => {
3157
3181
  return 1
3158
3182
  }
3159
3183
 
3160
- const sensitivity = wheelZoomExponent * (isModifierZoom ? wheelZoomModifierBoost : 1)
3184
+ const isMassiveEcosystemZoom =
3185
+ state.visibleNodes.length > massiveGraphNodeThreshold &&
3186
+ state.transform.scale <= massiveEcosystemClusterScaleThreshold
3187
+ const sensitivityMultiplier = isMassiveEcosystemZoom ? 0.48 : 1
3188
+ const capMultiplier = isMassiveEcosystemZoom ? 0.34 : 1
3189
+ const sensitivity = wheelZoomExponent * (isModifierZoom ? wheelZoomModifierBoost : 1) * sensitivityMultiplier
3190
+ const exponentCap = wheelZoomExponentCap * capMultiplier
3161
3191
  const exponent = Math.max(
3162
- -wheelZoomExponentCap,
3163
- Math.min(wheelZoomExponentCap, -normalizedDelta * sensitivity)
3192
+ -exponentCap,
3193
+ Math.min(exponentCap, -normalizedDelta * sensitivity)
3164
3194
  )
3165
3195
  return Math.exp(exponent)
3166
3196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andespindola/brainlink",
3
- "version": "0.1.0-beta.93",
3
+ "version": "0.1.0-beta.95",
4
4
  "description": "Local-first knowledge memory for agents with Markdown, backlinks, indexing and context retrieval.",
5
5
  "type": "module",
6
6
  "license": "MIT",