@velvetmonkey/flywheel-mcp 1.25.4 → 1.25.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.
Files changed (2) hide show
  1. package/dist/index.js +89 -62
  2. package/package.json +10 -15
package/dist/index.js CHANGED
@@ -4810,71 +4810,98 @@ function findVaultRoot(startPath) {
4810
4810
  var vaultPath = process.env.PROJECT_PATH || findVaultRoot();
4811
4811
  var flywheelConfig = {};
4812
4812
  var vaultIndex;
4813
+ var PRESETS = {
4814
+ minimal: ["core"],
4815
+ standard: ["core", "graph", "search", "tasks"],
4816
+ full: ["core", "graph", "search", "tasks", "schema", "structure", "temporal", "advanced"]
4817
+ };
4818
+ var ALL_CATEGORIES = ["core", "graph", "search", "tasks", "schema", "structure", "temporal", "advanced"];
4819
+ var DEFAULT_PRESET = "standard";
4820
+ function parseEnabledCategories() {
4821
+ const envValue = process.env.FLYWHEEL_TOOLS?.trim();
4822
+ if (!envValue) {
4823
+ return new Set(PRESETS[DEFAULT_PRESET]);
4824
+ }
4825
+ const lowerValue = envValue.toLowerCase();
4826
+ if (PRESETS[lowerValue]) {
4827
+ return new Set(PRESETS[lowerValue]);
4828
+ }
4829
+ const categories = /* @__PURE__ */ new Set();
4830
+ for (const item of envValue.split(",")) {
4831
+ const category = item.trim().toLowerCase();
4832
+ if (ALL_CATEGORIES.includes(category)) {
4833
+ categories.add(category);
4834
+ } else if (PRESETS[category]) {
4835
+ for (const c of PRESETS[category]) {
4836
+ categories.add(c);
4837
+ }
4838
+ } else {
4839
+ console.error(`[Flywheel] Warning: Unknown tool category "${item}" - ignoring`);
4840
+ }
4841
+ }
4842
+ if (categories.size === 0) {
4843
+ console.error(`[Flywheel] No valid categories found, using default (${DEFAULT_PRESET})`);
4844
+ return new Set(PRESETS[DEFAULT_PRESET]);
4845
+ }
4846
+ return categories;
4847
+ }
4848
+ var enabledCategories = parseEnabledCategories();
4849
+ var registeredModules = /* @__PURE__ */ new Set();
4850
+ function shouldRegister(module, categories) {
4851
+ if (registeredModules.has(module)) return false;
4852
+ const shouldReg = categories.some((cat) => enabledCategories.has(cat));
4853
+ if (shouldReg) registeredModules.add(module);
4854
+ return shouldReg;
4855
+ }
4813
4856
  var server = new McpServer({
4814
4857
  name: "flywheel",
4815
4858
  version: "1.7.0"
4816
4859
  });
4817
- registerGraphTools(
4818
- server,
4819
- () => vaultIndex,
4820
- () => vaultPath
4821
- );
4822
- registerWikilinkTools(
4823
- server,
4824
- () => vaultIndex,
4825
- () => vaultPath
4826
- );
4827
- registerHealthTools(
4828
- server,
4829
- () => vaultIndex,
4830
- () => vaultPath
4831
- );
4832
- registerQueryTools(
4833
- server,
4834
- () => vaultIndex,
4835
- () => vaultPath
4836
- );
4837
- registerSystemTools(
4838
- server,
4839
- () => vaultIndex,
4840
- (newIndex) => {
4841
- vaultIndex = newIndex;
4842
- },
4843
- () => vaultPath,
4844
- (newConfig) => {
4845
- flywheelConfig = newConfig;
4846
- }
4847
- );
4848
- registerPrimitiveTools(
4849
- server,
4850
- () => vaultIndex,
4851
- () => vaultPath,
4852
- () => flywheelConfig
4853
- );
4854
- registerPeriodicTools(
4855
- server,
4856
- () => vaultIndex
4857
- );
4858
- registerBidirectionalTools(
4859
- server,
4860
- () => vaultIndex,
4861
- () => vaultPath
4862
- );
4863
- registerSchemaTools(
4864
- server,
4865
- () => vaultIndex,
4866
- () => vaultPath
4867
- );
4868
- registerComputedTools(
4869
- server,
4870
- () => vaultIndex,
4871
- () => vaultPath
4872
- );
4873
- registerMigrationTools(
4874
- server,
4875
- () => vaultIndex,
4876
- () => vaultPath
4877
- );
4860
+ var categoryList = Array.from(enabledCategories).sort().join(", ");
4861
+ console.error(`[Flywheel] Tool categories: ${categoryList}`);
4862
+ if (shouldRegister("health", ["core"])) {
4863
+ registerHealthTools(server, () => vaultIndex, () => vaultPath);
4864
+ }
4865
+ if (shouldRegister("system", ["core"])) {
4866
+ registerSystemTools(
4867
+ server,
4868
+ () => vaultIndex,
4869
+ (newIndex) => {
4870
+ vaultIndex = newIndex;
4871
+ },
4872
+ () => vaultPath,
4873
+ (newConfig) => {
4874
+ flywheelConfig = newConfig;
4875
+ }
4876
+ );
4877
+ }
4878
+ if (shouldRegister("graph", ["graph"])) {
4879
+ registerGraphTools(server, () => vaultIndex, () => vaultPath);
4880
+ }
4881
+ if (shouldRegister("wikilinks", ["graph"])) {
4882
+ registerWikilinkTools(server, () => vaultIndex, () => vaultPath);
4883
+ }
4884
+ if (shouldRegister("query", ["search"])) {
4885
+ registerQueryTools(server, () => vaultIndex, () => vaultPath);
4886
+ }
4887
+ if (shouldRegister("primitives", ["tasks", "structure", "temporal", "schema", "advanced"])) {
4888
+ registerPrimitiveTools(server, () => vaultIndex, () => vaultPath, () => flywheelConfig);
4889
+ }
4890
+ if (shouldRegister("periodic", ["temporal"])) {
4891
+ registerPeriodicTools(server, () => vaultIndex);
4892
+ }
4893
+ if (shouldRegister("schema", ["schema"])) {
4894
+ registerSchemaTools(server, () => vaultIndex, () => vaultPath);
4895
+ }
4896
+ if (shouldRegister("bidirectional", ["advanced"])) {
4897
+ registerBidirectionalTools(server, () => vaultIndex, () => vaultPath);
4898
+ }
4899
+ if (shouldRegister("computed", ["advanced"])) {
4900
+ registerComputedTools(server, () => vaultIndex, () => vaultPath);
4901
+ }
4902
+ if (shouldRegister("migrations", ["advanced"])) {
4903
+ registerMigrationTools(server, () => vaultIndex, () => vaultPath);
4904
+ }
4878
4905
  async function main() {
4879
4906
  const transport = new StdioServerTransport();
4880
4907
  await server.connect(transport);
@@ -4903,7 +4930,7 @@ async function main() {
4903
4930
  console.error(`[Flywheel] Excluding task tags: ${flywheelConfig.exclude_task_tags.join(", ")}`);
4904
4931
  }
4905
4932
  if (process.env.FLYWHEEL_WATCH === "true") {
4906
- const debounceMs = parseInt(process.env.FLYWHEEL_DEBOUNCE_MS || "500");
4933
+ const debounceMs = parseInt(process.env.FLYWHEEL_DEBOUNCE_MS || "60000");
4907
4934
  console.error(`[flywheel] File watcher enabled (debounce: ${debounceMs}ms)`);
4908
4935
  const watcher = chokidar.watch(vaultPath, {
4909
4936
  ignored: /(^|[\/\\])\../,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velvetmonkey/flywheel-mcp",
3
- "version": "1.25.4",
3
+ "version": "1.25.5",
4
4
  "description": "Query your markdown like a database. 100x token savings for AI agents.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -38,26 +38,21 @@
38
38
  "vitest": "^2.0.0"
39
39
  },
40
40
  "keywords": [
41
- "obsidian",
42
41
  "mcp",
43
- "model-context-protocol",
44
- "claude",
45
- "claude-code",
46
- "ai-agents",
47
- "agentic-workflows",
48
- "token-optimization",
42
+ "mcp-server",
43
+ "obsidian",
49
44
  "knowledge-graph",
50
- "wikilinks",
51
- "backlinks",
52
- "vault-health",
53
45
  "markdown",
46
+ "claude",
54
47
  "pkm",
55
- "zettelkasten",
56
- "knowledge-management",
57
- "graph-intelligence"
48
+ "ai-agents",
49
+ "semantic-search",
50
+ "vault",
51
+ "backlinks",
52
+ "graph-database"
58
53
  ],
59
54
  "author": "Velvet Monkey",
60
- "license": "AGPL-3.0",
55
+ "license": "Apache-2.0",
61
56
  "repository": {
62
57
  "type": "git",
63
58
  "url": "git+https://github.com/velvetmonkey/flywheel.git"