@velvetmonkey/flywheel-memory 2.0.45 → 2.0.46

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 (2) hide show
  1. package/dist/index.js +14 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -8574,7 +8574,7 @@ function getSweepResults() {
8574
8574
 
8575
8575
  // src/tools/read/health.ts
8576
8576
  var STALE_THRESHOLD_SECONDS = 300;
8577
- function registerHealthTools(server2, getIndex, getVaultPath, getConfig = () => ({}), getStateDb = () => null) {
8577
+ function registerHealthTools(server2, getIndex, getVaultPath, getConfig = () => ({}), getStateDb = () => null, getWatcherStatus2 = () => null) {
8578
8578
  const IndexProgressSchema = z3.object({
8579
8579
  parsed: z3.coerce.number().describe("Number of files parsed so far"),
8580
8580
  total: z3.coerce.number().describe("Total number of files to parse")
@@ -8647,6 +8647,8 @@ function registerHealthTools(server2, getIndex, getVaultPath, getConfig = () =>
8647
8647
  embeddings_count: z3.coerce.number().describe("Number of notes with semantic embeddings"),
8648
8648
  tasks_ready: z3.boolean().describe("Whether the task cache is ready to serve queries"),
8649
8649
  tasks_building: z3.boolean().describe("Whether the task cache is currently rebuilding"),
8650
+ watcher_state: z3.enum(["starting", "ready", "rebuilding", "dirty", "error"]).optional().describe("Current file watcher state"),
8651
+ watcher_pending: z3.coerce.number().optional().describe("Number of pending file events in the watcher queue"),
8650
8652
  dead_link_count: z3.coerce.number().describe("Total number of broken/dead wikilinks across the vault"),
8651
8653
  top_dead_link_targets: z3.array(z3.object({
8652
8654
  target: z3.string().describe("The dead link target"),
@@ -8830,6 +8832,8 @@ function registerHealthTools(server2, getIndex, getVaultPath, getConfig = () =>
8830
8832
  embeddings_count: getEmbeddingsCount(),
8831
8833
  tasks_ready: isTaskCacheReady(),
8832
8834
  tasks_building: isTaskCacheBuilding(),
8835
+ watcher_state: getWatcherStatus2()?.state,
8836
+ watcher_pending: getWatcherStatus2()?.pendingEvents,
8833
8837
  dead_link_count: deadLinkCount,
8834
8838
  top_dead_link_targets: topDeadLinkTargets,
8835
8839
  sweep: getSweepResults() ?? void 0,
@@ -17319,6 +17323,10 @@ try {
17319
17323
  var vaultIndex;
17320
17324
  var flywheelConfig = {};
17321
17325
  var stateDb = null;
17326
+ var watcherStatus = null;
17327
+ function getWatcherStatus() {
17328
+ return watcherStatus;
17329
+ }
17322
17330
  var PRESETS = {
17323
17331
  // Presets
17324
17332
  minimal: ["search", "structure", "append", "frontmatter", "notes"],
@@ -17543,7 +17551,7 @@ if (_originalRegisterTool) {
17543
17551
  }
17544
17552
  var categoryList = Array.from(enabledCategories).sort().join(", ");
17545
17553
  serverLog("server", `Tool categories: ${categoryList}`);
17546
- registerHealthTools(server, () => vaultIndex, () => vaultPath, () => flywheelConfig, () => stateDb);
17554
+ registerHealthTools(server, () => vaultIndex, () => vaultPath, () => flywheelConfig, () => stateDb, getWatcherStatus);
17547
17555
  registerSystemTools(
17548
17556
  server,
17549
17557
  () => vaultIndex,
@@ -18471,6 +18479,7 @@ async function runPostIndexWork(index) {
18471
18479
  config,
18472
18480
  onBatch: handleBatch,
18473
18481
  onStateChange: (status) => {
18482
+ watcherStatus = status;
18474
18483
  if (status.state === "dirty") {
18475
18484
  serverLog("watcher", "Index may be stale", "warn");
18476
18485
  }
@@ -18526,3 +18535,6 @@ if (process.argv.includes("--init-semantic")) {
18526
18535
  process.on("beforeExit", async () => {
18527
18536
  await flushLogs();
18528
18537
  });
18538
+ export {
18539
+ getWatcherStatus
18540
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velvetmonkey/flywheel-memory",
3
- "version": "2.0.45",
3
+ "version": "2.0.46",
4
4
  "description": "MCP server that gives Claude full read/write access to your Obsidian vault. Select from 42 tools for search, backlinks, graph queries, mutations, and hybrid semantic search.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@modelcontextprotocol/sdk": "^1.25.1",
55
- "@velvetmonkey/vault-core": "^2.0.44",
55
+ "@velvetmonkey/vault-core": "^2.0.46",
56
56
  "better-sqlite3": "^11.0.0",
57
57
  "chokidar": "^4.0.0",
58
58
  "gray-matter": "^4.0.3",