Resolve Concelier/Excititor merge conflicts

This commit is contained in:
root
2025-10-20 14:19:25 +03:00
2687 changed files with 212646 additions and 85913 deletions

View File

@@ -0,0 +1,4 @@
# StellaOps.Notify.Engine — Agent Charter
## Mission
Deliver rule evaluation, digest, and rendering logic per `docs/ARCHITECTURE_NOTIFY.md`.

View File

@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using StellaOps.Notify.Models;
namespace StellaOps.Notify.Engine;
/// <summary>
/// Contract implemented by Notify channel plug-ins to generate channel-specific test preview payloads.
/// </summary>
public interface INotifyChannelTestProvider
{
/// <summary>
/// Channel type supported by the provider.
/// </summary>
NotifyChannelType ChannelType { get; }
/// <summary>
/// Builds a channel-specific preview for a test-send request.
/// </summary>
Task<ChannelTestPreviewResult> BuildPreviewAsync(ChannelTestPreviewContext context, CancellationToken cancellationToken);
}
/// <summary>
/// Sanitised request payload passed to channel plug-ins when building a preview.
/// </summary>
public sealed record ChannelTestPreviewRequest(
string? TargetOverride,
string? TemplateId,
string? Title,
string? Summary,
string? Body,
string? TextBody,
string? Locale,
IReadOnlyDictionary<string, string> Metadata,
IReadOnlyList<string> Attachments);
/// <summary>
/// Immutable context describing the channel and request for a test preview.
/// </summary>
public sealed record ChannelTestPreviewContext(
string TenantId,
NotifyChannel Channel,
string Target,
ChannelTestPreviewRequest Request,
DateTimeOffset Timestamp,
string TraceId);
/// <summary>
/// Result returned by channel plug-ins for test preview generation.
/// </summary>
public sealed record ChannelTestPreviewResult(
NotifyDeliveryRendered Preview,
IReadOnlyDictionary<string, string>? Metadata);
/// <summary>
/// Exception thrown by plug-ins when preview input is invalid.
/// </summary>
public sealed class ChannelTestPreviewException : Exception
{
public ChannelTestPreviewException(string message)
: base(message)
{
}
}
/// <summary>
/// Shared helpers for channel preview generation.
/// </summary>
public static class ChannelTestPreviewUtilities
{
/// <summary>
/// Computes a lowercase hex SHA-256 body hash for preview payloads.
/// </summary>
public static string ComputeBodyHash(string body)
{
var bytes = Encoding.UTF8.GetBytes(body);
var hash = SHA256.HashData(bytes);
return Convert.ToHexString(hash).ToLowerInvariant();
}
}

View File

@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StellaOps.Notify.Models\StellaOps.Notify.Models.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,8 @@
# Notify Engine Task Board (Sprint 15)
| ID | Status | Owner(s) | Depends on | Description | Exit Criteria |
|----|--------|----------|------------|-------------|---------------|
| NOTIFY-ENGINE-15-301 | TODO | Notify Engine Guild | NOTIFY-MODELS-15-101 | Rules evaluation core: tenant/kind filters, severity/delta gates, VEX gating, throttling, idempotency key generation. | Unit tests cover rule permutations; idempotency keys deterministic; documentation updated. |
| NOTIFY-ENGINE-15-302 | TODO | Notify Engine Guild | NOTIFY-ENGINE-15-301 | Action planner + digest coalescer with window management and dedupe per architecture §4. | Digest windows tested; throttles and digests recorded; metrics counters exposed. |
| NOTIFY-ENGINE-15-303 | TODO | Notify Engine Guild | NOTIFY-ENGINE-15-302 | Template rendering engine (Slack, Teams, Email, Webhook) with helpers and i18n support. | Rendering fixtures validated; helpers documented; deterministic output proven via golden tests. |
| NOTIFY-ENGINE-15-304 | TODO | Notify Engine Guild | NOTIFY-ENGINE-15-303 | Test-send sandbox + preview utilities for WebService. | Preview/test functions validated; sample outputs returned; no state persisted. |