search and ai stabilization work, localization stablized.

This commit is contained in:
master
2026-02-24 23:29:36 +02:00
parent 4f947a8b61
commit b07d27772e
766 changed files with 55299 additions and 3221 deletions

View File

@@ -12,6 +12,7 @@ using StellaOps.Determinism;
using StellaOps.Evidence.Pack;
using StellaOps.Evidence.Pack.Models;
using System.Collections.Immutable;
using static StellaOps.Localization.T;
namespace StellaOps.AdvisoryAI.WebService.Endpoints;
@@ -132,12 +133,12 @@ public static class EvidencePackEndpoints
if (request.Claims is null || request.Claims.Count == 0)
{
return Results.BadRequest(new { error = "At least one claim is required" });
return Results.BadRequest(new { error = _t("advisoryai.validation.claims_required") });
}
if (request.Evidence is null || request.Evidence.Count == 0)
{
return Results.BadRequest(new { error = "At least one evidence item is required" });
return Results.BadRequest(new { error = _t("advisoryai.validation.evidence_items_required") });
}
var claims = request.Claims.Select(c => new EvidenceClaim
@@ -205,7 +206,7 @@ public static class EvidencePackEndpoints
if (pack is null)
{
return Results.NotFound(new { error = "Evidence pack not found", packId });
return Results.NotFound(new { error = _t("advisoryai.error.evidence_pack_not_found"), packId });
}
return Results.Ok(EvidencePackResponse.FromPack(pack));
@@ -228,7 +229,7 @@ public static class EvidencePackEndpoints
if (pack is null)
{
return Results.NotFound(new { error = "Evidence pack not found", packId });
return Results.NotFound(new { error = _t("advisoryai.error.evidence_pack_not_found"), packId });
}
var signedPack = await evidencePackService.SignAsync(pack, cancellationToken)
@@ -254,7 +255,7 @@ public static class EvidencePackEndpoints
if (pack is null)
{
return Results.NotFound(new { error = "Evidence pack not found", packId });
return Results.NotFound(new { error = _t("advisoryai.error.evidence_pack_not_found"), packId });
}
// Get signed version from store
@@ -265,7 +266,7 @@ public static class EvidencePackEndpoints
if (signedPack is null)
{
return Results.BadRequest(new { error = "Pack is not signed", packId });
return Results.BadRequest(new { error = _t("advisoryai.error.pack_not_signed"), packId });
}
var result = await evidencePackService.VerifyAsync(signedPack, cancellationToken)
@@ -307,7 +308,7 @@ public static class EvidencePackEndpoints
if (pack is null)
{
return Results.NotFound(new { error = "Evidence pack not found", packId });
return Results.NotFound(new { error = _t("advisoryai.error.evidence_pack_not_found"), packId });
}
var exportFormat = format?.ToLowerInvariant() switch