integrations/claude-code/hooks/session_start.py

#!/usr/bin/env python3 """SessionStart hook -- register the agent with swarm-mcp."""

from future import annotations

import sys from pathlib import Path

sys.path.insert(0, str(Path(file).resolve().parent)) from _common import core # noqa: E402

if name == "main": try: sys.exit(core.run_session_start_hook(sys.stdin)) except Exception: sys.exit(0)