import { defineHandler } from '@kb-labs/sdk';
import { loadHistory } from '@kb-labs/qa-core';

// src/rest/handlers/latest-handler.ts
var latest_handler_default = defineHandler({
  async execute(ctx, _input) {
    const history = loadHistory(ctx.cwd);
    if (history.length === 0) {
      return { entry: null };
    }
    return { entry: history[history.length - 1] };
  }
});

export { latest_handler_default as default };
//# sourceMappingURL=latest-handler.js.map
//# sourceMappingURL=latest-handler.js.map