fix(cli): use direct pip install for mem0 dependencies in uv tools
Summary
- Fix mem0 dependency installation when osdu-agent is installed as a uv tool from a custom package index (GitLab Package Registry)
- Replace complex uv-receipt.toml parsing with simple
uv pip install --pythonapproach - Remove ~80 lines of fragile code
Problem
When running osdu-agent config memory on Windows with osdu-agent installed from the GitLab Package Registry:
✗ Tool reinstall failed: × No solution found when resolving dependencies:
╰─▶ Because osdu-agent was not found in the package registry...
The previous code tried to reinstall the tool with --with flags but didn't preserve the --index-url from uv-receipt.toml.
Solution
Install dependencies directly into the tool's Python environment:
# OLD: Complex receipt parsing + full tool reinstall
uv tool install --force --with mem0ai --with chromadb osdu-agent
# NEW: Simple direct install
uv pip install --python sys.executable mem0ai chromadb
Test plan
-
Tested on Windows with uv tool installed from GitLab Package Registry -
Verified osdu-agent config memorysuccessfully installs mem0ai and chromadb -
Verified settings.json updated with "type": "mem0"