claude-home 1.5.26 → 1.5.27

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": "claude-home",
3
- "version": "1.5.26",
3
+ "version": "1.5.27",
4
4
  "description": "Web dashboard for Claude Code — browse sessions, manage skills, hooks, commands, and agents",
5
5
  "main": "server.js",
6
6
  "bin": {
package/public/index.html CHANGED
@@ -4529,7 +4529,8 @@
4529
4529
  const mNote = hash.match(/^#\/note\/(.+)$/);
4530
4530
  if (mSession) { this.view = 'sessions'; await this.openSessionById(mSession[2], mSession[1]); }
4531
4531
  if (mNote) {
4532
- await this.loadPersonalNotes();
4532
+ const notes = await fetch('/api/notes').then(r => r.json()).catch(() => []);
4533
+ this.personalNotes = notes;
4533
4534
  const note = this.personalNotes.find(n => n.filename === mNote[1]);
4534
4535
  if (note) { this.view = 'notes'; this.selectedNote = note; }
4535
4536
  }
package/server.js CHANGED
@@ -1906,7 +1906,7 @@ When the user asks you to "save a note", "add to notes", "guarda esto como nota"
1906
1906
 
1907
1907
  <the content the user wants to save>
1908
1908
  \`\`\`
1909
- 2. Use the Bash tool to write the file.
1909
+ 2. Use the Write tool to create the file (not Bash).
1910
1910
  3. Confirm with: "Saved to Notes: http://localhost:3141/#/note/<filename>"
1911
1911
 
1912
1912
  The notes directory may not exist yet — create it if needed with \`mkdir -p\`.
@@ -1922,10 +1922,23 @@ app.get('/api/notes/claude-md-status', (req, res) => {
1922
1922
 
1923
1923
  app.post('/api/notes/setup-claude', (req, res) => {
1924
1924
  const claudeMdPath = path.join(os.homedir(), '.claude', 'CLAUDE.md');
1925
+ const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
1925
1926
  try {
1926
1927
  const current = fs.existsSync(claudeMdPath) ? fs.readFileSync(claudeMdPath, 'utf8') : '';
1927
1928
  if (current.includes('Personal Notes')) return res.json({ ok: true, alreadyInstalled: true });
1929
+ // Append CLAUDE.md snippet
1928
1930
  fs.writeFileSync(claudeMdPath, current + '\n' + NOTES_CLAUDE_MD_SNIPPET, 'utf8');
1931
+ // Add Write permission for notes dir to settings.json
1932
+ try {
1933
+ const settings = fs.existsSync(settingsPath) ? JSON.parse(fs.readFileSync(settingsPath, 'utf8')) : {};
1934
+ if (!settings.permissions) settings.permissions = {};
1935
+ if (!settings.permissions.allow) settings.permissions.allow = [];
1936
+ const rule = `Write(${path.join(os.homedir(), '.claude', 'claude-home', 'notes', '*')})`;
1937
+ if (!settings.permissions.allow.includes(rule)) {
1938
+ settings.permissions.allow.push(rule);
1939
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n', 'utf8');
1940
+ }
1941
+ } catch {}
1929
1942
  res.json({ ok: true });
1930
1943
  } catch (e) { res.status(500).json({ error: e.message }); }
1931
1944
  });