import json, os
B = os.path.dirname(os.path.abspath(__file__))

def load(n):
    p = os.path.join(B, n)
    if not os.path.exists(p):
        return None
    with open(p, encoding='utf-8') as f:
        return json.load(f)

c = load('mcp_customers.json') or {}
print('mcp_customers updated_at:', c.get('updated_at'), 'n=', len(c.get('customers') or []))

o = load('mcp_orders_input.json') or {}
print('mcp_orders keys:', list(o.keys())[:10])
ords = o.get('orders') or o.get('items') or []
print('orders n=', len(ords), 'updated:', o.get('updated') or o.get('updated_at'))

a = load('activities_feishu.json') or {}
print('activities_feishu total:', a.get('total'), 'generated:', a.get('generated'), 'months:', a.get('months'))

d = load('daily_activities_mcp.json') or {}
print('daily_activities total:', d.get('total'), 'updated:', d.get('updated'))

w = load('workbench_data.json') or {}
print('workbench keys:', list(w.keys())[:20])
print('merged_at:', w.get('_merged_at'), 'size MB: %.2f' % (os.path.getsize(os.path.join(B, 'workbench_data.json')) / 1048576.0) if os.path.exists(os.path.join(B, 'workbench_data.json')) else 'missing')
