HoneyDrunk.Operator.Data 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package HoneyDrunk.Operator.Data --version 0.2.0
                    
NuGet\Install-Package HoneyDrunk.Operator.Data -Version 0.2.0
                    
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="HoneyDrunk.Operator.Data" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HoneyDrunk.Operator.Data" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="HoneyDrunk.Operator.Data" />
                    
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 HoneyDrunk.Operator.Data --version 0.2.0
                    
#r "nuget: HoneyDrunk.Operator.Data, 0.2.0"
                    
#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 HoneyDrunk.Operator.Data@0.2.0
                    
#: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=HoneyDrunk.Operator.Data&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=HoneyDrunk.Operator.Data&version=0.2.0
                    
Install as a Cake Tool

HoneyDrunk.Operator.Data

Durable storage for HoneyDrunk.Operator, over HoneyDrunk.Data's Entity Framework layer. With it, approvals and their decisions, manual pauses, and budget spend survive a restart and are shared by every host that uses the same database.

services.AddHoneyDrunkOperator();
services.AddOperatorDataStore(options => options.UseSqlServer(connectionString));

AddOperatorDataStore replaces Operator's in-memory store whichever order it is called in.

The package ships no migrations; the host creates the operator schema. Database.EnsureCreated() works only on a database with no tables yet. On a database shared with other tables, add migrations for OperatorDbContext in the host's own project (set MigrationsAssembly in the options) and apply them at deployment.

Table Holds
operator.Approvals Each request, its context, and its current decision
operator.Pauses Who paused each agent, why, and since when
operator.Spend Spend per agent and budget window
operator.PendingAudits Audit entries saved with each change and not yet delivered to the audit sinks

Times are stored as UTC ticks and money as whole micro-units (one millionth of the currency unit, each charge rounded up so none is lost), so comparisons and sums run in SQL on any provider. Decisions use compare-and-set and spend uses a single update statement, so both stay correct when several hosts share the database. Each change is saved with its audit entries in one transaction, and a charge that reaches its budget is saved with its pause, so a change is never kept without its evidence or its stop. Each outbox entry is claimed by one host at a time. A delivered entry is marked, kept for a day as the proof that its change committed, then removed. Writes run under the provider's execution strategy; when a commit's reply is lost and the strategy retries, a change whose audit entry is already stored is reported as done instead of being applied twice.

Key columns use the database's default collation. On SQL Server that usually ignores case, so agent:Bot and agent:bot are the same pause there, while the in-memory store and SQLite compare exactly. Keep approval ids and agent ids in one case, or give the key columns a binary collation in a migration.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.3.0 177 11/11/2026
0.2.0 90 11/11/2026