import { Router } from 'express';
import { TraceController } from '../controllers/TraceController';
import { requireTraceContext } from '../../core/guards/trace-context.guard';
import { requirePermission } from '../../core/guards/rbac.guard';

const router = Router();

/**
 * [CORE_LOG_02] 操作流水线追踪 API
 */
router.get('/pipeline/:traceId', requireTraceContext, requirePermission('audit:read'), TraceController.getPipeline);
router.get('/activities', requireTraceContext, requirePermission('audit:read'), TraceController.getActivities);

/**
 * [CORE_TELE_01] AI 代理自愈遥测 API
 */
router.get('/telemetry/healing', requireTraceContext, requirePermission('audit:read'), TraceController.getTelemetry);

export default router;
