Scry.Server 0.1.0

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

Scry.Server

Server-side execution for Scry. Validates an incoming query AST against the allow-list, rebinds it to the real EF Core entity types, applies row-level policies, executes against a DbContext, and returns projected rows.

<a id='snippet-serverRegistration'></a>

services
    .AddScry<SampleContext>(_ =>
    {
        // Holiday is a [QueryablePoco]: it has no table, so the server supplies its rows. Every
        // [QueryablePoco] type must be registered here or AddScry throws at startup.
        _.AddPocoSource(_ => Holiday.Seed());
        // Department.Handbook and Employee.Photo are [Attachment]s, and one exposed without a
        // check is a startup failure. Registered here rather than by [AttachmentWith] because
        // the model project references the annotations alone and has no server type to name.
        _.AddAttachmentPolicy<Department, HandbookPolicy>();
        _.AddAttachmentPolicy<Employee, PhotoPolicy>();
        _.MaxPageSize = 200;

        // A row policy whose decision is too slow to run per row in SQL, so it runs in C# and
        // the server remembers what it answered. Revision is what tells it a row has changed
        // and needs deciding again — see /docs/policies.md and the /permissions page.
        _.AddCachedPolicy<Order, long, RegionAccessPolicy>(_ => _.Revision);

        // Repeat a query while nothing has been written and the answer is a 304 rather than a
        // re-execution. Optional, and off until a freshness source says how to tell — see
        // /docs/caching.md.
        _.UseDeltaFreshness<SampleContext>();

        // What a cached response belongs to. This server has sources whose answers depend on
        // who asked — the row policy above, and Department.Handbook's attachment check — and
        // MapScry refuses to start without this. The sample has no sign-in, so the caller
        // half is a constant; a real app returns its tenant or its principal, and a client
        // signing in as someone else is then never handed the previous one's rows.
        //
        // The grants version is the other half, and is the part worth copying. A response
        // varies by what the caller is allowed to see, and QueryFreshness only watches the
        // database — so a grant changing outside it would move nothing, and a cache holding
        // the old rows would go on answering with rows the caller has since lost.
        _.CacheScope = _ => $"sample-{_.RequestServices.GetRequiredService<RegionGrants>().Version}";

        // Live queries: the /live pages. Off until a server says how many it will hold open,
        // which is also what maps the route — see /docs/live-queries.md.
        _.MaxSubscriptions = 100;

        // The interceptor above reports this server's own saves, at once and by entity. This
        // watches the database's change marker for everything it cannot see: a bulk update,
        // another node, a script run by hand.
        _.UseDeltaChanges<SampleContext>();

        // Commands: the /commands page and the /live pages' Reprice. Off until a server says
        // how many it will have in flight, which is also what maps the routes — see
        // /docs/commands.md.
        _.UseSampleCommands();

        // An AI agent's way in: the schema, queries and commands over MCP, at /mcp. Off
        // until a server says what an agent may do — see /docs/mcp.md.
        _.Mcp = ScryMcpAccess.ReadWrite;
    });

<sup><a href='/samples/Sample.WebServer/Program.cs#L59-L117' title='Snippet source file'>snippet source</a> | <a href='#snippet-serverRegistration' title='Start of snippet'>anchor</a></sup>

AddPocoSource supplies the rows for a [QueryablePoco] type — see POCO sources.

<a id='snippet-mapScry'></a>

app.MapScry("/api/query");

<sup><a href='/samples/Sample.WebServer/Program.cs#L138-L140' title='Snippet source file'>snippet source</a> | <a href='#snippet-mapScry' title='Start of snippet'>anchor</a></sup>

Docs: Server · Row policies · Security model

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

Showing the top 5 NuGet packages that depend on Scry.Server:

Package Downloads
Scry.Server.Explorer

An opt-in, browser-Roslyn query explorer (GraphiQL-style) for the Scry server API: write LINQ with IntelliSense, inspect the wire request, and run it.

Scry.Server.Delta

Answers a repeated Scry query with 304 Not Modified while nothing has been written, by reading the database's own change marker through Delta.

Scry.Server.MassTransit

Carries Scry commands over MassTransit: a command a client sends is published to the consumer that handles it, and its outcome comes back to the client when the consumer is done.

Scry.Server.NServiceBus

Scry over NServiceBus: change notifications, so what a message handler in another process saves re-asks the live queries that read it, and commands, carried to the workers that handle them and answered when they reply.

Scry.Server.SignalR

Serves Scry queries, streams and live queries over a SignalR hub, so many live queries share one connection.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 52 11/16/2026
0.2.0 227 11/7/2026
0.1.0 223 11/3/2026
0.1.0-beta.15 120 10/28/2026
0.1.0-beta.14 119 10/21/2026
0.1.0-beta.13 127 10/7/2026
0.1.0-beta.12 115 10/1/2026
0.1.0-beta.11 96 9/30/2026
0.1.0-beta.10 107 9/24/2026
0.1.0-beta.9 89 9/8/2026
0.1.0-beta.7 90 9/4/2026
0.1.0-beta.6 86 9/4/2026
0.1.0-beta.5 95 8/30/2026
0.1.0-beta.4 89 8/15/2026
0.1.0-beta.3 90 8/2/2026
0.1.0-beta.2 88 7/31/2026
0.1.0-beta.1 84 7/26/2026