feat: record who created join codes and who added each node [CI]

This commit is contained in:
justme committed 2026-10-07 22:12:15 +08:00
1 parent 6385c1b9a3
commit 359313a57b
19 files changed
+95 -37

No files matched your search

@@ -29,7 +29,8 @@ public sealed record AgentRecord(
bool PublicHostManual = false,
bool Ipv6HostManual = false,
IReadOnlyList<string>? ReportedAddresses = null,
byte[]? TlsPublicKey = null);
byte[]? TlsPublicKey = null,
string? AddedBy = null);
/// <summary>管理员可以修改的字段(merge-patch 语义:为 null 的字段不改)。</summary>
public sealed class AgentPatch
@@ -76,10 +77,11 @@ public sealed record JoinTokenInfo(
long ExpiresAtMs,
long? RevokedAtMs,
long CreatedAtMs,
string Kind = "");
string Kind = "",
string? CreatedBy = null);
/// <summary>
/// <see cref="PublicKey"/> 是连 Backend 的身份公钥,<see cref="PeerPublicKey"/> 是对等面(连 Agent)的公钥,两把是节点自己生成的独立密钥;
/// Agent 的 <c>peers</c> 里放的是后者。
/// </summary>
public sealed record ProbeRecord(string Id, string Name, byte[] PublicKey, long CreatedAtMs, long? RevokedAtMs, string? Ipv6DiagnosticsJson = null, byte[]? PeerPublicKey = null);
public sealed record ProbeRecord(string Id, string Name, byte[] PublicKey, long CreatedAtMs, long? RevokedAtMs, string? Ipv6DiagnosticsJson = null, byte[]? PeerPublicKey = null, string? AddedBy = null);