Rulealize.Plugin.State 1.0.1

dotnet add package Rulealize.Plugin.State --version 1.0.1
                    
NuGet\Install-Package Rulealize.Plugin.State -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="Rulealize.Plugin.State" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rulealize.Plugin.State" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Rulealize.Plugin.State" />
                    
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 Rulealize.Plugin.State --version 1.0.1
                    
#r "nuget: Rulealize.Plugin.State, 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 Rulealize.Plugin.State@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=Rulealize.Plugin.State&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Rulealize.Plugin.State&version=1.0.1
                    
Install as a Cake Tool

Rulealize.Plugin.State

Reading and writing the state of a Rulealize rule set.

Plugin id Rulealize.Plugin.State
Namespace state
Reserved prefix $
Depends on Rulealize.Abstraction
Specification doc/specification.md

state.get is an expression, with "$path" as its shorthand; state.set and state.update are effects. Reads and writes live together because they share one path syntax — split across two plugins, the specification of what a path means would live in two places, and neither half would be much use alone.

Paths are literal, dot-separated field names resolved against state.schema when the rule set is built, and that is the decision everything else here follows from. Every path can be checked to exist before anything runs, which fields an input writes is readable from the document, and schema validation never has to be deferred to evaluation time.

The seam that matters: there is no "board.d3". A board is one opaque value as far as this plugin is concerned, and its squares are read with grid.at and written with grid.set. If paths could reach inside a board, this plugin would have to know whether boards are sparse or dense and what notation their coordinates use — and the grid would stop being replaceable.

How another plugin writes through this one

state.get implements IStateLocation, the contract in Rulealize.Abstraction that carries a resolved StatePath.

That is how grid.set, handed "$board" as its target, finds out which field to write back to. It cannot inspect the node — it does not reference this assembly — but it can ask for the interface:

ExpressionNode target = context.RequireExpression("target");
if (target is not IStateLocation location)
{
    throw context.Error("target", "must denote a state field.");
}

Neither plugin learns anything about the other.

Building

dotnet build. Rulealize.Abstraction restores from nuget.org like any other package, so this repository builds on its own.

License

Apache-2.0.

Product 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. 
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
1.0.1 113 9/5/2026
1.0.0 290 8/11/2026