pkm-mcp-server 1.4.2 → 1.5.0
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/CHANGELOG.md +22 -0
- package/hooks/stop-sweep.js +7 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.5.0] - 2026-03-21
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **Passive sweep hook upgraded to "PKM librarian"** — replaces inbox dumping with structured note creation in the correct project directory. Creates properly templated notes (tasks, ADRs, research notes, troubleshooting logs) with wikilinks to related notes via `vault_suggest_links`.
|
|
13
|
+
- Passive sweep: Haiku → Sonnet, 5 → 15 max turns, 3 → 17 tools
|
|
14
|
+
- Capture handler: Sonnet → Opus, 25 → 30 max turns, 8 → 17 tools
|
|
15
|
+
- Both hook agents now get all vault tools except `vault_trash` and `vault_capture`
|
|
16
|
+
- Capture handler prompt now includes `vault_suggest_links` for graph linking and `vault_search` for duplicate detection
|
|
17
|
+
- Stop hook converted from bash (`stop-sweep.sh`) to Node.js (`stop-sweep.js`) for direct `resolveProject()` import and cleaner prompt construction
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- Auto-detection of repo vs installed location for MCP config — `stop-sweep.js` checks for `../index.js` (repo) and falls back to `npx pkm-mcp-server@latest` (installed). Eliminates need for text replacement during hook installation.
|
|
21
|
+
- `OPENAI_API_KEY` passthrough in both hook agents' MCP config when set, enabling `vault_semantic_search` and `vault_suggest_links`
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- Sweep log files were empty due to pipe-based logging — parent process owned the FDs and exited before child could write. Now uses `openSync` FDs owned directly by the child process.
|
|
25
|
+
- Missing `child.on("error")` handler in sweep agent — spawn failures (e.g., `claude` not on PATH) now logged gracefully instead of crashing.
|
|
26
|
+
|
|
27
|
+
### Removed
|
|
28
|
+
- `hooks/stop-sweep.sh` — superseded by `hooks/stop-sweep.js`
|
|
29
|
+
- Inbox capture pattern (`00-Inbox/captures-{date}.md`) — all captures now go to project-specific typed notes
|
|
30
|
+
|
|
9
31
|
## [1.4.2] - 2026-03-21
|
|
10
32
|
|
|
11
33
|
### Fixed
|
package/hooks/stop-sweep.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
|
-
import { appendFileSync, closeSync, mkdirSync, openSync } from "node:fs";
|
|
4
|
+
import { appendFileSync, closeSync, existsSync, mkdirSync, openSync } from "node:fs";
|
|
5
5
|
import { access } from "node:fs/promises";
|
|
6
6
|
import { dirname, join } from "node:path";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
@@ -63,19 +63,18 @@ async function main() {
|
|
|
63
63
|
const { projectPath, error } = await resolveProject(cwd, VAULT_PATH);
|
|
64
64
|
if (error || !projectPath) return;
|
|
65
65
|
|
|
66
|
-
// Build MCP config
|
|
67
|
-
const
|
|
66
|
+
// Build MCP config — auto-detect repo (../index.js exists) vs installed (use npx)
|
|
67
|
+
const localIndex = join(__dirname, "..", "index.js");
|
|
68
|
+
const useLocal = existsSync(localIndex);
|
|
68
69
|
const mcpEnv = { VAULT_PATH };
|
|
69
70
|
if (process.env.OPENAI_API_KEY) {
|
|
70
71
|
mcpEnv.OPENAI_API_KEY = process.env.OPENAI_API_KEY;
|
|
71
72
|
}
|
|
72
73
|
const mcpConfig = JSON.stringify({
|
|
73
74
|
mcpServers: {
|
|
74
|
-
"obsidian-pkm":
|
|
75
|
-
command: "node",
|
|
76
|
-
args: [
|
|
77
|
-
env: mcpEnv,
|
|
78
|
-
},
|
|
75
|
+
"obsidian-pkm": useLocal
|
|
76
|
+
? { command: "node", args: [localIndex], env: mcpEnv }
|
|
77
|
+
: { command: "npx", args: ["-y", "pkm-mcp-server@latest"], env: mcpEnv },
|
|
79
78
|
},
|
|
80
79
|
});
|
|
81
80
|
|