FileLedger merkt je Agent die gelesene Fassung einer Datei in gemeinsamen Bereichen. write, copy und Downloads (FTP, RocketChat) ersetzen eine Datei nur, wenn sie seit dem Lesen unveraendert ist; eine fremde Datei nicht ungelesen. append bleibt ungeprueft, macht aeltere Lesestaende aber ungueltig. Abgelehnte Schreibvorgaenge: eigener Audit-Status Conflict, Tabelle FileConflicts, Hotspots (>= 3 in 7 Tagen) in der Teamuebersicht. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
560 B
C#
18 lines
560 B
C#
namespace ClawdDotNet.Core.Tools;
|
|
|
|
public sealed record ToolResult(
|
|
bool Success,
|
|
string Content,
|
|
string? ErrorMessage = null
|
|
)
|
|
{
|
|
public static ToolResult Ok(string content) => new(true, content);
|
|
|
|
public static ToolResult Fail(string error) => new(false, "", error);
|
|
|
|
/// <summary>#720: Refused because it would have lost another write — audited as a conflict, not as an error.</summary>
|
|
public bool IsConflict { get; init; }
|
|
|
|
public static ToolResult Conflict(string error) => new(false, "", error) { IsConflict = true };
|
|
}
|