diff --git a/Makefile b/Makefile index c5be6da..2a8d9b8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: help build dev test lint lint-fix check clean install \ - release-patch release-minor release-major release publish promote sync-version mcpb scorecard + release-patch release-minor release-major release publish promote sync-version mcpb scorecard set-description MIN_OBSIDIAN := 0.15.0 @@ -84,7 +84,7 @@ _commit-and-publish: clean: ## Remove build artifacts rm -rf main.js main.js.map dist/ obsidian-mcp-*.mcpb obsidian-mcp.mcpb -sync-version: ## Sync version from package.json to manifest.json and version.ts +sync-version: ## Sync version + description from package.json to manifest.json, mcpb, version.ts node sync-version.mjs mcpb: ## Build MCPB bundle (obsidian-mcp-.mcpb) for Claude Desktop @@ -92,3 +92,7 @@ mcpb: ## Build MCPB bundle (obsidian-mcp-.mcpb) for Claude Desktop scorecard: ## Pull the Obsidian community portal scorecard + freshness delta (free post-release signal) @node scripts/scorecard.mjs + +set-description: ## Set plugin description (SoT: package.json) + sync. Usage: make set-description DESC='...' + @node scripts/set-description.mjs "$(DESC)" + @node sync-version.mjs diff --git a/manifest.json b/manifest.json index c4a081c..f0dded1 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "id": "semantic-vault-mcp", "name": "Semantic Notes Vault MCP", "minAppVersion": "1.6.6", - "description": "Semantic MCP server providing AI tools with direct vault access via HTTP transport.", + "description": "Give Claude Desktop and other AI assistants semantic access to your notes through a built-in Model Context Protocol (MCP) server.", "author": "Aaron Bockelie", "authorUrl": "https://github.com/aaronsb", "fundingUrl": "https://github.com/sponsors/aaronsb", diff --git a/package.json b/package.json index da2a7b7..da91a64 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "obsidian-mcp-plugin", "version": "0.11.21", - "description": "Semantic MCP server providing AI tools with direct vault access via HTTP transport.", + "description": "Give Claude Desktop and other AI assistants semantic access to your notes through a built-in Model Context Protocol (MCP) server.", "main": "main.js", "scripts": { "dev": "node esbuild.config.mjs", diff --git a/scripts/set-description.mjs b/scripts/set-description.mjs new file mode 100644 index 0000000..4ceebdc --- /dev/null +++ b/scripts/set-description.mjs @@ -0,0 +1,33 @@ +#!/usr/bin/env node +// Set the plugin description in package.json (the single source of truth). +// Run via `make set-description DESC='...'`, which then runs sync-version.mjs +// to propagate it into manifest.json. Avoids hand-editing either JSON file. + +import { readFileSync, writeFileSync } from 'fs'; + +const desc = process.argv[2]; + +if (!desc || !desc.trim()) { + console.error("❌ No description given. Usage: make set-description DESC='Your text.'"); + process.exit(1); +} + +// Obsidian's plugin guidelines cap the catalog description at 250 chars. +if (desc.length > 250) { + console.error(`❌ Description is ${desc.length} chars; Obsidian's limit is 250.`); + process.exit(1); +} + +try { + const pkg = JSON.parse(readFileSync('package.json', 'utf-8')); + if (pkg.description === desc) { + console.log('ℹ️ Description unchanged.'); + process.exit(0); + } + pkg.description = desc; + writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); + console.log(`✅ package.json description set (${desc.length} chars). Run sync-version to propagate.`); +} catch (error) { + console.error('❌ Failed to set description:', error.message); + process.exit(1); +} diff --git a/sync-version.mjs b/sync-version.mjs index a5245cf..b5bfd4c 100644 --- a/sync-version.mjs +++ b/sync-version.mjs @@ -7,9 +7,15 @@ try { const packageJson = JSON.parse(readFileSync('package.json', 'utf-8')); const version = packageJson.version; + // package.json is the single source of truth for both version and the + // plugin description. mcpb/manifest.json keeps its own Claude-Desktop + // specific description and is intentionally not synced here. + const description = packageJson.description; + // Read and update manifest.json const manifest = JSON.parse(readFileSync('manifest.json', 'utf-8')); manifest.version = version; + manifest.description = description; // Write updated manifest.json writeFileSync('manifest.json', JSON.stringify(manifest, null, 2) + '\n'); @@ -27,7 +33,7 @@ export function getVersion(): string { `; writeFileSync('src/version.ts', versionTs); - console.log(`✅ Synced version ${version} to manifest.json, mcpb/manifest.json, and version.ts`); + console.log(`✅ Synced version ${version} + description to manifest.json (version also: mcpb/manifest.json, version.ts)`); } catch (error) { console.error('❌ Failed to sync version:', error.message); process.exit(1);