@velvetmonkey/flywheel-memory 2.0.146 → 2.0.148
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/dist/index.js +13 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3689,6 +3689,12 @@ function isLikelyArticleTitle(name) {
|
|
|
3689
3689
|
}
|
|
3690
3690
|
return false;
|
|
3691
3691
|
}
|
|
3692
|
+
function getTypeBoost(category, customCategories) {
|
|
3693
|
+
if (customCategories?.[category]?.type_boost != null) {
|
|
3694
|
+
return customCategories[category].type_boost;
|
|
3695
|
+
}
|
|
3696
|
+
return TYPE_BOOST[category] || 0;
|
|
3697
|
+
}
|
|
3692
3698
|
function getCrossFolderBoost(entityPath, notePath) {
|
|
3693
3699
|
if (!entityPath || !notePath) return 0;
|
|
3694
3700
|
const entityParts = entityPath.split("/");
|
|
@@ -3869,7 +3875,7 @@ async function suggestRelatedLinks(content, options = {}) {
|
|
|
3869
3875
|
if (contentScore > 0) {
|
|
3870
3876
|
entitiesWithContentMatch.add(entityName);
|
|
3871
3877
|
}
|
|
3872
|
-
const layerTypeBoost = disabled.has("type_boost") ? 0 :
|
|
3878
|
+
const layerTypeBoost = disabled.has("type_boost") ? 0 : getTypeBoost(category, getConfig()?.custom_categories);
|
|
3873
3879
|
score += layerTypeBoost;
|
|
3874
3880
|
const layerContextBoost = disabled.has("context_boost") ? 0 : contextBoosts[category] || 0;
|
|
3875
3881
|
score += layerContextBoost;
|
|
@@ -3961,7 +3967,7 @@ async function suggestRelatedLinks(content, options = {}) {
|
|
|
3961
3967
|
if (hasContentOverlap || strongCooccurrence) {
|
|
3962
3968
|
entitiesWithContentMatch.add(entityName);
|
|
3963
3969
|
}
|
|
3964
|
-
const typeBoost = disabled.has("type_boost") ? 0 :
|
|
3970
|
+
const typeBoost = disabled.has("type_boost") ? 0 : getTypeBoost(category, getConfig()?.custom_categories);
|
|
3965
3971
|
const contextBoost = disabled.has("context_boost") ? 0 : contextBoosts[category] || 0;
|
|
3966
3972
|
const recencyBoostVal = hasContentOverlap && !disabled.has("recency") ? recencyIndex ? getRecencyBoost(entityName, recencyIndex) : 0 : 0;
|
|
3967
3973
|
const rawCrossFolderBoost = disabled.has("cross_folder") ? 0 : notePath && entity.path ? getCrossFolderBoost(entity.path, notePath) : 0;
|
|
@@ -4022,7 +4028,7 @@ async function suggestRelatedLinks(content, options = {}) {
|
|
|
4022
4028
|
if (!disabled.has("length_filter") && match.entityName.length > MAX_ENTITY_LENGTH) continue;
|
|
4023
4029
|
if (!disabled.has("article_filter") && isLikelyArticleTitle(match.entityName)) continue;
|
|
4024
4030
|
const { entity, category } = entityWithType;
|
|
4025
|
-
const layerTypeBoost = disabled.has("type_boost") ? 0 :
|
|
4031
|
+
const layerTypeBoost = disabled.has("type_boost") ? 0 : getTypeBoost(category, getConfig()?.custom_categories);
|
|
4026
4032
|
const layerContextBoost = disabled.has("context_boost") ? 0 : contextBoosts[category] || 0;
|
|
4027
4033
|
const layerHubBoost = disabled.has("hub_boost") ? 0 : getHubBoost(entity);
|
|
4028
4034
|
const layerCrossFolderBoost = disabled.has("cross_folder") ? 0 : notePath && entity.path ? getCrossFolderBoost(entity.path, notePath) : 0;
|
|
@@ -10627,7 +10633,7 @@ init_recency();
|
|
|
10627
10633
|
init_cooccurrence();
|
|
10628
10634
|
init_retrievalCooccurrence();
|
|
10629
10635
|
import * as fs34 from "node:fs/promises";
|
|
10630
|
-
import { createHash as
|
|
10636
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
10631
10637
|
|
|
10632
10638
|
// src/vault-registry.ts
|
|
10633
10639
|
var VaultRegistry = class {
|
|
@@ -24549,6 +24555,7 @@ import { z as z39 } from "zod";
|
|
|
24549
24555
|
// src/core/read/calibrationExport.ts
|
|
24550
24556
|
init_wikilinkFeedback();
|
|
24551
24557
|
init_embeddings();
|
|
24558
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
24552
24559
|
var LAYER_KEYS = [
|
|
24553
24560
|
"contentMatch",
|
|
24554
24561
|
"cooccurrenceBoost",
|
|
@@ -24801,8 +24808,7 @@ function getCalibrationExport(stateDb2, metrics, config, daysBack = 30, includeV
|
|
|
24801
24808
|
const startMs = start.getTime();
|
|
24802
24809
|
let vaultId;
|
|
24803
24810
|
if (includeVaultId) {
|
|
24804
|
-
|
|
24805
|
-
vaultId = crypto2.createHash("sha256").update(stateDb2.vaultPath).digest("hex").slice(0, 16);
|
|
24811
|
+
vaultId = createHash3("sha256").update(stateDb2.vaultPath).digest("hex").slice(0, 16);
|
|
24806
24812
|
}
|
|
24807
24813
|
return {
|
|
24808
24814
|
schema_version: 1,
|
|
@@ -25875,7 +25881,7 @@ async function runPostIndexWork(ctx) {
|
|
|
25875
25881
|
}
|
|
25876
25882
|
try {
|
|
25877
25883
|
const content = await fs34.readFile(path38.join(vp, event.path), "utf-8");
|
|
25878
|
-
const hash =
|
|
25884
|
+
const hash = createHash4("sha256").update(content).digest("hex").slice(0, 16);
|
|
25879
25885
|
if (lastContentHashes.get(event.path) === hash) {
|
|
25880
25886
|
serverLog("watcher", `Hash unchanged, skipping: ${event.path}`);
|
|
25881
25887
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velvetmonkey/flywheel-memory",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.148",
|
|
4
4
|
"description": "MCP server that gives Claude full read/write access to your Obsidian vault. Select from 74 tools for search, backlinks, graph queries, mutations, agent memory, and hybrid semantic search.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@huggingface/transformers": "^3.8.1",
|
|
56
56
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
57
|
-
"@velvetmonkey/vault-core": "^2.0.
|
|
57
|
+
"@velvetmonkey/vault-core": "^2.0.148",
|
|
58
58
|
"better-sqlite3": "^12.0.0",
|
|
59
59
|
"chokidar": "^4.0.0",
|
|
60
60
|
"gray-matter": "^4.0.3",
|