@henryavila/mdprobe 0.2.1 → 0.2.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryavila/mdprobe",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Markdown viewer + reviewer for terminal/WSL with live reload, persistent annotations, and AI agent integration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: mdProbe
3
- description: Human review tool for any content >20 lines. BEFORE asking for
4
- feedback on findings, specs, plans, analysis, or any long output, save to
5
- file and open with mdprobe_view. Renders markdown with annotations, section
6
- approval, and structured feedback via YAML sidecars.
3
+ description: Preview, visualize, and review markdown in the browser. Call
4
+ mdprobe_view BEFORE presenting any content >20 lines for feedback or
5
+ validation findings, specs, plans, analysis, docs, or any long output.
6
+ Replaces inline review with rendered markdown, tables, diagrams, annotations,
7
+ and section approval. Trigger on preview, visualize, validate, render,
8
+ review document, browser preview, open in browser, feedback on long content.
7
9
  ---
8
10
 
9
11
  # mdProbe — Markdown Reviewer (MCP)
package/src/mcp.js CHANGED
@@ -83,7 +83,7 @@ export async function startMcpServer() {
83
83
  })
84
84
 
85
85
  server.registerTool('mdprobe_view', {
86
- description: 'Open content for human review in the browser. Call this BEFORE asking for feedback on any content >20 lines — findings, specs, plans, analysis, or any long output.',
86
+ description: 'Preview and open content in the browser for human review or validation. Call this BEFORE asking for feedback on any content >20 lines — findings, specs, plans, analysis, docs, or any long output. Renders markdown with syntax highlighting, tables, Mermaid diagrams, and LaTeX math.',
87
87
  inputSchema: z.object({
88
88
  paths: z.array(z.string()).optional().describe('Paths to .md files (relative or absolute)'),
89
89
  content: z.string().optional().describe('Raw markdown content to save and open'),
package/src/setup.js CHANGED
@@ -9,25 +9,28 @@ const PROJECT_ROOT = join(dirname(__filename), '..')
9
9
  const SKILL_SOURCE = join(PROJECT_ROOT, 'skills', 'mdprobe', 'SKILL.md')
10
10
  const DEFAULT_CONFIG_PATH = join(homedir(), '.mdprobe.json')
11
11
 
12
- // IDE skill directory mappings
12
+ // IDE skill directory mappings — detectDir is the IDE base config dir,
13
+ // skillsDir is where skills get installed (may not exist yet).
13
14
  const IDE_CONFIGS = {
14
- 'Claude Code': { skillsDir: join(homedir(), '.claude', 'skills') },
15
- 'Cursor': { skillsDir: join(homedir(), '.cursor', 'skills') },
16
- 'Gemini': { skillsDir: join(homedir(), '.gemini', 'skills') },
15
+ 'Claude Code': { detectDir: join(homedir(), '.claude'), skillsDir: join(homedir(), '.claude', 'skills') },
16
+ 'Cursor': { detectDir: join(homedir(), '.cursor'), skillsDir: join(homedir(), '.cursor', 'skills') },
17
+ 'Gemini': { detectDir: join(homedir(), '.gemini'), skillsDir: join(homedir(), '.gemini', 'skills') },
17
18
  }
18
19
 
19
20
  /**
20
- * Detect which IDEs have skill directories.
21
- * @returns {Promise<string[]>} List of IDE names with skills dirs
21
+ * Detect which IDEs are installed by checking their base config directory.
22
+ * @param {object} [overrideConfigs] - Override IDE_CONFIGS for testing
23
+ * @returns {Promise<string[]>} List of IDE names detected
22
24
  */
23
- export async function detectIDEs() {
25
+ export async function detectIDEs(overrideConfigs) {
26
+ const configs = overrideConfigs || IDE_CONFIGS
24
27
  const detected = []
25
- for (const [name, config] of Object.entries(IDE_CONFIGS)) {
28
+ for (const [name, config] of Object.entries(configs)) {
26
29
  try {
27
- await access(config.skillsDir)
30
+ await access(config.detectDir)
28
31
  detected.push(name)
29
32
  } catch {
30
- // Directory doesn't exist
33
+ // IDE not installed
31
34
  }
32
35
  }
33
36
  return detected
@@ -37,10 +40,12 @@ export async function detectIDEs() {
37
40
  * Install the SKILL.md file to an IDE's skill directory.
38
41
  * @param {string} ide - IDE name (e.g., 'Claude Code')
39
42
  * @param {string} [content] - Skill content (reads from source if omitted)
43
+ * @param {object} [overrideConfigs] - Override IDE_CONFIGS for testing
40
44
  * @returns {Promise<string>} Path where skill was installed
41
45
  */
42
- export async function installSkill(ide, content) {
43
- const config = IDE_CONFIGS[ide]
46
+ export async function installSkill(ide, content, overrideConfigs) {
47
+ const configs = overrideConfigs || IDE_CONFIGS
48
+ const config = configs[ide]
44
49
  if (!config) throw new Error(`Unknown IDE: ${ide}`)
45
50
 
46
51
  if (!content) {