chore: merge upstream v12.4.7 + keep local fixes
Major upstream changes (v12.3.9 → v12.4.7): v12.3.9 — Stop hook fire-and-forget (eliminates ~110s terminal block); hook port precedence; Telegram notifier; security_alert/security_note observation types v12.4.0/12.4.1 — worker startup streamlined; consolidated DB connections; Chroma backfill watermark cache (422% CPU → 0% on restart) v12.4.2 — context-overflow infinite loop fixed (clears memorySessionId on "Prompt is too long"); <task-notification> payload pollution blocked at hook + worker boundary v12.4.3 — one-time pollution cleanup migration (CleanupV12_4_3): purges observer-sessions rows + cascade, stuck pending chains, Chroma rebuild; auto VACUUM INTO backup. Ran successfully on this DB: - 1463 observer-sessions purged - 3682 cascade rows - 102MB backup at ~/.claude-mem/backups/ v12.4.4 — stop draining queue on /clear (removes SessionEnd shim that had been abandoning pending observations for 6 months) v12.4.5 — fix observation persistence on fresh installs (migration 28 mirror in SessionStore) v12.4.7 — cynical-deletion sweep (closes 27 issues); multi-account isolation via per-UID worker port (37700 + uid % 100, with explicit CLAUDE_MEM_WORKER_PORT override); CLAUDE_MEM_INTERNAL=1 trust boundary replaces cwd-based observer-session detection; observations.metadata column (migration 30); proxy env vars stripped from spawned subprocs Local fixes preserved: - env-sanitizer PATH extension for claude CLI lookup (auto-merged cleanly with upstream's new ENV_PROXY_VARS proxy stripping) - SessionStore stale session reset (mac sleep / 4h wall-clock) Settings: CLAUDE_MEM_WORKER_PORT=37777 explicit override preserved through the per-UID port migration. Worker restarted to v12.4.7. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,26 @@ npm run build-and-sync # Build, sync to marketplace, restart worker
|
||||
|
||||
Settings are managed in `~/.claude-mem/settings.json`. The file is auto-created with defaults on first run.
|
||||
|
||||
## Multi-account
|
||||
|
||||
Claude-mem supports running multiple isolated profiles on the same machine (e.g. work vs personal accounts) via environment variables. No CLI subcommand needed — set the env vars in the shell where you run Claude Code.
|
||||
|
||||
- **Switch profiles per shell:** Set `CLAUDE_MEM_DATA_DIR=<path>` and every claude-mem path (database, chroma, logs, settings.json, worker.pid, transcripts config) derives from it. Example:
|
||||
|
||||
```bash
|
||||
export CLAUDE_MEM_DATA_DIR="$HOME/.claude-mem-work"
|
||||
```
|
||||
|
||||
- **Port collisions are auto-handled:** The default worker port is `37700 + (uid % 100)`, so two different OS users on the same box get different ports for free. If you want fixed ports per profile (e.g. you run two profiles as the same UID), set `CLAUDE_MEM_WORKER_PORT` too:
|
||||
|
||||
```bash
|
||||
export CLAUDE_MEM_WORKER_PORT=37800
|
||||
```
|
||||
|
||||
- **All paths and ports derive from these two env vars.** Hooks, npx-cli (`install`/`uninstall`/`start`/`search`), the OpenCode plugin, the OpenClaw installer, and the timeline-report skill all honor them. The settings file itself lives at `$CLAUDE_MEM_DATA_DIR/settings.json`.
|
||||
|
||||
- **Closes #2101.** See `src/shared/SettingsDefaultsManager.ts` for the canonical port/data-dir defaults and `plugin/skills/timeline-report/SKILL.md` for the shell snippet that resolves the port for arbitrary skills.
|
||||
|
||||
## File Locations
|
||||
|
||||
- **Source**: `<project-root>/src/`
|
||||
@@ -107,3 +127,13 @@ This architecture preserves the open-source nature of the project while enabling
|
||||
## Important
|
||||
|
||||
No need to edit the changelog ever, it's generated automatically.
|
||||
|
||||
## Daily Maintenance
|
||||
|
||||
Run a daily version check across all package manifests and upgrade every dependency to its latest version — including major version bumps. Staying on the latest is the goal; do not skip majors.
|
||||
|
||||
- Check `package.json` (root) and all nested `package.json` files (e.g. `plugin/`, `openclaw/`) for outdated dependencies via `npm outdated`.
|
||||
- Upgrade every package to `latest` (use `npm install <pkg>@latest` for each, or `npx npm-check-updates -u && npm install`). Bump majors too.
|
||||
- Run `npm audit fix` to resolve advisories.
|
||||
- After upgrades, run `npm run build-and-sync` and verify the worker starts and tests pass. Fix any breakage caused by major bumps in the same change.
|
||||
- Commit the updated `package.json` and `package-lock.json` files.
|
||||
|
||||
Reference in New Issue
Block a user