AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
A Blazor State management library by TimeWarp.
翻譯準備中
開發工具C# · HTMLGitHub @TimeWarpEngineering自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
正在載入完整 README。 以下為已儲存的摘錄。
TimeWarp.State (previously known as Blazor-State) is a fully asynchronous state management library for Blazor applications, leveraging the res pipeline to implement the Flux pattern. It handles both Reducers and Effects consistently using async Handlers, simplifying the management of asynchronous operations throughout your app.檢視完整 README ↗TimeWarp.State (previously known as Blazor-State) is a fully asynchronous state management library. The core package has no Blazor dependency, so console and other non-UI hosts can dispatch actions through the same store. Blazor components, JavaScript interop, and render subscriptions are in TimeWarp.State.Blazor. It handles both Reducers and Effects consistently using async Handlers.
By utilizing the TimeWarp.Mediator pipeline, TimeWarp.State enables a flexible, middleware-driven architecture for managing state, similar to the request-processing pipeline in ASP.NET. This approach allows developers to inject custom behaviors, such as logging, validation, and caching, directly into the state management flow.
Hosts consume TimeWarp.Mediator 15.0.0-beta.2 (TimeWarp.Mediator and, on the host, TimeWarp.Mediator.Generators) via generated AddGeneratedMediator<ClientPipeline>() / named pipelines — not MediatR and not reflection AddMediator(). Import TimeWarp.Mediator.Generated (or TimeWarpMediatorNamespace); the extension is internal there, and implicit usings do not include it.
In addition to the core library, we offer TimeWarp.State.Blazor (components, JavaScript interop, render subscriptions), TimeWarp.State.Plus (routing, persistence, action tracking; depends on TimeWarp.State.Blazor; package id unchanged), and TimeWarp.State.Telemetry (OpenTelemetry action spans for the Aspire dashboard or any OTel backend). TimeWarp DevTools is a dev-only Blazor inspector (AddTimeWarpStateDevTools()) on top of those spans. It is the action log, state tree, and diff. It is not a production dependency. The console sample dispatches an action without Blazor. The persistence sample shows session storage and local storage with [PersistentState]. The render control sample shows ShouldRender, parameter checks, and RegisterRenderTrigger. The telemetry sample wires the DevTools app into Aspire, including the WebAssembly counter.
If you find this project useful, please give it a star. Thanks!
I recommend the state and action handler sample for a step-by-step guide to building a Blazor app with TimeWarp.State. The published docs are at timewarpengineering.github.io/timewarp-state.
See full documentation.
dotnet add package TimeWarp.State
dotnet add package TimeWarp.State.Blazor
dotnet add package TimeWarp.State.Plus
dotnet add package TimeWarp.State.Telemetry
Blazor hosts call AddTimeWarpState and AddTimeWarpStateBlazor. Console hosts call AddTimeWarpState only. See Migrate to 12.0.0-beta.10.
Check out the latest NuGet packages on the TimeWarp Enterprises NuGet page.
JavaScript can dispatch actions with timeWarpState.DispatchRequest(name, request). It is opt-in: allow each action explicitly, everything else is rejected.
builder.Services.AddJavaScriptDispatch(b => b.Allow<CounterState.IncrementCountActionSet.Action>());
See Enable JavaScript interop.
Mark user-facing actions with [CatalogAction] to enumerate and execute them at runtime, for example from a Ctrl-K command palette or as agent tools:
public static class AddPasskeyActionSet
{
[CatalogAction(Description = "Add a passkey to the signed-in account.", Permissions = ["credentials.write"])]
public sealed class Action : IAction
{
public Action(string label) { Label = label; }
public string Label { get; }
}
}
builder.Services.AddActionCatalog(typeof(AssemblyMarker).Assembly);
ActionCatalogEntry entry = actionCatalog.Find("Credentials.AddPasskey")!;
await entry.Execute(store, ["Laptop"]);
The source generator emits a per-assembly registry with name, description, permissions, visibility, parameters and input schema, plus a reflection-free Execute. It is opt-in: unmarked actions are never cataloged. Permissions are opaque ids that the consumer enforces; [TrackAction] (busy indicator) is unrelated. See Action catalog.
View the Release Notes for detailed information on each release.
This project is licensed under the Unlicense.
Your contributions are welcome! Before starting any work, please open a discussion.
Help with the documentation is also greatly appreciated.
If you have an issue and don't receive a timely response, feel free to reach out on our Discord server.