Zyntaxis.Promptr.Abstractions
1.0.1
dotnet add package Zyntaxis.Promptr.Abstractions --version 1.0.1
NuGet\Install-Package Zyntaxis.Promptr.Abstractions -Version 1.0.1
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="Zyntaxis.Promptr.Abstractions" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zyntaxis.Promptr.Abstractions" Version="1.0.1" />
<PackageReference Include="Zyntaxis.Promptr.Abstractions" />
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 Zyntaxis.Promptr.Abstractions --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Zyntaxis.Promptr.Abstractions, 1.0.1"
#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 Zyntaxis.Promptr.Abstractions@1.0.1
#: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=Zyntaxis.Promptr.Abstractions&version=1.0.1
#tool nuget:?package=Zyntaxis.Promptr.Abstractions&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
# Zyntaxis.Promptr.Abstractions
Stable interfaces and DTOs for Promptr plugins. Keep your plugins decoupled from the host with a tiny, versioned contract.
- **Target**: .NET 8
- **Package**: `Zyntaxis.Promptr.Abstractions`
- **ABI policy**: `AssemblyVersion = 1.0.0.0` (pinned). We bump the NuGet `Version` for releases that don’t break ABI.
## Install
```bash
dotnet add package Zyntaxis.Promptr.Abstractions --version 1.0.1
What’s inside
public interface IPromptrPlugin
{
string Id { get; }
string Purpose { get; }
string Category { get; } // e.g. "Support/Freshdesk"
string[] Tags { get; }
Version Version { get; }
IEnumerable<ToolSpec> Tools(); // small specs only
Task<InvokeResult> InvokeAsync(string toolName, JsonElement args, CancellationToken ct);
string Manual(); // human docs (not sent to model by default)
void Initialize(IPluginContext ctx);
}
public interface IPluginContext
{
ILogger Logger { get; }
IHttpClientFactory Http { get; }
ISecretProvider Secrets { get; }
ICache Cache { get; }
string DataDir { get; }
}
public sealed record ToolSpec(string Name, string Summary, string JsonSchema);
public sealed record InvokeResult(JsonElement Data, string? HumanSummary = null);
Minimal plugin skeleton
public sealed class MyPlugin : IPromptrPlugin
{
private IPluginContext _ctx = default!;
public string Id => "myplugin";
public string Purpose => "Does a useful thing fast.";
public string Category => "Utilities";
public string[] Tags => new[] { "utils", "demo" };
public Version Version => new(1,0,0);
public void Initialize(IPluginContext ctx) => _ctx = ctx;
public IEnumerable<ToolSpec> Tools() => new[]
{
new ToolSpec(
"Ping",
"Returns pong and the input text.",
"{\"type\":\"object\",\"properties\":{\"text\":{\"type\":\"string\"}},\"required\":[\"text\"]}")
};
public async Task<InvokeResult> InvokeAsync(string toolName, JsonElement args, CancellationToken ct)
{
if (toolName != "Ping") throw new ArgumentOutOfRangeException(nameof(toolName));
var text = args.GetProperty("text").GetString();
var result = System.Text.Json.JsonSerializer.SerializeToElement(new { reply = $"pong: {text}" });
return new InvokeResult(result, $"pong: {text}");
}
public string Manual() => "Tools:\n- Ping(text:string) → { reply:string }";
}
Host note
Make sure the host and plugins reference the same Abstractions package version to avoid type identity issues (your AssemblyLoadContext should resolve Abstractions to the host copy).
License
MIT
---
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Zyntaxis.Promptr.Abstractions:
| Package | Downloads |
|---|---|
|
Zyntaxis.Promptr.SDK
Helpers for Promptr plugins (schemas, arg parsing, results) |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 337 | 11/12/2025 |