import { defineHandler } from '@kb-labs/sdk';
import { calculateHealth } from '@kb-labs/quality-core/health';

// src/rest/handlers/health-handler.ts
var health_handler_default = defineHandler({
  async execute(ctx, input) {
    const { detailed } = input.query ?? {};
    const healthResult = await calculateHealth(ctx.cwd);
    return {
      score: healthResult.score,
      grade: healthResult.grade,
      issues: detailed ? healthResult.issues : void 0
    };
  }
});

export { health_handler_default as default };
//# sourceMappingURL=health-handler.js.map
//# sourceMappingURL=health-handler.js.map