Befunde aus dem Testbetrieb auf der Linux-VM behoben (#572)
- #578: Abgebrochene Laeufe (Schrittgrenze, Zeitueberschreitung, Abbruch, Ausnahme) tragen ihre bezahlten Token - vorher 0 in RunUsage, fuer das Budget unsichtbar. - #580: WebFetch prueft die aufgeloeste Zieladresse beim Verbinden; ein erlaubter Name, der auf 127.0.0.1 aufloest, wird gesperrt. - #575: Dateien entstehen unter Unix mit 0600 (AtomicFile, Protokolle, FileRW-Anhaengen, state.db), Protokollverzeichnisse mit 0700. - #576: SIGTERM/SIGINT beenden auch mit Fenster geordnet. - #593: OpenRouter-Statusdienst wird gestartet. - #589: Auftragsnachricht nennt aktuelle Zeit, Zeitzone und Termin. - #581: Unvollstaendiges Argument-JSON erreicht das Werkzeug nicht mehr; das Modell bekommt eine verstaendliche Rueckmeldung statt Parsertext. - #591: Weboberflaeche liest die Felder, die API und Ereignisstrom liefern (Freigaben, Protokoll, Taskboard mit Termin, Werkzeug-Einstellungen, Tokennutzung); Ereignisstrom in camelCase. - #592: Chat zeigt Nachrichten nicht mehr doppelt. - #536 (teilweise): A2A-Antworten tragen Absender und Empfaenger, Parser wirft nicht mehr; Datums- und Volltextfilter in Agenten-Chats. - deploy/publish.py: Packager-Pfad net10.0, Schalter --agent-file. - Version 0.1.4. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,50 +107,13 @@ internal static class ApiEndpoints
|
||||
if (host.Engine is not { } engine)
|
||||
return Unavailable("Agent-Engine ist nicht aktiv (kein API-Schlüssel).");
|
||||
|
||||
var allAgents = host.AgentAdmin.All;
|
||||
var list = new List<AgentCommunicationDto>();
|
||||
var list = AgentCommunicationBuilder.Build(
|
||||
host.AgentAdmin.All.Select(agent => (
|
||||
agent.AgentId,
|
||||
agent.DisplayName,
|
||||
(IEnumerable<Core.Engine.ChatEntry>)engine.GetChatHistory(agent.AgentId))));
|
||||
|
||||
foreach (var agent in allAgents)
|
||||
{
|
||||
var history = engine.GetChatHistory(agent.AgentId);
|
||||
foreach (var entry in history.Where(e => string.Equals(e.Source, Core.Engine.ChatSource.AgentComm, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
string? senderId = null;
|
||||
string? senderName = null;
|
||||
var content = entry.Content;
|
||||
|
||||
if (entry.Role == "user" && content.StartsWith("[Nachricht von Agent \""))
|
||||
{
|
||||
var endQuote = content.IndexOf('"', 22);
|
||||
if (endQuote > 22)
|
||||
{
|
||||
senderName = content[22..endQuote];
|
||||
var openParen = content.IndexOf('(', endQuote);
|
||||
var closeParen = content.IndexOf(')', openParen);
|
||||
if (openParen > 0 && closeParen > openParen)
|
||||
{
|
||||
senderId = content[(openParen + 1)..closeParen];
|
||||
}
|
||||
}
|
||||
var doubleNl = content.IndexOf("\n\n", StringComparison.Ordinal);
|
||||
if (doubleNl > 0)
|
||||
{
|
||||
content = content[(doubleNl + 2)..];
|
||||
}
|
||||
}
|
||||
|
||||
list.Add(new AgentCommunicationDto(
|
||||
TargetAgentId: agent.AgentId,
|
||||
TargetAgentName: agent.DisplayName,
|
||||
SourceAgentId: senderId,
|
||||
SourceAgentName: senderName,
|
||||
Role: entry.Role,
|
||||
Content: content,
|
||||
Timestamp: entry.Timestamp));
|
||||
}
|
||||
}
|
||||
|
||||
return Results.Ok(list.OrderBy(c => c.Timestamp).ToList());
|
||||
return Results.Ok(list);
|
||||
});
|
||||
|
||||
agents.MapGet("/{agentId}", (AppHost host, string agentId) =>
|
||||
|
||||
Reference in New Issue
Block a user