Files
Flypaper/src/Flypaper.Web/Mcp/McpResults.cs
T
TomandClaude Sonnet 5.5 7c11bf211e
Build and deploy / build (push) Successful in 1m36s
Release / image (push) Successful in 1m59s
Build and deploy / deploy (push) Successful in 31s
Release / release (push) Successful in 7s
Show the bots held in the trap right now
Dashboard table "Gerade in der Falle" and MCP tool list_active, backed by an
in-memory registry of running traps. Changelog prepared for 0.8.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 01:59:07 +01:00

106 lines
2.9 KiB
C#

namespace Flypaper.Web.Mcp;
public sealed record CatchItem(
long Id,
DateTime StartedAt,
DateTime EndedAt,
double DurationSeconds,
long BytesSent,
string Outcome,
string Strategy,
string Ip,
string? CountryCode,
string? Country,
string? City,
string? Asn,
string? Provider,
string? Target,
string? UserAgent);
public sealed record StatsResult(
string Period,
DateTime? Since,
int Catches,
int Rejected,
int UniqueIps,
double TotalHoldSeconds,
double AverageHoldSeconds,
int ActiveTraps,
CatchItem? LongestCatch);
public sealed record ActiveTrapItem(
DateTime StartedAt,
double DurationSeconds,
long BytesSent,
string Strategy,
string Ip,
string? CountryCode,
string? Country,
string? City,
string? Asn,
string? Provider,
string? Target,
string? UserAgent);
public sealed record ActiveTrapListResult(int Count, IReadOnlyList<ActiveTrapItem> Traps);
public sealed record CatchListResult(int Count, IReadOnlyList<CatchItem> Catches);
public sealed record TopResultItem(string Key, string? Label, int Catches, double TotalHoldSeconds);
public sealed record TopResult(string Dimension, string Period, IReadOnlyList<TopResultItem> Items);
public sealed record IpLookupResult(
string Ip,
bool Known,
string? CountryCode,
string? Country,
string? City,
string? Asn,
string? Provider,
int Catches,
int Rejected,
double TotalHoldSeconds,
long TotalBytesSent,
DateTime? FirstSeen,
DateTime? LastSeen,
IReadOnlyList<CatchItem> Events,
int EventsOmitted);
public sealed record RuleItem(
int Id,
string Kind,
string Pattern,
string Text,
int Priority,
bool Enabled,
string? Note,
DateTime CreatedAt,
DateTime UpdatedAt,
string CreatedBy,
int? Catches);
public sealed record RuleListResult(int Count, IReadOnlyList<RuleItem> Rules);
public sealed record DeleteResult(int Id, bool Deleted);
public sealed record UnexplainedItem(string Key, int Catches, IReadOnlyList<string> ExamplePaths, string? ExampleUserAgent, DateTime FirstSeen, DateTime LastSeen);
public sealed record UnexplainedListResult(string Period, string GroupBy, int UnexplainedCatches, int DistinctPaths, IReadOnlyList<UnexplainedItem> Groups, int GroupsOmitted);
public sealed record ValueCount(string Value, int Catches);
public sealed record TakeoverItem(int RuleId, string Pattern, string Text, int Priority, int Catches, IReadOnlyList<string> Examples);
public sealed record RuleTestItem(
string Kind,
string Pattern,
string Period,
int MatchedCatches,
int MatchedDistinctValues,
IReadOnlyList<ValueCount> Examples,
int NewlyExplainedCatches,
IReadOnlyList<TakeoverItem> TakesOverFrom,
int CatchesNoLongerExplained,
IReadOnlyList<string> NoLongerExplainedExamples);