get-claudia 1.36.0 → 1.36.1
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/bin/index.js
CHANGED
|
@@ -412,13 +412,15 @@ async function main() {
|
|
|
412
412
|
runGatewaySetup((gatewayOk) => maybeRunRelay(memoryInstalled, visualizerInstalled, gatewayOk));
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
// Helper: auto-install visualizer after memory
|
|
415
|
+
// Helper: auto-install visualizer after memory, then chain to gateway
|
|
416
|
+
// On upgrades, always attempt visualizer install even if memory step had issues,
|
|
417
|
+
// since the database likely already exists from a prior install.
|
|
416
418
|
function maybeRunVisualizer(memoryInstalled) {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
+
const memoryDbExists = existsSync(join(homedir(), '.claudia', 'memory'));
|
|
420
|
+
if (memoryInstalled || isUpgrade || memoryDbExists) {
|
|
419
421
|
runVisualizerSetup((vizOk) => maybeRunGateway(memoryInstalled, vizOk));
|
|
420
422
|
} else {
|
|
421
|
-
//
|
|
423
|
+
// Fresh install with no memory system -- skip visualizer
|
|
422
424
|
maybeRunGateway(memoryInstalled, false);
|
|
423
425
|
}
|
|
424
426
|
}
|
package/package.json
CHANGED
|
@@ -94,13 +94,13 @@ export const config = {
|
|
|
94
94
|
curvature: 0.09, // base curvature
|
|
95
95
|
curvatureStrength: 0.1, // additional curvature per strength
|
|
96
96
|
tubeRadius: 0.15, // base radius for normal links
|
|
97
|
-
highlightRadius:
|
|
97
|
+
highlightRadius: 0.8, // multiplier for highlighted links
|
|
98
98
|
tubularSegments: 20,
|
|
99
99
|
radialSegments: 6,
|
|
100
100
|
|
|
101
101
|
// Opacity
|
|
102
102
|
opacity: 0.27,
|
|
103
|
-
highlightOpacity: 0.
|
|
103
|
+
highlightOpacity: 0.45,
|
|
104
104
|
historicalOpacity: 0.04,
|
|
105
105
|
|
|
106
106
|
// Memory-entity lines
|
|
@@ -128,7 +128,7 @@ export const config = {
|
|
|
128
128
|
speedVariance: 0.001,
|
|
129
129
|
size: 2.5,
|
|
130
130
|
opacity: 0.8,
|
|
131
|
-
highlightCount:
|
|
131
|
+
highlightCount: 3,
|
|
132
132
|
forwardCount: 2,
|
|
133
133
|
strongCount: 1,
|
|
134
134
|
strongThreshold: 0.6
|
|
@@ -323,19 +323,22 @@ function bundleEdges(meshes, scene) {
|
|
|
323
323
|
|
|
324
324
|
// 2. Iteratively attract nearby control points
|
|
325
325
|
for (let iter = 0; iter < iterations; iter++) {
|
|
326
|
+
// Decreasing step size per iteration for convergence
|
|
327
|
+
const iterScale = 1 / (iter + 1);
|
|
328
|
+
|
|
326
329
|
for (let ei = 0; ei < edgePoints.length; ei++) {
|
|
327
330
|
const edgeA = edgePoints[ei];
|
|
328
331
|
|
|
329
332
|
for (let pi = 1; pi <= numSegments; pi++) {
|
|
330
333
|
const pointA = edgeA.points[pi];
|
|
331
334
|
|
|
332
|
-
// Endpoint stiffness: points
|
|
335
|
+
// Endpoint stiffness: middle points move freely, endpoints resist
|
|
336
|
+
// At t=0.5 (middle): factor=1.0, at t=0 or t=1 (endpoints): factor=1-stiffness
|
|
333
337
|
const tNorm = pi / (numSegments + 1);
|
|
334
|
-
const endpointFactor = 1 - stiffness *
|
|
338
|
+
const endpointFactor = 1 - stiffness * 4 * Math.pow(tNorm - 0.5, 2);
|
|
335
339
|
|
|
336
340
|
// Attract toward nearby control points from other edges
|
|
337
341
|
let forceX = 0, forceY = 0, forceZ = 0;
|
|
338
|
-
let neighbors = 0;
|
|
339
342
|
|
|
340
343
|
for (let ej = 0; ej < edgePoints.length; ej++) {
|
|
341
344
|
if (ei === ej) continue;
|
|
@@ -349,21 +352,20 @@ function bundleEdges(meshes, scene) {
|
|
|
349
352
|
const dist = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
350
353
|
|
|
351
354
|
if (dist < radius && dist > 0.01) {
|
|
352
|
-
// Attraction force: inverse
|
|
353
|
-
const
|
|
355
|
+
// Attraction force: stronger for closer edges (inverse square falloff)
|
|
356
|
+
const t = dist / radius;
|
|
357
|
+
const force = strength * (1 - t * t);
|
|
354
358
|
forceX += dx * force / dist;
|
|
355
359
|
forceY += dy * force / dist;
|
|
356
360
|
forceZ += dz * force / dist;
|
|
357
|
-
neighbors++;
|
|
358
361
|
}
|
|
359
362
|
}
|
|
360
363
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
364
|
+
// Apply accumulated force (not averaged -- more neighbors = stronger bundling)
|
|
365
|
+
const scale = endpointFactor * iterScale * 0.3;
|
|
366
|
+
pointA.x += forceX * scale;
|
|
367
|
+
pointA.y += forceY * scale;
|
|
368
|
+
pointA.z += forceZ * scale;
|
|
367
369
|
}
|
|
368
370
|
}
|
|
369
371
|
}
|