@andespindola/brainlink 0.1.0-beta.4 → 0.1.0-beta.5

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.
@@ -1,3 +1,4 @@
1
+ import { createHash } from 'node:crypto';
1
2
  import { createCauliflowerGraphLayout } from '../domain/graph-layout.js';
2
3
  import { getGraph } from './get-graph.js';
3
4
  const graphLayoutCache = new Map();
@@ -6,7 +7,9 @@ const createGraphSignature = (graph) => {
6
7
  const edgesSignature = graph.edges
7
8
  .map((edge) => `${edge.source}|${edge.target ?? ''}|${edge.targetTitle}|${edge.weight}|${edge.priority}`)
8
9
  .join('\n');
9
- return `${graph.nodes.length}:${nodesSignature}|${graph.edges.length}:${edgesSignature}`;
10
+ return createHash('sha256')
11
+ .update(`${graph.nodes.length}:${nodesSignature}|${graph.edges.length}:${edgesSignature}`)
12
+ .digest('hex');
10
13
  };
11
14
  export const getGraphLayout = async (vaultPath, agentId) => {
12
15
  const graph = await getGraph(vaultPath, agentId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andespindola/brainlink",
3
- "version": "0.1.0-beta.4",
3
+ "version": "0.1.0-beta.5",
4
4
  "description": "Local-first knowledge memory for agents with Markdown, backlinks, indexing and context retrieval.",
5
5
  "type": "module",
6
6
  "license": "MIT",