@softerist/heuristic-mcp 3.2.3 → 3.2.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.
Files changed (46) hide show
  1. package/README.md +387 -376
  2. package/config.jsonc +800 -800
  3. package/features/ann-config.js +102 -110
  4. package/features/clear-cache.js +81 -84
  5. package/features/find-similar-code.js +265 -286
  6. package/features/hybrid-search.js +487 -536
  7. package/features/index-codebase.js +3139 -3270
  8. package/features/lifecycle.js +1011 -1063
  9. package/features/package-version.js +277 -291
  10. package/features/register.js +351 -370
  11. package/features/resources.js +115 -130
  12. package/features/set-workspace.js +214 -240
  13. package/index.js +693 -758
  14. package/lib/cache-ops.js +22 -22
  15. package/lib/cache-utils.js +465 -519
  16. package/lib/cache.js +1749 -1849
  17. package/lib/call-graph.js +396 -396
  18. package/lib/cli.js +232 -226
  19. package/lib/config.js +1483 -1495
  20. package/lib/constants.js +511 -493
  21. package/lib/embed-query-process.js +206 -212
  22. package/lib/embedding-process.js +434 -451
  23. package/lib/embedding-worker.js +862 -934
  24. package/lib/ignore-patterns.js +276 -316
  25. package/lib/json-worker.js +14 -14
  26. package/lib/json-writer.js +302 -310
  27. package/lib/logging.js +116 -127
  28. package/lib/memory-logger.js +13 -13
  29. package/lib/onnx-backend.js +188 -193
  30. package/lib/path-utils.js +18 -23
  31. package/lib/project-detector.js +82 -84
  32. package/lib/server-lifecycle.js +133 -145
  33. package/lib/settings-editor.js +738 -739
  34. package/lib/slice-normalize.js +25 -31
  35. package/lib/tokenizer.js +168 -203
  36. package/lib/utils.js +364 -409
  37. package/lib/vector-store-binary.js +973 -991
  38. package/lib/vector-store-sqlite.js +377 -414
  39. package/lib/workspace-env.js +32 -34
  40. package/mcp_config.json +9 -9
  41. package/package.json +86 -86
  42. package/scripts/clear-cache.js +20 -20
  43. package/scripts/download-model.js +43 -43
  44. package/scripts/mcp-launcher.js +49 -49
  45. package/scripts/postinstall.js +12 -12
  46. package/search-configs.js +36 -36
package/lib/cache-ops.js CHANGED
@@ -1,22 +1,22 @@
1
- import fs from 'fs/promises';
2
- import { loadConfig } from './config.js';
3
- import { clearStaleCaches } from './cache-utils.js';
4
-
5
- export async function clearCache(workspaceDir) {
6
- const effectiveWorkspace = workspaceDir || process.cwd();
7
- const activeConfig = await loadConfig(effectiveWorkspace);
8
-
9
- if (!activeConfig.enableCache) {
10
- console.info('[Cache] Cache disabled (enableCache=false); nothing to clear.');
11
- return;
12
- }
13
-
14
- try {
15
- await fs.rm(activeConfig.cacheDirectory, { recursive: true, force: true });
16
- console.info(`[Cache] Cleared cache directory: ${activeConfig.cacheDirectory}`);
17
- await clearStaleCaches();
18
- } catch (err) {
19
- console.error(`[Cache] Failed to clear cache: ${err.message}`);
20
- process.exit(1);
21
- }
22
- }
1
+ import fs from 'fs/promises';
2
+ import { loadConfig } from './config.js';
3
+ import { clearStaleCaches } from './cache-utils.js';
4
+
5
+ export async function clearCache(workspaceDir) {
6
+ const effectiveWorkspace = workspaceDir || process.cwd();
7
+ const activeConfig = await loadConfig(effectiveWorkspace);
8
+
9
+ if (!activeConfig.enableCache) {
10
+ console.info('[Cache] Cache disabled (enableCache=false); nothing to clear.');
11
+ return;
12
+ }
13
+
14
+ try {
15
+ await fs.rm(activeConfig.cacheDirectory, { recursive: true, force: true });
16
+ console.info(`[Cache] Cleared cache directory: ${activeConfig.cacheDirectory}`);
17
+ await clearStaleCaches();
18
+ } catch (err) {
19
+ console.error(`[Cache] Failed to clear cache: ${err.message}`);
20
+ process.exit(1);
21
+ }
22
+ }