Entscheidungen aus dem Testbetrieb umgesetzt (#572): #577 #579 #581 #589 #193 #205 #594 #595 #597 #598 #599 #588
- Engine: leere Antworten nachfassen, Aufgaben enden mit Ergebniszeile (EmptyResponse/Incomplete), gleiche Fehlschlaege erkennen (RepeatedFailure), Zeitzeile vor Chatnachrichten, Werkzeugergebnisse gerahmt, Vorpruefung vor dem Staging, Belegkosten wie RunUsage - Staging: gescheiterte Freigaben als Failed; AgentEditor-Aenderungen freigabepflichtig, Selbstbearbeitung gesperrt (allowSelfEdit) - Taskboard: Termine beim Anlegen pruefen, naechster/letzter Lauf, pausieren, Sofortlauf, Kostenprognose, Hinweis auf wachsenden Kontext; Jobs-Reiter und /api/jobs entfernt - Release: Instanzmanager samt Weboberflaeche im Paket, setup.json fragt manager.json ab, Token nicht mehr ins systemd-Journal Version 0.1.6. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,31 +83,6 @@ public sealed record ChatEntryDto(
|
||||
/// <summary>Was der Browser schickt, wenn jemand etwas in den Chat tippt.</summary>
|
||||
public sealed record SendMessageDto(string Message);
|
||||
|
||||
/// <summary>Ein geplanter Lauf.</summary>
|
||||
public sealed record JobDto(
|
||||
string Kind,
|
||||
string JobId,
|
||||
string AgentId,
|
||||
string AgentName,
|
||||
string ToolName,
|
||||
string Cron,
|
||||
string Message,
|
||||
bool RunOnStart,
|
||||
DateTime? NextRunUtc,
|
||||
DateTime? LastRunLocal,
|
||||
bool CronValid,
|
||||
bool Enabled);
|
||||
|
||||
/// <summary>Was einen geplanten Lauf ausmacht — beim Anlegen wie beim Ändern.</summary>
|
||||
public sealed record JobInputDto(
|
||||
string AgentId,
|
||||
string Kind,
|
||||
string ToolName = "",
|
||||
string JobTypeId = "",
|
||||
string Cron = "",
|
||||
string TaskMessage = "",
|
||||
bool RunOnStart = false);
|
||||
|
||||
/// <summary>Ein Dienst der Instanz.</summary>
|
||||
public sealed record ServiceDto(
|
||||
string ServiceId,
|
||||
@@ -138,7 +113,47 @@ public sealed record TaskDto(
|
||||
string Body,
|
||||
DateTime CreatedAt,
|
||||
DateTime UpdatedAt,
|
||||
TaskWhenDto? When = null);
|
||||
TaskWhenDto? When = null,
|
||||
DateTime? NextRunUtc = null,
|
||||
TaskLastRunDto? LastRun = null,
|
||||
string? Hinweis = null);
|
||||
|
||||
/// <summary>Der letzte Lauf einer Aufgabe (#594) - aus dem Beleg, samt Kosten.</summary>
|
||||
public sealed record TaskLastRunDto(DateTime OccurredAt, string Status, decimal CostUsd, bool CostIsKnown, string ResultRef);
|
||||
|
||||
/// <summary>Was die Weboberflaeche beim Anlegen oder Aendern einer Aufgabe schickt (#594).</summary>
|
||||
public sealed record TaskInputDto(
|
||||
string Title,
|
||||
string Body = "",
|
||||
string Assignee = "",
|
||||
string? WhenKind = null,
|
||||
string? WhenValue = null,
|
||||
string? TimeZone = null,
|
||||
string Acceptance = "",
|
||||
int Priority = 3);
|
||||
|
||||
/// <summary>Die Kostenprognose einer Instanz (#595).</summary>
|
||||
public sealed record ForecastDto(
|
||||
IReadOnlyList<ForecastTaskDto> Tasks,
|
||||
decimal TasksPerDay,
|
||||
decimal OtherPerDay,
|
||||
decimal TotalPerDay,
|
||||
decimal TotalPerMonth,
|
||||
decimal OneOffOpen,
|
||||
int WithoutBasis);
|
||||
|
||||
/// <summary>Eine Zeile der Kostenprognose. <c>Basis</c>: Laeufe, Agent, Schaetzung oder Unbekannt.</summary>
|
||||
public sealed record ForecastTaskDto(
|
||||
string TaskId,
|
||||
string Title,
|
||||
string AgentId,
|
||||
string Model,
|
||||
double RunsPerDay,
|
||||
bool OneOffOpen,
|
||||
decimal? CostPerRun,
|
||||
string Basis,
|
||||
int Sample,
|
||||
decimal CostPerDay);
|
||||
|
||||
/// <summary>
|
||||
/// Der Termin einer Aufgabe (<c>cron</c>, <c>every</c>, <c>at</c>) samt Zeitzone. Ohne ihn
|
||||
|
||||
@@ -69,32 +69,38 @@ internal static class Mapping
|
||||
public static ChatEntryDto ToDto(this ChatEntry entry)
|
||||
=> new(entry.Role, entry.Content, entry.Timestamp, entry.Source);
|
||||
|
||||
public static JobDto ToDto(this JobSummary job, DateTime? lastRun)
|
||||
=> new(
|
||||
job.Kind == JobKind.ToolJob ? "toolJob" : "agentWakeup",
|
||||
job.JobId,
|
||||
job.AgentId,
|
||||
job.AgentName,
|
||||
job.ToolName,
|
||||
job.Cron,
|
||||
job.Message,
|
||||
job.RunOnStart,
|
||||
job.NextRunUtc,
|
||||
lastRun,
|
||||
job.CronValid,
|
||||
job.Enabled);
|
||||
public static TaskDto ToDto(this TaskOverview overview)
|
||||
=> overview.Task.ToDto() with
|
||||
{
|
||||
NextRunUtc = overview.NextRunUtc,
|
||||
LastRun = overview.LastRun is { } lauf
|
||||
? new TaskLastRunDto(lauf.OccurredAt, lauf.Status, lauf.CostUsd, lauf.CostIsKnown, lauf.ResultRef)
|
||||
: null,
|
||||
Hinweis = overview.Hinweis
|
||||
};
|
||||
|
||||
public static JobDefinition ToDefinition(this JobInputDto input)
|
||||
public static TaskInput ToInput(this TaskInputDto input)
|
||||
=> new(
|
||||
input.AgentId,
|
||||
string.Equals(input.Kind, "toolJob", StringComparison.OrdinalIgnoreCase)
|
||||
? JobKind.ToolJob
|
||||
: JobKind.AgentWakeup,
|
||||
input.ToolName,
|
||||
input.JobTypeId,
|
||||
input.Cron,
|
||||
input.TaskMessage,
|
||||
input.RunOnStart);
|
||||
input.Title ?? "",
|
||||
input.Body ?? "",
|
||||
input.Assignee ?? "",
|
||||
input.WhenKind,
|
||||
input.WhenValue,
|
||||
input.TimeZone,
|
||||
input.Acceptance ?? "",
|
||||
input.Priority);
|
||||
|
||||
public static ForecastDto ToDto(this InstanzPrognose prognose)
|
||||
=> new(
|
||||
prognose.Aufgaben.Select(a => new ForecastTaskDto(
|
||||
a.TaskId, a.Title, a.AgentId, a.Model, a.LaeufeProTag, a.EinmaligOffen,
|
||||
a.KostenJeLauf, a.Grundlage.ToString(), a.Stichprobe, a.KostenProTag)).ToList(),
|
||||
prognose.AufgabenProTag,
|
||||
prognose.SonstigeProTag,
|
||||
prognose.SummeProTag,
|
||||
prognose.SummeProMonat,
|
||||
prognose.EinmaligOffen,
|
||||
prognose.OhneKostenbasis);
|
||||
|
||||
public static ServiceDto ToDto(this ServiceConfig service)
|
||||
=> new(
|
||||
|
||||
Reference in New Issue
Block a user