SharpMUSH.Library
1.0.0
dotnet add package SharpMUSH.Library --version 1.0.0
NuGet\Install-Package SharpMUSH.Library -Version 1.0.0
<PackageReference Include="SharpMUSH.Library" Version="1.0.0" />
<PackageVersion Include="SharpMUSH.Library" Version="1.0.0" />
<PackageReference Include="SharpMUSH.Library" />
paket add SharpMUSH.Library --version 1.0.0
#r "nuget: SharpMUSH.Library, 1.0.0"
#:package SharpMUSH.Library@1.0.0
#addin nuget:?package=SharpMUSH.Library&version=1.0.0
#tool nuget:?package=SharpMUSH.Library&version=1.0.0
SharpMUSH.Library — Plugin Contract Package
This package is the contract surface external SharpMUSH plugins build against. A plugin in a
separate repository adds a <PackageReference Include="SharpMUSH.Library" />, writes a
[SharpPlugin] sealed class : PluginBase entry type, decorates static methods with [SharpCommand] /
[SharpFunction], and ships the resulting DLL (plus a plugin.json) to a SharpMUSH server's plugin
directory.
Interim packaging note. Today the whole
SharpMUSH.Libraryassembly is shipped as the contract package rather than a slimmerSharpMUSH.Plugin.Abstractions.CommandDefinition/FunctionDefinition(required byPluginBase/ICommandSource/IFunctionSource) referenceIMUSHCodeParser, which transitively pulls in most ofSharpMUSH.Library(Services, Models, DiscriminatedUnions). Carving those out would relocate the bulk of the Library into the "abstractions" assembly and split the dynamic loader's shared-type set across two assemblies. Shipping the Library whole keeps a single shared contract assembly, which is exactly what the loader'sPluginLoaderService.SharedContractTypesrequires. See theTODO slim abstractionsnote inSharpMUSH.Library.csproj.
What's in the contract surface
Identity & lifecycle
IPlugin,PluginBase,[SharpPlugin](SharpMUSH.Library.Attributes.SharpPluginAttribute)PluginManifest,PluginContractVersion
Command / function contribution
[SharpCommand],[SharpFunction]ICommandSource/IFunctionSource,CommandDefinition/FunctionDefinitionIMUSHCodeParser,CallState,Option<…>(the types command/function bodies use)
Phase 2a contribution surfaces
IServiceRegistrar,IMigrationSource,IFlagSource,IBridgeSubscriptionSource,PluginFlag
Phase 2b engine-extension hooks
ICommandInterceptor,IConnectionHook,IObjectLifecycleHook
Contract-version alignment
The package Version is aligned to PluginContractVersion.Current (currently 1.0.0). A managed
package's binaries.min_server_version is checked against this value at load time, so a plugin built
against a newer contract is refused by an older server rather than failing obscurely. When the plugin
contract surface changes, bump both PluginContractVersion.Current and the package <Version>
together.
How an external plugin references it
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SharpMUSH.Library" Version="1.0.0">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="SharpMUSH.Implementation.Generated" Version="1.0.0"
PrivateAssets="all" />
</ItemGroup>
</Project>
using SharpMUSH.Library.Attributes;
using SharpMUSH.Library.DiscriminatedUnions;
using SharpMUSH.Library.ParserInterfaces;
using SharpMUSH.Library.Plugins;
[SharpPlugin]
public sealed class MyPlugin : PluginBase
{
public override string Id => "com.example.my-plugin";
public override string Version => "1.0.0";
}
public static class MyCommands
{
[SharpCommand(Name = "@HELLO")]
public static ValueTask<Option<CallState>> Hello(IMUSHCodeParser parser, SharpCommandAttribute _2)
=> /* ... */;
}
Ship the built plugin DLL together with a plugin.json (id / version / dependencies / priority /
min server version) into the server's plugin directory. See docs/guides/writing-a-plugin.md in the
SharpMUSH repository for the full walkthrough.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- DotNext (>= 6.2.0)
- DotNext.Threading (>= 6.2.0)
- Markdig (>= 0.40.0)
- Mediator.Abstractions (>= 3.0.2)
- Microsoft.Data.SqlClient (>= 7.0.1)
- Microsoft.Data.Sqlite (>= 10.0.7)
- Microsoft.Extensions.Caching.Memory (>= 10.0.7)
- Microsoft.Extensions.Identity.Core (>= 10.0.7)
- morelinq (>= 4.4.0)
- MySqlConnector (>= 2.5.0)
- NATS.Net (>= 2.7.3)
- NaturalSort.Extension (>= 4.4.1)
- Npgsql (>= 10.0.2)
- OneOf (>= 3.0.271)
- OneOf.SourceGenerator (>= 3.0.271)
- OpenTelemetry.Api (>= 1.15.3)
- Quartz.Lambda (>= 1.0.5)
- Serilog (>= 4.3.1)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Sinks.Console (>= 6.1.1)
- SQLitePCLRaw.bundle_e_sqlite3 (>= 3.0.3)
- System.Data.SqlClient (>= 4.9.1)
- TelnetNegotiationCore (>= 2.5.0)
- YamlDotNet (>= 16.3.0)
- ZiggyCreatures.FusionCache (>= 2.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 141 | 6/20/2026 |