from pathlib import Path import shutil import subprocess source = Path(__file__).resolve().parents[1] target = Path.home() / '.local/share/agents-mcp' target.mkdir(parents=True, exist_ok=True) for name in ['provider-icons.css', 'session_context.py', 'web_auth_store.py', 'attention_digest.py', 'attention-shared.mjs', 'attention-timeline.mjs', 'attention.py', 'attention.mjs', 'attention.css', 'public_snapshot.py', 'http_boundary.py', 'server.py', 'mcp_server.py', 'orca_backend.py', 'owner_auth.py', 'web_dashboard.py', 'pyproject.toml', 'uv.lock', 'app.js', 'login.js', 'index.html', 'style.css']: shutil.copy2(source / name, target / name) for name in ['attention.html', 'attention-timeline.html', 'attention-timeline.css', 'attention-model.mjs']: (target / name).unlink(missing_ok=True) shutil.copytree(source / 'icons', target / 'icons', dirs_exist_ok=True) (target / 'shared').mkdir(exist_ok=True) for module in (source / 'shared').glob('*.mjs'): shutil.copy2(module, target / 'shared' / module.name) shutil.copytree(source / 'scripts', target / 'scripts', dirs_exist_ok=True) subprocess.run(['uv', 'sync', '--frozen', '--directory', str(target)], check=True) subprocess.run([str(target / '.venv/bin/python'), str(target / 'scripts/install_services.py')], check=True)