This commit is contained in:
StellaOps Bot
2025-12-13 02:22:15 +02:00
parent 564df71bfb
commit 999e26a48e
395 changed files with 25045 additions and 2224 deletions

View File

@@ -0,0 +1,134 @@
using StellaOps.Symbols.Core.Models;
namespace StellaOps.Symbols.Server.Contracts;
/// <summary>
/// Request to upload a symbol manifest.
/// </summary>
public sealed record UploadSymbolManifestRequest(
string DebugId,
string BinaryName,
string? CodeId,
string? Platform,
BinaryFormat Format,
IReadOnlyList<SymbolEntryDto> Symbols,
IReadOnlyList<SourceMappingDto>? SourceMappings);
/// <summary>
/// Symbol entry DTO for API.
/// </summary>
public sealed record SymbolEntryDto(
ulong Address,
ulong Size,
string MangledName,
string? DemangledName,
SymbolType Type,
SymbolBinding Binding,
string? SourceFile,
int? SourceLine,
string? ContentHash);
/// <summary>
/// Source mapping DTO for API.
/// </summary>
public sealed record SourceMappingDto(
string CompiledPath,
string SourcePath,
string? ContentHash);
/// <summary>
/// Response from manifest upload.
/// </summary>
public sealed record UploadSymbolManifestResponse(
string ManifestId,
string DebugId,
string BinaryName,
string? BlobUri,
int SymbolCount,
DateTimeOffset CreatedAt);
/// <summary>
/// Request to resolve symbols.
/// </summary>
public sealed record ResolveSymbolsRequest(
string DebugId,
IReadOnlyList<ulong> Addresses);
/// <summary>
/// Response from symbol resolution.
/// </summary>
public sealed record ResolveSymbolsResponse(
string DebugId,
IReadOnlyList<SymbolResolutionDto> Resolutions);
/// <summary>
/// Symbol resolution DTO.
/// </summary>
public sealed record SymbolResolutionDto(
ulong Address,
bool Found,
string? MangledName,
string? DemangledName,
ulong Offset,
string? SourceFile,
int? SourceLine,
double Confidence);
/// <summary>
/// Symbol manifest list response.
/// </summary>
public sealed record SymbolManifestListResponse(
IReadOnlyList<SymbolManifestSummary> Manifests,
int TotalCount,
int Offset,
int Limit);
/// <summary>
/// Summary of a symbol manifest.
/// </summary>
public sealed record SymbolManifestSummary(
string ManifestId,
string DebugId,
string? CodeId,
string BinaryName,
string? Platform,
BinaryFormat Format,
int SymbolCount,
bool HasDsse,
DateTimeOffset CreatedAt);
/// <summary>
/// Detailed manifest response.
/// </summary>
public sealed record SymbolManifestDetailResponse(
string ManifestId,
string DebugId,
string? CodeId,
string BinaryName,
string? Platform,
BinaryFormat Format,
string TenantId,
string? BlobUri,
string? DsseDigest,
long? RekorLogIndex,
int SymbolCount,
IReadOnlyList<SymbolEntryDto> Symbols,
IReadOnlyList<SourceMappingDto>? SourceMappings,
DateTimeOffset CreatedAt);
/// <summary>
/// Health check response.
/// </summary>
public sealed record SymbolsHealthResponse(
string Status,
string Version,
DateTimeOffset Timestamp,
SymbolsHealthMetrics? Metrics);
/// <summary>
/// Health metrics.
/// </summary>
public sealed record SymbolsHealthMetrics(
long TotalManifests,
long TotalSymbols,
long TotalBlobBytes);