mindlore 0.7.3 → 0.7.4
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/scripts/init.js +5 -17
- package/dist/scripts/init.js.map +1 -1
- package/dist/scripts/lib/constants.d.ts +1 -1
- package/dist/scripts/lib/constants.d.ts.map +1 -1
- package/dist/scripts/lib/constants.js +2 -7
- package/dist/scripts/lib/constants.js.map +1 -1
- package/dist/scripts/lib/hook-helpers.d.ts +8 -0
- package/dist/scripts/lib/hook-helpers.d.ts.map +1 -0
- package/dist/scripts/lib/hook-helpers.js +27 -0
- package/dist/scripts/lib/hook-helpers.js.map +1 -0
- package/dist/scripts/lib/mcp-namespace.d.ts.map +1 -1
- package/dist/scripts/lib/mcp-namespace.js +0 -5
- package/dist/scripts/lib/mcp-namespace.js.map +1 -1
- package/dist/scripts/lib/mcp-tools.d.ts.map +1 -1
- package/dist/scripts/lib/mcp-tools.js +3 -19
- package/dist/scripts/lib/mcp-tools.js.map +1 -1
- package/dist/scripts/lib/relation-helpers.js +1 -1
- package/dist/scripts/lib/relation-helpers.js.map +1 -1
- package/dist/scripts/lib/session-payload.d.ts.map +1 -1
- package/dist/scripts/lib/session-payload.js +4 -16
- package/dist/scripts/lib/session-payload.js.map +1 -1
- package/dist/scripts/lib/settings-cleanup.d.ts.map +1 -1
- package/dist/scripts/lib/settings-cleanup.js +2 -2
- package/dist/scripts/lib/settings-cleanup.js.map +1 -1
- package/dist/scripts/lib/tool-adapters/decide-adapter.d.ts +1 -1
- package/dist/scripts/lib/tool-adapters/decide-adapter.d.ts.map +1 -1
- package/dist/scripts/lib/tool-adapters/decide-adapter.js +5 -0
- package/dist/scripts/lib/tool-adapters/decide-adapter.js.map +1 -1
- package/dist/scripts/mindlore-doctor.d.ts +3 -0
- package/dist/scripts/mindlore-doctor.d.ts.map +1 -1
- package/dist/scripts/mindlore-doctor.js +78 -6
- package/dist/scripts/mindlore-doctor.js.map +1 -1
- package/dist/scripts/mindlore-health-check.js +2 -2
- package/dist/scripts/mindlore-health-check.js.map +1 -1
- package/dist/scripts/mindlore-perf.d.ts +3 -1
- package/dist/scripts/mindlore-perf.d.ts.map +1 -1
- package/dist/scripts/mindlore-perf.js +13 -6
- package/dist/scripts/mindlore-perf.js.map +1 -1
- package/dist/tests/doctor.test.js +39 -0
- package/dist/tests/doctor.test.js.map +1 -1
- package/dist/tests/dont-repeat-dedup.test.js +13 -1
- package/dist/tests/dont-repeat-dedup.test.js.map +1 -1
- package/dist/tests/fts5-sync.test.js +11 -117
- package/dist/tests/fts5-sync.test.js.map +1 -1
- package/dist/tests/hook-helpers.test.d.ts +2 -0
- package/dist/tests/hook-helpers.test.d.ts.map +1 -0
- package/dist/tests/hook-helpers.test.js +44 -0
- package/dist/tests/hook-helpers.test.js.map +1 -0
- package/dist/tests/latency-budget.test.d.ts +2 -0
- package/dist/tests/latency-budget.test.d.ts.map +1 -0
- package/dist/tests/latency-budget.test.js +37 -0
- package/dist/tests/latency-budget.test.js.map +1 -0
- package/dist/tests/mcp-namespace.test.d.ts +2 -0
- package/dist/tests/mcp-namespace.test.d.ts.map +1 -0
- package/dist/tests/mcp-namespace.test.js +41 -0
- package/dist/tests/mcp-namespace.test.js.map +1 -0
- package/dist/tests/session-payload.test.js +13 -5
- package/dist/tests/session-payload.test.js.map +1 -1
- package/dist/tests/telemetry-perf.test.js +9 -8
- package/dist/tests/telemetry-perf.test.js.map +1 -1
- package/hooks/cc-memory-bulk-sync.cjs +2 -5
- package/hooks/cc-session-sync.cjs +2 -5
- package/hooks/lib/mindlore-common.cjs +41 -8
- package/hooks/mindlore-fts5-sync.cjs +5 -1
- package/hooks/mindlore-search.cjs +20 -14
- package/hooks/mindlore-session-focus.cjs +5 -17
- package/hooks/src/mindlore-fts5-sync.cjs +7 -4
- package/hooks/src/mindlore-search.cjs +19 -11
- package/hooks/src/mindlore-session-focus.cjs +1 -1
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/templates/config.json +1 -1
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
var fs = require("fs");
|
|
6
6
|
var path = require("path");
|
|
7
7
|
var { DB_NAME, sha256, openDatabase, getAllMdFiles, parseFrontmatter, extractFtsMetadata, insertFtsRow, readHookStdin, getActiveMindloreDir, getProjectName, resolveProject, hookLog, withTelemetry, SQL_FTS_SESSIONS_INSERT, isSessionCategory, isInsideMindloreDir } = require("./lib/mindlore-common.cjs");
|
|
8
|
+
function shouldIndexFile(filePath) {
|
|
9
|
+
return !!(filePath && filePath.endsWith(".md"));
|
|
10
|
+
}
|
|
8
11
|
function main() {
|
|
9
12
|
const filePath = readHookStdin(["path", "file_path"]);
|
|
10
13
|
if (!filePath) return;
|
|
14
|
+
if (!shouldIndexFile(filePath)) return;
|
|
11
15
|
const resolved = path.resolve(filePath);
|
|
12
16
|
if (!isInsideMindloreDir(resolved)) return;
|
|
13
|
-
if (filePath.endsWith(".md")) return;
|
|
14
17
|
const baseDir = getActiveMindloreDir();
|
|
15
18
|
if (!fs.existsSync(baseDir)) return;
|
|
16
19
|
const dbPath = path.join(baseDir, DB_NAME);
|
|
@@ -63,6 +66,7 @@ function main() {
|
|
|
63
66
|
db.close();
|
|
64
67
|
}
|
|
65
68
|
}
|
|
69
|
+
module.exports = { shouldIndexFile };
|
|
66
70
|
withTelemetry("mindlore-fts5-sync", main).catch((err) => {
|
|
67
71
|
hookLog("mindlore-fts5-sync", "error", err?.message ?? String(err));
|
|
68
72
|
process.exit(0);
|
|
@@ -34,11 +34,10 @@ var require_constants = __commonJS({
|
|
|
34
34
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
35
35
|
};
|
|
36
36
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
37
|
-
exports2.CONSOLIDATION_THRESHOLD = exports2.STALE_THRESHOLD = exports2.DECAY_HALF_LIFE_DAYS = exports2.DEFAULT_TOKEN_BUDGET = exports2.CC_MEMORY_BOOST = exports2.CC_SUBAGENT_CATEGORY = exports2.CC_SESSION_CATEGORY = exports2.CC_MEMORY_CATEGORY = exports2.CC_MEMORY_DIR = exports2.CC_MEMORY_PATH_MARKER = exports2.TYPE_TO_DIR = exports2.RELATED_OVERFETCH = exports2.MAX_RELATED_SOURCES = exports2.RELATION_PRIORITY = exports2.SYMMETRIC_TYPES = exports2.RELATION_TYPES = exports2.QUALITY_HEURISTICS = exports2.QUALITY_VALUES = exports2.FRONTMATTER_TYPES = exports2.FTS5_COLUMNS = exports2.STOP_WORDS = exports2.TURKISH_WORD_RE = exports2.STOP_WORDS_MIN_LENGTH = exports2.SESSION_CATEGORIES = exports2.CATEGORIES = exports2.SCHEMA_VERSION = exports2.DEFAULT_MODELS = exports2.CONFIG_FILE = exports2.MCP_BUSY_TIMEOUT_MS = exports2.DB_BUSY_TIMEOUT_MS = exports2.SKIP_FILES = exports2.DIRECTORIES = exports2.DB_NAME = exports2.GLOBAL_MINDLORE_DIR = exports2.MINDLORE_DIR = exports2.KNOWN_HOOK_EVENTS = void 0;
|
|
37
|
+
exports2.CONSOLIDATION_THRESHOLD = exports2.STALE_THRESHOLD = exports2.DECAY_HALF_LIFE_DAYS = exports2.DEFAULT_TOKEN_BUDGET = exports2.CC_MEMORY_BOOST = exports2.CC_SUBAGENT_CATEGORY = exports2.CC_SESSION_CATEGORY = exports2.CC_MEMORY_CATEGORY = exports2.CC_MEMORY_DIR = exports2.CC_MEMORY_PATH_MARKER = exports2.TYPE_TO_DIR = exports2.PRIORITY_CASE = exports2.RELATED_OVERFETCH = exports2.MAX_RELATED_SOURCES = exports2.RELATION_PRIORITY = exports2.SYMMETRIC_TYPES = exports2.RELATION_TYPES = exports2.QUALITY_HEURISTICS = exports2.QUALITY_VALUES = exports2.FRONTMATTER_TYPES = exports2.FTS5_COLUMNS = exports2.STOP_WORDS = exports2.TURKISH_WORD_RE = exports2.STOP_WORDS_MIN_LENGTH = exports2.SESSION_CATEGORIES = exports2.CATEGORIES = exports2.SCHEMA_VERSION = exports2.DEFAULT_MODELS = exports2.CONFIG_FILE = exports2.MCP_BUSY_TIMEOUT_MS = exports2.DB_BUSY_TIMEOUT_MS = exports2.SKIP_FILES = exports2.DIRECTORIES = exports2.DB_NAME = exports2.GLOBAL_MINDLORE_DIR = exports2.MINDLORE_DIR = exports2.KNOWN_HOOK_EVENTS = void 0;
|
|
38
38
|
exports2.isKnownHookEvent = isKnownHookEvent;
|
|
39
39
|
exports2.isSessionCategory = isSessionCategory;
|
|
40
40
|
exports2.fixVersionTokens = fixVersionTokens;
|
|
41
|
-
exports2.buildPriorityCase = buildPriorityCase;
|
|
42
41
|
exports2.homedir = homedir;
|
|
43
42
|
exports2.getActiveMindloreDir = getActiveMindloreDir;
|
|
44
43
|
exports2.getAllDbs = getAllDbs2;
|
|
@@ -336,9 +335,7 @@ var require_constants = __commonJS({
|
|
|
336
335
|
};
|
|
337
336
|
exports2.MAX_RELATED_SOURCES = 5;
|
|
338
337
|
exports2.RELATED_OVERFETCH = 10;
|
|
339
|
-
|
|
340
|
-
return Object.entries(exports2.RELATION_PRIORITY).map(([type, priority]) => `WHEN '${type}' THEN ${priority}`).join(" ");
|
|
341
|
-
}
|
|
338
|
+
exports2.PRIORITY_CASE = "WHEN 'supersedes' THEN 1 WHEN 'contradicts' THEN 2 WHEN 'extends' THEN 3 WHEN 'cites' THEN 4";
|
|
342
339
|
exports2.TYPE_TO_DIR = {
|
|
343
340
|
raw: "raw",
|
|
344
341
|
source: "sources",
|
|
@@ -1103,7 +1100,7 @@ var require_search_cache = __commonJS({
|
|
|
1103
1100
|
// hooks/src/mindlore-search.cjs
|
|
1104
1101
|
var fs = require("fs");
|
|
1105
1102
|
var path = require("path");
|
|
1106
|
-
var { getAllDbs, openDatabase, extractHeadings,
|
|
1103
|
+
var { getAllDbs, openDatabase, extractHeadings, readConfig, hookLog, incrementRecallCount, withTelemetry } = require("./lib/mindlore-common.cjs");
|
|
1107
1104
|
var MAX_RESULTS = 3;
|
|
1108
1105
|
var MIN_QUERY_WORDS = 3;
|
|
1109
1106
|
var searchEngineMod;
|
|
@@ -1116,9 +1113,22 @@ try {
|
|
|
1116
1113
|
SearchCacheMod = require_search_cache();
|
|
1117
1114
|
} catch (_err) {
|
|
1118
1115
|
}
|
|
1116
|
+
function parseStdin() {
|
|
1117
|
+
try {
|
|
1118
|
+
const raw = fs.readFileSync(0, "utf8").trim();
|
|
1119
|
+
if (!raw) return { userMessage: "", sessionId: "unknown" };
|
|
1120
|
+
const parsed = JSON.parse(raw);
|
|
1121
|
+
const userMessage = parsed.prompt || parsed.content || parsed.message || parsed.query || raw;
|
|
1122
|
+
const sessionId = parsed.session_id || "unknown";
|
|
1123
|
+
return { userMessage, sessionId };
|
|
1124
|
+
} catch (_err) {
|
|
1125
|
+
return { userMessage: "", sessionId: "unknown" };
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1119
1128
|
function main() {
|
|
1120
|
-
const userMessage =
|
|
1129
|
+
const { userMessage, sessionId } = parseStdin();
|
|
1121
1130
|
if (!userMessage || userMessage.length < MIN_QUERY_WORDS) return;
|
|
1131
|
+
let searchMs = 0;
|
|
1122
1132
|
const dbPaths = getAllDbs();
|
|
1123
1133
|
if (dbPaths.length === 0) return;
|
|
1124
1134
|
if (!searchEngineMod) {
|
|
@@ -1128,13 +1138,6 @@ function main() {
|
|
|
1128
1138
|
const project = path.basename(process.cwd());
|
|
1129
1139
|
const config = readConfig(path.dirname(dbPaths[0]));
|
|
1130
1140
|
const synonyms = config && config.synonyms ? config.synonyms : {};
|
|
1131
|
-
let sessionId;
|
|
1132
|
-
try {
|
|
1133
|
-
const stdinData = JSON.parse(process.env.CLAUDE_HOOK_STDIN || "{}");
|
|
1134
|
-
sessionId = stdinData.session_id || "unknown";
|
|
1135
|
-
} catch (_) {
|
|
1136
|
-
sessionId = "unknown";
|
|
1137
|
-
}
|
|
1138
1141
|
const allResults = [];
|
|
1139
1142
|
for (const dbPath of dbPaths) {
|
|
1140
1143
|
const db = openDatabase(dbPath);
|
|
@@ -1160,11 +1163,13 @@ function main() {
|
|
|
1160
1163
|
continue;
|
|
1161
1164
|
}
|
|
1162
1165
|
}
|
|
1166
|
+
const t0 = Date.now();
|
|
1163
1167
|
const results = searchEngineMod.search(db, userMessage, {
|
|
1164
1168
|
project,
|
|
1165
1169
|
maxResults: effectiveMax,
|
|
1166
1170
|
synonyms
|
|
1167
1171
|
});
|
|
1172
|
+
searchMs += Date.now() - t0;
|
|
1168
1173
|
if (cache) cache.set(userMessage, results);
|
|
1169
1174
|
const baseDir = path.dirname(dbPath);
|
|
1170
1175
|
for (const r of results) {
|
|
@@ -1256,6 +1261,7 @@ Summary: ${summary}...
|
|
|
1256
1261
|
}
|
|
1257
1262
|
process.stdout.write(outputStr);
|
|
1258
1263
|
}
|
|
1264
|
+
return { search_ms: searchMs, result_count: relevant.length };
|
|
1259
1265
|
}
|
|
1260
1266
|
withTelemetry("mindlore-search", main).catch((err) => {
|
|
1261
1267
|
hookLog("mindlore-search", "error", err?.message ?? String(err));
|
|
@@ -14,28 +14,16 @@ var require_session_payload = __commonJS({
|
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
16
16
|
exports2.buildSessionPayload = buildSessionPayload;
|
|
17
|
-
var fs_1 = __importDefault(require("fs"));
|
|
18
|
-
var path_1 = __importDefault(require("path"));
|
|
19
17
|
var crypto_1 = __importDefault(require("crypto"));
|
|
20
18
|
var CHARS_PER_TOKEN = 4;
|
|
21
19
|
function estimateTokens(text) {
|
|
22
20
|
return Math.ceil(text.length / CHARS_PER_TOKEN);
|
|
23
21
|
}
|
|
24
|
-
function buildSessionSummary(
|
|
25
|
-
if (latestDeltaContent)
|
|
26
|
-
const lines2 = latestDeltaContent.split("\n").filter((l) => l.startsWith("- ") || l.startsWith("# "));
|
|
27
|
-
return lines2.slice(0, 10).join("\n") || "No previous session data.";
|
|
28
|
-
}
|
|
29
|
-
const diaryDir = path_1.default.join(baseDir, "diary");
|
|
30
|
-
if (!fs_1.default.existsSync(diaryDir))
|
|
31
|
-
return "No previous session data.";
|
|
32
|
-
const deltas = fs_1.default.readdirSync(diaryDir).filter((f) => f.startsWith("delta-")).sort();
|
|
33
|
-
if (deltas.length === 0)
|
|
22
|
+
function buildSessionSummary(_baseDir, latestDeltaContent) {
|
|
23
|
+
if (!latestDeltaContent)
|
|
34
24
|
return "No previous session data.";
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
const lines = latest.split("\n").filter((l) => l.startsWith("- ") || l.startsWith("# "));
|
|
38
|
-
return lines.slice(0, 10).join("\n");
|
|
25
|
+
const lines = latestDeltaContent.split("\n").filter((l) => l.startsWith("- ") || l.startsWith("# "));
|
|
26
|
+
return lines.slice(0, 10).join("\n") || "No previous session data.";
|
|
39
27
|
}
|
|
40
28
|
function buildEpisodeSections(db, project, sessionId) {
|
|
41
29
|
const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1e3).toISOString();
|
|
@@ -725,11 +713,11 @@ ${content}`);
|
|
|
725
713
|
const latestPath = path.join(diaryDir, latestName);
|
|
726
714
|
const deltaContent = fs.readFileSync(latestPath, "utf8").trim();
|
|
727
715
|
sourceChars += deltaContent.length;
|
|
728
|
-
latestDeltaContent = deltaContent;
|
|
729
716
|
const { meta } = parseFrontmatter(deltaContent);
|
|
730
717
|
const deltaProject = meta.project || null;
|
|
731
718
|
const currentProject = getProjectName();
|
|
732
719
|
if (!deltaProject || deltaProject.toLowerCase() === currentProject.toLowerCase()) {
|
|
720
|
+
latestDeltaContent = deltaContent;
|
|
733
721
|
output.push(`[Mindlore Delta: ${latestName}]
|
|
734
722
|
${truncateChangedFiles(truncateCommits(deltaContent))}`);
|
|
735
723
|
}
|
|
@@ -15,17 +15,18 @@ const fs = require('fs');
|
|
|
15
15
|
const path = require('path');
|
|
16
16
|
const { DB_NAME, sha256, openDatabase, getAllMdFiles, parseFrontmatter, extractFtsMetadata, insertFtsRow, readHookStdin, getActiveMindloreDir, getProjectName, resolveProject, hookLog, withTelemetry, SQL_FTS_SESSIONS_INSERT, isSessionCategory, isInsideMindloreDir } = require('./lib/mindlore-common.cjs');
|
|
17
17
|
|
|
18
|
+
function shouldIndexFile(filePath) {
|
|
19
|
+
return !!(filePath && filePath.endsWith('.md'));
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
function main() {
|
|
19
23
|
const filePath = readHookStdin(['path', 'file_path']);
|
|
20
24
|
|
|
21
25
|
if (!filePath) return;
|
|
26
|
+
if (!shouldIndexFile(filePath)) return;
|
|
22
27
|
const resolved = path.resolve(filePath);
|
|
23
28
|
if (!isInsideMindloreDir(resolved)) return;
|
|
24
29
|
|
|
25
|
-
// Skip if this is a single .md file change — mindlore-index.cjs handles those.
|
|
26
|
-
// This hook is for bulk changes (git pull, manual batch edits).
|
|
27
|
-
if (filePath.endsWith('.md')) return;
|
|
28
|
-
|
|
29
30
|
const baseDir = getActiveMindloreDir();
|
|
30
31
|
if (!fs.existsSync(baseDir)) return;
|
|
31
32
|
|
|
@@ -92,6 +93,8 @@ function main() {
|
|
|
92
93
|
|
|
93
94
|
}
|
|
94
95
|
|
|
96
|
+
module.exports = { shouldIndexFile };
|
|
97
|
+
|
|
95
98
|
withTelemetry('mindlore-fts5-sync', main).catch(err => {
|
|
96
99
|
hookLog('mindlore-fts5-sync', 'error', err?.message ?? String(err));
|
|
97
100
|
process.exit(0);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
const fs = require('fs');
|
|
13
13
|
const path = require('path');
|
|
14
|
-
const { getAllDbs, openDatabase, extractHeadings,
|
|
14
|
+
const { getAllDbs, openDatabase, extractHeadings, readConfig, hookLog, incrementRecallCount, withTelemetry } = require('./lib/mindlore-common.cjs');
|
|
15
15
|
|
|
16
16
|
const MAX_RESULTS = 3;
|
|
17
17
|
const MIN_QUERY_WORDS = 3;
|
|
@@ -30,9 +30,23 @@ try {
|
|
|
30
30
|
// search-cache not built yet
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
function parseStdin() {
|
|
34
|
+
try {
|
|
35
|
+
const raw = fs.readFileSync(0, 'utf8').trim();
|
|
36
|
+
if (!raw) return { userMessage: '', sessionId: 'unknown' };
|
|
37
|
+
const parsed = JSON.parse(raw);
|
|
38
|
+
const userMessage = parsed.prompt || parsed.content || parsed.message || parsed.query || raw;
|
|
39
|
+
const sessionId = parsed.session_id || 'unknown';
|
|
40
|
+
return { userMessage, sessionId };
|
|
41
|
+
} catch (_err) {
|
|
42
|
+
return { userMessage: '', sessionId: 'unknown' };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
33
46
|
function main() {
|
|
34
|
-
const userMessage =
|
|
47
|
+
const { userMessage, sessionId } = parseStdin();
|
|
35
48
|
if (!userMessage || userMessage.length < MIN_QUERY_WORDS) return;
|
|
49
|
+
let searchMs = 0;
|
|
36
50
|
|
|
37
51
|
const dbPaths = getAllDbs();
|
|
38
52
|
if (dbPaths.length === 0) return;
|
|
@@ -46,15 +60,6 @@ function main() {
|
|
|
46
60
|
const config = readConfig(path.dirname(dbPaths[0]));
|
|
47
61
|
const synonyms = (config && config.synonyms) ? config.synonyms : {};
|
|
48
62
|
|
|
49
|
-
// Read session_id from stdin for throttling
|
|
50
|
-
let sessionId;
|
|
51
|
-
try {
|
|
52
|
-
const stdinData = JSON.parse(process.env.CLAUDE_HOOK_STDIN || '{}');
|
|
53
|
-
sessionId = stdinData.session_id || 'unknown';
|
|
54
|
-
} catch (_) {
|
|
55
|
-
sessionId = 'unknown';
|
|
56
|
-
}
|
|
57
|
-
|
|
58
63
|
const allResults = [];
|
|
59
64
|
for (const dbPath of dbPaths) {
|
|
60
65
|
const db = openDatabase(dbPath);
|
|
@@ -82,11 +87,13 @@ function main() {
|
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
|
|
90
|
+
const t0 = Date.now();
|
|
85
91
|
const results = searchEngineMod.search(db, userMessage, {
|
|
86
92
|
project,
|
|
87
93
|
maxResults: effectiveMax,
|
|
88
94
|
synonyms,
|
|
89
95
|
});
|
|
96
|
+
searchMs += Date.now() - t0;
|
|
90
97
|
|
|
91
98
|
if (cache) cache.set(userMessage, results);
|
|
92
99
|
|
|
@@ -192,6 +199,7 @@ function main() {
|
|
|
192
199
|
|
|
193
200
|
process.stdout.write(outputStr);
|
|
194
201
|
}
|
|
202
|
+
return { search_ms: searchMs, result_count: relevant.length };
|
|
195
203
|
}
|
|
196
204
|
|
|
197
205
|
withTelemetry('mindlore-search', main).catch(err => {
|
|
@@ -150,11 +150,11 @@ function main() {
|
|
|
150
150
|
const latestPath = path.join(diaryDir, latestName);
|
|
151
151
|
const deltaContent = fs.readFileSync(latestPath, 'utf8').trim();
|
|
152
152
|
sourceChars += deltaContent.length;
|
|
153
|
-
latestDeltaContent = deltaContent;
|
|
154
153
|
const { meta } = parseFrontmatter(deltaContent);
|
|
155
154
|
const deltaProject = meta.project || null;
|
|
156
155
|
const currentProject = getProjectName();
|
|
157
156
|
if (!deltaProject || deltaProject.toLowerCase() === currentProject.toLowerCase()) {
|
|
157
|
+
latestDeltaContent = deltaContent;
|
|
158
158
|
output.push(`[Mindlore Delta: ${latestName}]\n${truncateChangedFiles(truncateCommits(deltaContent))}`);
|
|
159
159
|
}
|
|
160
160
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mindlore",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "AI-native knowledge system for Claude Code",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"bundle:hooks": "npx tsx scripts/bundle-hooks.ts",
|
|
28
28
|
"bundle:mcp": "npx esbuild scripts/mcp-server.ts --bundle --platform=node --target=node20 --format=cjs --outfile=mcp-server.cjs --external:better-sqlite3",
|
|
29
29
|
"bundle": "npm run bundle:hooks && npm run bundle:mcp",
|
|
30
|
-
"postinstall": "npm rebuild better-sqlite3"
|
|
30
|
+
"postinstall": "npm run build && npm rebuild better-sqlite3"
|
|
31
31
|
},
|
|
32
32
|
"keywords": [
|
|
33
33
|
"claude-code",
|
package/plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifestVersion": 2,
|
|
3
3
|
"name": "mindlore",
|
|
4
4
|
"description": "AI-native knowledge system for Claude Code. Persistent, searchable, evolving knowledge base with FTS5 and Knowledge Graph.",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.4",
|
|
6
6
|
"skills": [
|
|
7
7
|
{
|
|
8
8
|
"name": "mindlore-ingest",
|
package/templates/config.json
CHANGED