Initial WebhookServer implementation
Add the .NET 8 solution scaffolded against PLAN.md. Three projects share WebhookServer.Core (models, auth, execution, storage, IPC, callbacks) and WebhookServer.Service hosts an embedded Kestrel listener plus the named-pipe admin server. WebhookServer.Gui is a thin MVVM client over the pipe. Includes 25 unit tests covering HMAC verification, bearer auth, IP allowlist parsing, arg-template rendering, DPAPI round-trip, and the encrypt-on-save config store. Install/uninstall PowerShell scripts default to LocalSystem and accept a domain user or gMSA via -ServiceAccount. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace WebhookServer.Core.Callbacks;
|
||||
|
||||
/// <summary>
|
||||
/// JSON body POSTed to a configured outbound callback URL.
|
||||
/// </summary>
|
||||
public sealed class CallbackPayload
|
||||
{
|
||||
[JsonPropertyName("runId")] public required string RunId { get; init; }
|
||||
[JsonPropertyName("endpoint")] public required string Endpoint { get; init; }
|
||||
[JsonPropertyName("startedAt")] public required DateTimeOffset StartedAt { get; init; }
|
||||
[JsonPropertyName("completedAt")] public required DateTimeOffset CompletedAt { get; init; }
|
||||
[JsonPropertyName("durationMs")] public required long DurationMs { get; init; }
|
||||
[JsonPropertyName("exitCode")] public required int ExitCode { get; init; }
|
||||
[JsonPropertyName("succeeded")] public required bool Succeeded { get; init; }
|
||||
[JsonPropertyName("timedOut")] public required bool TimedOut { get; init; }
|
||||
[JsonPropertyName("stdout")] public string? Stdout { get; init; }
|
||||
[JsonPropertyName("stderr")] public string? Stderr { get; init; }
|
||||
[JsonPropertyName("stdoutTruncated")] public bool StdoutTruncated { get; init; }
|
||||
[JsonPropertyName("stderrTruncated")] public bool StderrTruncated { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user