Mud.AI.Abstractions 1.0.2

dotnet add package Mud.AI.Abstractions --version 1.0.2
                    
NuGet\Install-Package Mud.AI.Abstractions -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mud.AI.Abstractions" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mud.AI.Abstractions" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Mud.AI.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Mud.AI.Abstractions --version 1.0.2
                    
#r "nuget: Mud.AI.Abstractions, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Mud.AI.Abstractions@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Mud.AI.Abstractions&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Mud.AI.Abstractions&version=1.0.2
                    
Install as a Cake Tool

Mud.AI

Mud.AI 是 Mud Studio 的中立(产品无关)AI 运行期套件,独立于任何具体 IM / 协作平台发布。 本仓由飞书仓(原 MudFeishu)的 Mud.AI.* 系列按「P3 上游化」独立而来: 契约(Abstractions)→ 运行期(Agent)→ 编译期引擎(Generator) 三层单向依赖, 产品侧(如 Mud.Feishu.AI)只经 NuGet 包消费,显式钉版,禁止浮动。

仓库结构

Mud.AI/
├── Mud.AI.Abstractions/      # 零依赖纯契约工程(端口 / 特性 / 剖面)
├── Mud.AI.Agent/             # 中立运行期(机制实现,net8.0+ 原生 AOT 兼容)
├── Mud.AI.Generator/         # 工具面源生成引擎(Roslyn Analyzer 形态)
├── Tests/
│   ├── Mud.AI.Agent.Tests/       # 运行期测试 + 契约守卫(ContractGuards / Golden)
│   └── Mud.AI.Generator.Tests/   # 引擎测试(ToolSurface / Guards / Infrastructure)
├── scripts/                  # 构建门禁与注释预算账本
├── documents/                # 架构决策记录(ADR)与过程文档
├── Mud.AI.slnx               # 解决方案
├── Directory.Build.props     # 仓级构建约定(TFM / AOT / 版本 / 打包元数据)
└── LICENSE-MIT

包一览

包 目标框架 说明
Mud.AI.Abstractions netstandard2.0;net6.0;net8.0;net10.0 平台无关端口与工具面契约:会话端口 / 通道抽象 / 审批状态机接口 / 声明契约族 / 工具面引导契约。零依赖纯契约工程。
Mud.AI.Agent netstandard2.0;net6.0;net8.0;net10.0 中立运行期:工具执行骨架、会话回合管线(11 阶段状态机)、授权执行链尾两段、HITL 审批闭环、RAG 三段机制、流式通道降级链。net8.0+ 原生 AOT 兼容。
Mud.AI.Generator netstandard2.0(Roslyn 组件) 工具面源生成引擎:把 [SdkToolProfile] 剖面驱动的工具特性接口编译为模型可调用工具的全部编译期产物(Schema / Args / 域注册器 / DI 装配 / Guidance / 能力目录)。

各包 README 含完整的命名空间布局、类型清单、机制导览与设计不变量。

依赖方向(单向,无环)

(消费方,如 Mud.Feishu.AI)──(NuGet 包)──▶ Mud.AI.Agent ──▶ Mud.AI.Abstractions
                              Mud.AI.Generator(作为 Analyzer,被产品侧挂载)

本仓零 Mud.Feishu* 依赖;产品侧对 Mud.AI.* 只经包引用(显式钉版,禁止浮动)。 Mud.AI.Agent 对 Microsoft.Agents.AI(MAF)的直引为白名单内收敛式放宽,且不得因此获得任何 Mud.Feishu* 引用——上述纪律由 Tests/Mud.AI.Agent.Tests/ContractGuards/ 机械锁定。

契约演进军规

  1. 主端口冻结,新能力走新接口:给已分发端口加成员即 breaking 全部既有实现——新能力一律"新接口继承旧端口 + 调用点 as 空安全消费"。首个样板:IAgentToolTelemetry : IAgentTelemetry(未实现新接口的旧实现零埋点零异常)。
  2. 加法优先:新重载 / 新可选参数 / 新记录尾参;确需移除的走 [Obsolete] 警告 → 次大版本移除的两段式,并在 CHANGELOG 登记迁移路径。
  3. netstandard2.0 无默认接口成员(DIM):能力拆分用接口继承,不用 DIM;ns2.0 目标上的新 API 必须在该 TFM 可编译、可调用。
  4. 产包必递增版本:NuGet 同版本覆盖不使下游缓存失效(ADR-0005);破坏性 diff 须附 CHANGELOG 条目与迁移说明。
  5. 注释预算只下压:新增注释写"现在必须怎样"与"读代码读不出的陷阱",不写批次编号与过程叙事;冻结台账见 documents/comment-budget-baseline.json,重固化走 scripts/comment-audit.ps1 -UpdateBaseline。

构建与测试

dotnet build Mud.AI.slnx -c Release
dotnet test  Tests/Mud.AI.Agent.Tests
dotnet test  Tests/Mud.AI.Generator.Tests
dotnet pack  Mud.AI.slnx -c Release
  • 统一 C# 13.0 / Nullable enable / ImplicitUsings enable;XML 文档注释进包(GenerateDocumentationFile)。
  • 版本漂移防护:NU1603 升级为错误(声明版本与解析版本不一致即失败)。
  • AOT:net8.0+ TFM 启用 IsAotCompatible / EnableAotAnalyzer / EnableTrimAnalyzer(TrimMode=full); ns2.0 / net6.0 按 TFM 精确豁免。可选 -p:AotStrictMode=true 将 IL2xxx/IL3xxx 升级为错误。
  • 测试除行为用例外含契约守卫与中立化 golden 快照(NeutralizationGoldenTests),机制归属纪律可机械断言。

门禁

pwsh ./scripts/verify-build.ps1            # 标准档
pwsh ./scripts/verify-build.ps1 -Full      # 完整档(Timing 测试 + strict format)
pwsh ./scripts/comment-audit.ps1           # 注释预算账本

文档

许可证

MIT,见 LICENSE-MIT。

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Mud.AI.Abstractions:

Package Downloads
Mud.AI.Agent

Mud.AI 运行期:工具执行骨架区(ToolExecutor / ToolPagination / ToolDryRun / ToolResult / ToolApiOutcome / ToolResultPipeline / ToolErrorFactory / ToolErrorText / ToolErrorClassifier 等,v2.3 自 Mud.Feishu.AI.Tools 执行器层中立化上移——决策⑥「授权执行链尾两段:强类型直连 + 结果裁剪/错误回填」的承载);会话管线 / 授权执行链骨架实现随 P1-H 移植。net8.0+ 原生 AOT 兼容。

Mud.Feishu.AI

Mud.Feishu AI-Native Agent 运行时:基于 Microsoft Agent Framework 的会话管理、模型接入与飞书工具执行链底座;自 R-9 起同时承载飞书 Agent 集成面(流式消息通道、会话事件处理器、Aily 托管知识问答 RAG-A),并因此需要 Mud.Feishu 客户端与 Mud.Feishu.DataModels 程序集。net8.0+ 原生 AOT 兼容。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 29 10/21/2026
1.0.1 238 10/17/2026
1.0.0 98 10/16/2026