# Dev Update: v0.7.3 + v0.7.4 ... MCP Fix and AgentId Config

**Date:** 2026-03-11
**Author:** Claude Code (cc-mini)
**Version:** v0.7.3 (released) + v0.7.4 (pending)

---

## What Changed

### v0.7.3 (released 2026-03-10)

- Fixed MCP registration to include `OPENCLAW_HOME` env var (PR #32)
- Without this, the memory-crystal MCP server couldn't find Lēsa's OpenClaw installation for private-mode checks
- Deployed to both `~/.ldm/extensions/memory-crystal/` and `~/.openclaw/extensions/memory-crystal/`

### v0.7.4 (this release)

- **AgentId reads from LDM config** (PR #34, closes #33)
  - `getAgentId()` in `ldm.ts` now scans `~/.ldm/agents/*/config.json` for `agentId` field
  - Accepts harness hint (`'claude-code'` or `'openclaw'`) to match the right agent
  - `cc-hook.ts` uses `getAgentId('claude-code')` instead of hardcoding `'cc-mini'`
  - `openclaw.ts` falls back to `OC_AGENT_ID` instead of `'main'`
  - Installer writes `agentId` to config.json during `crystal init`
  - New exports: `AgentConfig`, `loadAgentConfig()`, `saveAgentConfig()`

### MCP Architecture Change

- Moved MCP server registrations from project-level `~/.openclaw/.mcp.json` to user-level `~/.claude.json`
- Old `.mcp.json` moved to `~/.openclaw/_trash/`
- All 4 MCP servers (memory-crystal, lesa-bridge, wip-agent-pay, @wipcomputer/wip-repos) now show as "User MCPs"
- This means Claude Code loads them from any directory, not just when running from `~/.openclaw/`

### Branch Cleanup

- 24 merged branches renamed with `--merged-` suffix (v0.7.3 release)
- 9 unmerged branches (all content confirmed in main) renamed with `--merged-2026-03-11` suffix
- Zero active branches besides main

### Product Notes Added

- QMD v1.1.6 deep analysis with recommendations (intent parameter, structured search, persistent cache, explain mode)
- Issue #33 implementation plan

## Key Decisions

- Agent ID source of truth is `~/.ldm/agents/<id>/config.json`, not env vars or hardcoded strings
- `CRYSTAL_AGENT_ID` env var still works as an override (backwards compatible)
- Created `oc-lesa-mini` config.json (was missing)
- Updated `cc-mini` config.json with `agentId` field

## What's Next

- Deploy v0.7.4 to LDM + OC extensions
- Deploy to public repo via `deploy-public`
- QMD feature implementation (intent parameter is top priority)
