feat: ship agent-first mission control v0.2.57
CI - Build & Test / Backend (.NET) (push) Successful in 42s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 2m46s
CI - Build & Test / Security Check (push) Successful in 3s
CI - Build & Test / Deploy Nexus (push) Successful in 56s

This commit is contained in:
AzuTear
2026-07-31 22:39:47 +02:00
parent 3bc7622977
commit f5552218bc
535 changed files with 95242 additions and 8791 deletions
+42 -7
View File
@@ -1,20 +1,55 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Nexus.Api.Models;
using Nexus.Api.Services;
namespace Nexus.Api.Controllers;
[Authorize(Roles = "owner")]
[ProducesResponseType(
typeof(OpenClawAgentConfigurationErrorDto),
StatusCodes.Status403Forbidden)]
[ProducesResponseType(
typeof(OpenClawAgentConfigurationErrorDto),
StatusCodes.Status409Conflict)]
[ProducesResponseType(
typeof(OpenClawAgentConfigurationErrorDto),
StatusCodes.Status502BadGateway)]
[ProducesResponseType(
typeof(OpenClawAgentConfigurationErrorDto),
StatusCodes.Status503ServiceUnavailable)]
[ProducesResponseType(
typeof(OpenClawAgentConfigurationErrorDto),
StatusCodes.Status504GatewayTimeout)]
[ApiController]
[Route("api/v1/incidents")]
public class IncidentsController(IIncidentService incidentService) : ControllerBase
{
[HttpGet]
public async Task<IResult> GetAll()
=> Results.Ok(await incidentService.GetAllAsync());
[ProducesResponseType(typeof(IReadOnlyList<IncidentSummary>), StatusCodes.Status200OK)]
public Task<IResult> GetAll(
[FromQuery] string agentId = "iris",
CancellationToken cancellationToken = default)
=> OpenClawContentReadEndpoint.ExecuteAsync(async () =>
Results.Ok(await incidentService.GetAllAsync(
agentId,
cancellationToken)));
[HttpGet("{name}")]
public async Task<IResult> GetOne(string name)
{
var incident = await incidentService.GetByNameAsync(name);
return incident is null ? Results.NotFound() : Results.Ok(incident);
}
[ProducesResponseType(typeof(IncidentDetail), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public Task<IResult> GetOne(
string name,
[FromQuery] string agentId = "iris",
CancellationToken cancellationToken = default)
=> OpenClawContentReadEndpoint.ExecuteAsync(async () =>
{
var incident = await incidentService.GetByNameAsync(
name,
agentId,
cancellationToken);
return incident is null
? Results.NotFound()
: Results.Ok(incident);
});
}