fix: move session dirs to ~/.browseros/sessions and update skill paths (#494)

* chore: bump server version

* fix: move session dirs to ~/.browseros/sessions and update skill paths

Session directories now live under ~/.browseros/sessions/{conversationId}/
instead of executionDir/sessions/. Adds 30-day cleanup for stale sessions
at server startup. Updates 6 default skills to reference the working
directory instead of hardcoding ~/Downloads/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: rename sessionExecutionDir to workingDir across server

Consistent naming for the per-conversation working directory:
- ResolvedAgentConfig.sessionExecutionDir → workingDir
- ToolDirectories.executionDir → workingDir
- resolveExecutionPath() → resolveWorkingPath()
- buildBrowserToolSet param: executionDir → workingDir

Server-level executionDir (DB, logs) unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address PR review — restore emoji folder name, refresh session mtime

- Revert "Read Later" back to "📚 Read Later" to avoid creating
  duplicate bookmark folders for existing users
- Touch session dir mtime on each message via utimes() so cleanup
  correctly reflects last activity, not just directory creation time

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address PR review round 2 — remove dead executionDir, fix emoji

- Remove executionDir from ChatServiceDeps and ChatRouteDeps since
  resolveSessionDir now uses getSessionsDir() directly
- Fix missed emoji in notification format template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nikhil
2026-03-12 16:41:47 -07:00
committed by GitHub
parent 32dd42cc6b
commit 8a38e90e24
22 changed files with 78 additions and 40 deletions

View File

@@ -10,10 +10,12 @@ export const PATHS = {
DEFAULT_EXECUTION_DIR: process.cwd(),
BROWSEROS_DIR_NAME: '.browseros',
MEMORY_DIR_NAME: 'memory',
SESSIONS_DIR_NAME: 'sessions',
TOOL_OUTPUT_DIR_NAME: 'tool-output',
SOUL_FILE_NAME: 'SOUL.md',
CORE_MEMORY_FILE_NAME: 'CORE.md',
SKILLS_DIR_NAME: 'skills',
SOUL_MAX_LINES: 150,
MEMORY_RETENTION_DAYS: 30,
SESSION_RETENTION_DAYS: 30,
} as const