Initial commit: ClawdDotNet

Import des bestehenden Projektstands in Git.
- .NET 10 WinForms Anwendung (Multi-Agent / Tool-System)
- .gitignore fuer Build-Artefakte, Secrets und Runtime-Daten ergaenzt

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-07-26 18:21:46 +02:00
co-authored by Claude Opus 4.8
commit 2fed388c99
154 changed files with 29736 additions and 0 deletions
+124
View File
@@ -0,0 +1,124 @@
using System.Text.Json.Serialization;
namespace ClawdDotNet.Core.Config;
public sealed class AgentConfig
{
[JsonPropertyName("agentId")]
public string AgentId { get; set; } = "";
[JsonPropertyName("displayName")]
public string DisplayName { get; set; } = "";
[JsonPropertyName("model")]
public string Model { get; set; } = "anthropic/claude-sonnet-4-5";
[JsonPropertyName("systemPrompt")]
public string SystemPrompt { get; set; } = "";
/// <summary>
/// Identität des Agenten (aus Identity.md geladen).
/// Definiert WER der Agent ist: Name, Rolle, Hintergrund.
/// </summary>
[JsonIgnore]
public string Identity { get; set; } = "";
/// <summary>
/// Seele des Agenten (aus Soul.md geladen).
/// Definiert WIE der Agent denkt: Persönlichkeit, Werte, Verhaltensmuster.
/// </summary>
[JsonIgnore]
public string Soul { get; set; } = "";
/// <summary>
/// Lokaler Pfad zum Workspace-Verzeichnis des Agenten.
/// Wird zur Laufzeit vom Host gesetzt.
/// </summary>
/// <summary>
/// Kurzbeschreibung der Rolle/Aufgabe des Agenten.
/// Wird aus AgentList.json geladen und bei list_agents angezeigt.
/// </summary>
[JsonIgnore]
public string Description { get; set; } = "";
/// <summary>
/// Absoluter Pfad zum Agent-Verzeichnis (Agent-XYZ).
/// Wird zur Laufzeit gesetzt und bleibt stabil auch bei DisplayName-Änderungen.
/// </summary>
[JsonIgnore]
public string AgentDir { get; set; } = "";
[JsonIgnore]
public string WorkspacePath { get; set; } = "";
/// <summary>
/// Lokaler Pfad zum geteilten Workspace-Verzeichnis (SharedWorkspace).
/// Wird zur Laufzeit vom Host gesetzt.
/// </summary>
[JsonIgnore]
public string SharedWorkspacePath { get; set; } = "";
/// <summary>
/// Baut den vollständigen System-Prompt aus Identity + Soul + SystemPrompt zusammen.
/// </summary>
[JsonIgnore]
public string FullSystemPrompt
{
get
{
var parts = new List<string>();
if (!string.IsNullOrWhiteSpace(Identity))
parts.Add($"# Identity\n{Identity}");
if (!string.IsNullOrWhiteSpace(Soul))
parts.Add($"# Soul\n{Soul}");
if (!string.IsNullOrWhiteSpace(SystemPrompt))
parts.Add(SystemPrompt);
return string.Join("\n\n", parts);
}
}
[JsonPropertyName("tools")]
public Dictionary<string, Dictionary<string, object?>> Tools { get; set; } = new();
[JsonPropertyName("scheduler")]
public SchedulerConfig? Scheduler { get; set; }
[JsonPropertyName("toolJobs")]
public List<ToolJobConfig> ToolJobs { get; set; } = new();
[JsonPropertyName("loopGuard")]
public LoopGuardConfig LoopGuard { get; set; } = new();
}
public sealed class SchedulerConfig
{
[JsonPropertyName("cron")]
public string Cron { get; set; } = "";
[JsonPropertyName("runOnStart")]
public bool RunOnStart { get; set; }
[JsonPropertyName("taskMessage")]
public string TaskMessage { get; set; } = "Führe deine zugewiesenen Aufgaben aus.";
}
public sealed class LoopGuardConfig
{
[JsonPropertyName("maxSteps")]
public int MaxSteps { get; set; } = 20;
[JsonPropertyName("maxTokens")]
public int MaxTokens { get; set; } = 80_000;
[JsonPropertyName("timeoutSeconds")]
public int TimeoutSeconds { get; set; } = 600;
[JsonPropertyName("maxContextTokens")]
public int MaxContextTokens { get; set; } = 100_000;
[JsonPropertyName("compactionThreshold")]
public double CompactionThreshold { get; set; } = 0.80;
[JsonIgnore]
public TimeSpan Timeout => TimeSpan.FromSeconds(TimeoutSeconds);
}