memento-mcp 0.3.3 → 0.3.4

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/package.json +1 -1
  2. package/src/cli.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memento-mcp",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "mcpName": "io.github.myrakrusemark/memento-protocol",
5
5
  "description": "The Memento Protocol — persistent memory for AI agents",
6
6
  "type": "module",
package/src/cli.js CHANGED
@@ -747,9 +747,10 @@ async function runUpdate() {
747
747
  fs.writeFileSync(versionPath, pkgVersion + "\n");
748
748
 
749
749
  // Ensure SessionStart hook is registered for Claude Code workspaces
750
+ // Detect by .claude/ dir (older configs may not have agents field)
750
751
  const config = readJsonFile(configPath) || {};
751
- const agents = config.agents || [];
752
- const hasClaude = agents.includes("claude-code");
752
+ const hasClaude = (config.agents || []).includes("claude-code")
753
+ || fs.existsSync(path.join(cwd, ".claude"));
753
754
  let hooksUpdated = false;
754
755
  if (hasClaude) {
755
756
  const settingsPath = path.join(cwd, ".claude", "settings.local.json");