Sylin.Koan.Data.Analytics 1.0.46

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

Sylin.Koan.Data.Analytics

Declared analytics for Koan entities: name a question once — a measure, an optional grouping, an optional filter, a row cap — and it becomes part of the application's shared vocabulary: runnable from code, listed over HTTP at /analytics/catalog (with Koan.Data.Analytics.Web), and askable by agents through the analytics.list_questions / analytics.ask MCP tools.

Declare

public sealed class Todo : Entity<Todo>
{
    static Todo()
    {
        // On-demand: computed where the data lives, bounded, labeled live.
        Analytics.Question<Todo, Guid>("open-count",
            q => q.Where(t => !t.Done).Count());

        // Materialized: refreshed on a cadence, served within the declared tolerance.
        Analytics.Question<Todo, Guid>("count-by-priority",
            q => q.By(t => t.Priority).Count()
                 .Materialize(r => r.Every(TimeSpan.FromHours(6))
                                    .ServeWithin(TimeSpan.FromMinutes(15))
                                    .BackfillOnRead()));
    }
}

Run

var answer = await Analytics.Of<Todo, Guid>().Run("count-by-priority");
answer.Engine;      // which store answered
answer.Age;         // "live", or the materialization's age (e.g. "132s")
answer.ServedFrom;  // "materialization" | "live" — never silent staleness
answer.Completion;  // Complete | RowCapped
answer.Rows;        // the values

Unknown names refuse with the catalog — and are recorded in the request-a-recipe loop, so the gap between what is declared and what is asked becomes visible instead of silent.

Projections

A materialized question's answer is stored in the elected engine (per-host DuckDB file at .koan/analytics/Koan.duckdb), refreshed by cadence, by boot catch-up, by read-backfill, or through the trigger door — POST /analytics/refresh/{name} and question.RefreshAsync(...). Materialized rows are served through the read-model door: GET /analytics/{name}/rows?limit=&offset=&format=csv, with equality filters on declared columns. On-demand questions have no rows — the door refuses and points at Run.

The materialization is per-host by design: the engine is single-writer per file, and a derived store that rebuilds from the record store wants exactly that topology.

Honest envelope

  • On-demand asks compute where the data lives — the entity's relational record store composes the aggregate in its own dialect.
  • Questions are parameter-free in this grammar version; document-expression mapped indexes are governed by each store's declared capabilities.
  • Only direct property expressions are expressible; everything else refuses with a corrective.
  • Cron spelling arrives with the scheduler pillar; refresh cadence is Every(TimeSpan) today.

Decision authority: DATA-0123.

Install

dotnet add package Sylin.Koan.Data.Analytics

What it adds

Declared analytics for Koan entities: named, bounded, self-describing questions with a catalog that humans and agents share. Engine acceleration is elected from a capable connector (DuckDB first, DATA-0123).

Limits

Configuration decides participation; unsupported requests reject before provider work with a named capability and a correction. Provider-specific limits live in the package's TECHNICAL.md.

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 (3)

Showing the top 3 NuGet packages that depend on Sylin.Koan.Data.Analytics:

Package Downloads
Sylin.Koan.Data.Connector.Sqlite

Durable embedded SQLite provider for Koan Entity data with zero-config local storage, schema management, queries, and bounded paging.

Sylin.Koan.Data.Analytics.Web

The analytics catalog and ask surface over HTTP and MCP: one vocabulary served to browsers, services, and agents.

Sylin.Koan.Data.Connector.DuckDb

Embedded DuckDB provider for Koan Entity data: an in-process analytical engine for aggregation, bulk load, and lakehouse file queries, with full Entity CRUD over local storage.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.46 110 9/13/2026
1.0.43 137 9/12/2026
1.0.40 112 9/12/2026
1.0.38 126 9/10/2026
1.0.34 122 9/10/2026
1.0.30 124 9/9/2026
1.0.26 110 9/9/2026
1.0.23 129 9/9/2026
1.0.18 125 9/9/2026
1.0.16 127 9/9/2026
1.0.11 131 9/5/2026
1.0.10 142 8/30/2026
1.0.9 127 8/30/2026
1.0.7 124 8/28/2026
1.0.6 122 8/28/2026
1.0.4 128 8/28/2026
1.0.2 121 8/28/2026
1.0.0 120 8/28/2026