chore(meta): make pattern for plugin description; rewrite copy

package.json is now the single source of truth for the plugin description
(as it already effectively is for version). sync-version.mjs propagates it
into manifest.json; mcpb/manifest.json keeps its Claude-Desktop-specific
description and is intentionally not synced.

Adds scripts/set-description.mjs + 'make set-description DESC=...' so neither
JSON file is hand-edited (250-char Obsidian limit enforced).

Rewrites the word-salad description to reality-based copy naming the actual
client and mechanism:
  'Give Claude Desktop and other AI assistants semantic access to your notes
   through a built-in Model Context Protocol (MCP) server.'
This commit is contained in:
Aaron Bockelie 2026-05-16 12:07:52 -05:00
parent 3cd6a1cb27
commit 46ed67361a
5 changed files with 48 additions and 5 deletions

View file

@ -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
release-patch release-minor release-major release publish promote sync-version mcpb set-description
MIN_OBSIDIAN := 0.15.0
@ -84,8 +84,12 @@ _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-<version>.mcpb) for Claude Desktop
node scripts/build-mcpb.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

View file

@ -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",

View file

@ -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",

View file

@ -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);
}

View file

@ -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);