feat: add ERP agent pet bridge and startup guide

This commit is contained in:
郎速科技
2026-08-14 14:28:28 +08:00
parent a803070819
commit 4c08f4c948
252 changed files with 134752 additions and 72 deletions
@@ -0,0 +1,28 @@
using System;
using System.Text;
namespace Lskj.AgentBridge
{
/// <summary>
/// The bridge protocol is UTF-8 without replacement fallbacks. Silently
/// normalizing malformed bytes or unmatched UTF-16 surrogates could change
/// identifiers or business text after a caller calculated its binding.
/// </summary>
internal static class BridgeUtf8Codec
{
private static readonly Encoding StrictUtf8 =
new UTF8Encoding(false, true);
internal static string Decode(byte[] source)
{
if (source == null) throw new ArgumentNullException("source");
return StrictUtf8.GetString(source);
}
internal static byte[] Encode(string source)
{
if (source == null) throw new ArgumentNullException("source");
return StrictUtf8.GetBytes(source);
}
}
}