"""Workspace blueprint — minimal, only what's needed."""
import logging
from flask import Blueprint, jsonify, session
import extensions as ext

logger = logging.getLogger("apex")
workspace_bp = Blueprint("workspace", __name__)

def _touch_workspace_engagement(repo, module_name: str, action: str = "query") -> dict:
    """Stub — kept for assistant.py compatibility."""
    return {}

def build_workspace_overview(sales_stack: dict) -> dict:
    """Stub — kept for assistant.py compatibility."""
    return {}

@workspace_bp.route("/workspace/modules")
def workspace_modules():
    if "user" not in session:
        return jsonify({"error": "Unauthenticated"}), 401
    return jsonify({"modules": [], "tenant_id": session.get("user", "anon")})