PollySdk.Storage.Runtime
0.2.8
dotnet add package PollySdk.Storage.Runtime --version 0.2.8
NuGet\Install-Package PollySdk.Storage.Runtime -Version 0.2.8
<PackageReference Include="PollySdk.Storage.Runtime" Version="0.2.8" />
<PackageVersion Include="PollySdk.Storage.Runtime" Version="0.2.8" />
<PackageReference Include="PollySdk.Storage.Runtime" />
paket add PollySdk.Storage.Runtime --version 0.2.8
#r "nuget: PollySdk.Storage.Runtime, 0.2.8"
#:package PollySdk.Storage.Runtime@0.2.8
#addin nuget:?package=PollySdk.Storage.Runtime&version=0.2.8
#tool nuget:?package=PollySdk.Storage.Runtime&version=0.2.8
PollySdk Agent Framework packages
PollySdk is a .NET 10 Agent Framework with independent AI, Storage, and AgentFramework runtime foundations, provider-isolated implementations, and one complete ASP.NET Core composition. Choose the highest-level package that matches the application, then add only the optional capabilities it uses.
Choose an entry point
The 0.2.1 cohort updates the frontend and .NET dependencies to current stable
versions. Frontend assets include MSAL 5 and @lucide/vue; the previous
lucide-vue-next package is no longer used. TypeScript 7 retains the existing
gradual JavaScript checking policy (checkJs: true, strict: false).
Hosts remain responsible for their own authentication and deployment packages.
The 0.2.2 cohort also explicitly disables strict mode for OpenAI Responses function tools without rewriting optional tool-schema fields. It includes the source-development lockfile restore and Node engine floor fixes; packaged WebUI consumers still do not need Node/npm. Existing 0.2.1 packages remain immutable.
The 0.2.3 cohort also accepts Host-owned AzureAd authentication configuration
without requiring a Host-side translation. Existing SDK packages remain immutable.
The 0.2.4 cohort completes that migration: AzureAd is the only configuration
source for trust settings; the old auth trust format is no longer read.
Authorization configuration in 0.2.5
The 0.2.5 cohort uses Authorization:RequiredRole and Authorization:AdminRole for
application role policy. Normal Host settings omit the oid / roles claim mappings
because those are SDK defaults. Only non-standard token conventions need the optional
Authentication:NameClaimType and Authentication:RoleClaimType overrides.
Old auth role/claim keys fail explicitly; there is no fallback that silently removes
role checks. Existing 0.2.4 packages remain unchanged.
Independent tool capability approvals in 0.2.6
The 0.2.6 cohort treats ToolEffect flags as independent capabilities, not a
permission hierarchy. Remote tools retain Network; undeclared effects use
Unknown. Skill reads do not request write approval, and the WebUI displays every
declared capability, including Unknown, Exec, and explicit None.
Custom IStandingApprovals implementations must accept the requested ToolEffect
set in IsApproved and Approve. Remembered grants cover only the approved
capability set; adding capabilities requires a new approval. Mandatory fresh
approvals remain one-time, and independent policy confirmations are combined.
This is a source contract change for hosts implementing that interface; update
those implementations when upgrading. See Approval and consent.
HTTP/ACP hosts retain the AzureAd and Authorization configuration described
above; this release adds no legacy authentication fallback. All 24 packages use
the same 0.2.6 version with exact internal dependency pins. Existing versions
remain immutable.
Exact SQLite decimal queries and MCP defaults in 0.2.7
The 0.2.7 cohort preserves SQLite decimal values as invariant TEXT/G29 while
using exact decimal comparisons for typed filters, ordering, keys, and indexes.
Document queries extract raw JSON number text without passing through REAL;
exponent-form values round-trip without losing precision. Existing values and
document-key serialized identities are not rewritten.
AutoCreate=true adds versioned decimal expression indexes, including numeric
uniqueness for decimal table keys; conflicting legacy keys fail explicitly.
AutoCreate=false performs no DDL and may require scans/sorts until those indexes
are provisioned. Old provider binaries must not keep writing to an upgraded
database, and raw SQL connections maintaining these indexes must register the
provider's collation and function. See Storage design
for upgrade and query-plan constraints.
MCP's default unknown business effect is transport-neutral (Unknown).
HTTP/SSE tools still add Network; explicit effects and trusted annotations
retain their normal behavior. The 0.2.6 capability-set approval contract and
AzureAd/Authorization configuration remain unchanged. All 24 packages use
0.2.7 with exact internal dependency pins; previous releases remain immutable.
Consistent Knowledge filter validation in 0.2.8
The 0.2.8 cohort applies the existing Knowledge filter limits to every normal
search, even when MetadataInFilters is absent. SourceId, domain, segment-type,
and exact-metadata filters now consistently reject malformed or oversized inputs
before retrieval. Null and valid filters retain their existing behavior; grouped
search validation and the declared limits are unchanged.
The SQLite decimal fixes, MCP capability defaults, and authentication contracts from previous cohorts are retained. All 24 packages use 0.2.8 with exact internal dependency pins; existing releases remain immutable.
Host authentication configuration
Server reads AzureAd:Instance
and AzureAd:TenantId as the HTTPS authority <instance>/<tenant>/v2.0,
AzureAd:Audiences as the explicit audience list, and the distinct
AzureAd:InboundPolicies:*:ValidIssuers values as the issuer list.
It does not infer audiences from a client ID, discover issuers or introduce an
implicit wildcard. The same strict authorization-configuration validation applies.
Role settings and optional claim overrides follow the 0.2.5 layout above.
Migrate auth:authority/audiences/issuers to these AzureAd keys before upgrading
to 0.2.4. Old trust keys do not supply defaults or override AzureAd.
The Host examples and in-repository callers use the new format directly.
This only binds configuration. The Host still installs/selects MISE or another authentication implementation; Server does not depend on MISE or register an additional JWT handler for an externally authenticated Host.
Complete backend
Use Server for the supported ASP.NET Core product composition:
dotnet add package PollySdk.AgentFramework.Server
It includes the provider-neutral AI runtime, Standard Agent, SQLite, PostgreSQL, Knowledge,
Automations, and MCP. It does not install AI providers, Azure Identity, SecureStore, OpenAPI,
or Documents.Services. Knowledge retains the base Documents parser.
The host installs and registers only the AI implementations it supports and supplies an
ICredentialVault. No adapter fallback, assembly scanning, or dynamic package loading is performed.
Server 0.2.0 ships no contentFiles, environment SeedData, enterprise Agent/Skill/MCP definitions,
or settings.json. A host/admin owns the configuration; an empty store starts with protected
administration only until valid configuration is supplied. Source examples are not package assets
and are never imported automatically.
Migrating Server to 0.2.0
For an OpenAI-compatible gateway with optional Azure authentication:
dotnet add package PollySdk.AgentFramework.Server --version 0.2.0
dotnet add package PollySdk.AI.OpenAI --version 0.2.0
dotnet add package PollySdk.AI.Auth.AzureIdentity --version 0.2.0
using Polly.AI.OpenAI;
using Polly.AI.Auth.AzureIdentity;
using Polly.Server;
// Prepare storage, register ICredentialVault and configure host authentication first.
builder.Services.AddReloadablePollyServer(builder.Configuration, (ai, settings) =>
{
ai.AddOpenAiWireAdapter();
ai.AddOpenAiEmbeddingAdapter();
ai.AddAzureIdentityCredentials();
});
AddServer / AddPollyServer / AddPollyAgentServices accept the same optional
configureAi callback for non-reloadable composition. AddChatAiLayer and
AddEmbeddingAiLayer now register only the neutral runtime; direct users must also register adapters.
With no callback there are no concrete AI implementations. Configured but unregistered adapters
or credentials fail explicitly; failed activation reports saved-but-not-applied and retains the
previous runtime.
The callback selects implementations at host startup and is replayed with each generation's settings. Installed provider changes require a restart. Endpoint, model, authentication, and other existing configuration activation semantics remain unchanged; ongoing executions retain their captured generation. Do not select or load implementations dynamically from AI.json.
Polly.Host maintains its own full-product composition in ProductAiComposition.AddProviders;
other hosts do not depend on it. Its opt-in Substrate HTTP middleware maps authenticated identity
and gateway headers after authentication. Generic model invocation metadata, including title
generation, uses LlmRequestContext; Substrate maps that contract inside its adapter.
Optional reusable WebUI
dotnet add package PollySdk.WebUI --version 0.2.0
WebUI has no Server, Agent, AI, or Storage dependency. It owns Polly.WebUI.dll and the compiled
Vue assets. Its buildTransitive target copies those assets into wwwroot for both build and
publish. The consumer must not also copy a second WebUI tree into wwwroot; no Node/npm or
package-install script runs in the consumer.
using Polly.WebUI;
// Configure PathBase before this if the host lives under a URL prefix.
app.UsePollyWebUI(PollyWebUIOptions.FromConfiguration(
app.Configuration.GetSection("WebUI")));
Example host-owned public settings (identifiers below are placeholders):
{
"WebUI": {
"ApiBase": "/api",
"AutoLogin": true,
"Auth": {
"Enabled": true,
"ClientId": "your-public-spa-client-id",
"Authority": "https://login.microsoftonline.com/your-tenant",
"Scopes": ["api://your-api/access"],
"AdminRole": "Agent.Admin"
},
"Site": { "Title": "Your agent" }
}
}
WebUI:Auth:Enabled must be explicit, including in anonymous development. Enabled auth
requires explicit client ID, HTTPS authority and scopes. Invalid configuration fails startup,
not silently anonymous mode. The Host still configures and enforces its own backend JWT
validation/authorization; public UI settings and UI role checks are not authorization.
The host emits only schema version 1, pathBase, apiBase, auth (enabled, clientId,
authority, scopes, adminRole), autoLogin, and site.title at /ui-config.json.
This response is no-store; no appsettings dump, database options, AI credentials, secrets,
or tokens are exposed. A root-relative ApiBase is relative to the application's PathBase;
an explicit HTTP(S) API URL is used unchanged. The frontend fetches configuration before
importing MSAL/Vue, then uses the PathBase-aware redirect and router base.
Missing or malformed responses show an explicit startup error.
HTML is revalidated (no-cache), the HTML base is set per PathBase, and content-hashed
assets have a one-year immutable cache. Only known SPA routes fall back to HTML, including
dotted session IDs and settings sections; API paths and missing files stay 404.
Polly owns the Vue source, lockfile, tests and frontend toolchain. Central builds run
npm ci then npm run check in src\WebUI before dotnet pack; src\WebUI\dist
is the environment-neutral payload. Runtime public config is never included in the package.
Polly.Host can keep its source-development copy target; deployed package consumers use only
the package target, never both. Server does not automatically install WebUI.
Selective Agent application
Choose an Agent, one provider, and persistence independently:
dotnet add package PollySdk.AgentFramework.Agent.Standard
dotnet add package PollySdk.AI.OpenAI
dotnet add package PollySdk.Storage.Sqlite
Then add Knowledge, Automations, MCP, or OpenAPI only when required.
Custom framework implementation
Use the common Agent Framework contracts/runtime for a custom Agent, Tool provider, or Extension:
dotnet add package PollySdk.AgentFramework.Runtime
Use the provider-neutral AI runtime when implementing a model protocol:
dotnet add package PollySdk.AI.Runtime
Use the provider-neutral Storage runtime when implementing storage views or a physical provider:
dotnet add package PollySdk.Storage.Runtime
None of the runtime packages installs a concrete provider.
All Polly packages are released as one version cohort. Internal PollySdk.* dependencies use the
exact range [X], and Validate-PackageCohort.ps1 rejects mixed package versions before publish.
The same validator requires a declared root README.md in every archive and checks each owned
source project's direct external package references against its owner's actual nuspec at the
source version. Wrappers must explicitly declare those dependencies (including dependencies of
every assembly in a merged package); private source-project build references are not distribution
dependencies. Source project references must also be covered by the internal NuGet dependency
closure. These checks use the source checkout beside the validator, not installed machine packages.
All package payloads are explicitly bounded: environment SeedData, host configuration, definitions,
.env, and ui-config.json are rejected. The only additional runtime/tool assets are WebUI's
compiled static distribution and Documents.Services' generic PaddleOCR worker plus dependency/model
locks. In particular, a required generic models.lock.json is not treated as environment config.
Pick an AI provider
There is no aggregate provider package. Each model provider has one project, assembly, and package.
| Package | Capability | Direct Polly dependencies |
|---|---|---|
PollySdk.AI.OpenAI |
OpenAI chat and embeddings | AI Runtime |
PollySdk.AI.Anthropic |
Anthropic chat | AI Runtime |
PollySdk.AI.Gemini |
Gemini chat and embeddings | AI Runtime |
PollySdk.AI.GitHubCopilot |
Copilot catalog, chat, and GitHub credentials | AI Runtime, OpenAI |
PollySdk.AI.Substrate |
Gateway routing, metadata, retry, passport, chat/embeddings | AI Runtime, OpenAI, Anthropic |
PollySdk.AI.Auth.SecureStore |
Platform-backed credential vault | AI Runtime |
PollySdk.AI.Auth.AzureIdentity |
Azure Identity credential factories | AI Runtime |
GitHub Copilot applications can add SecureStore for the official platform vault. Substrate applications can add AzureIdentity when their configured auth mode requires it. Both auth implementations remain replaceable.
Pick a Storage provider
Storage packages are independent of AgentFramework:
| Package | Capability | Direct Polly dependencies |
|---|---|---|
PollySdk.Storage.Relational |
Shared SQL resource catalog, table sets, queries, transactions | Storage Runtime |
PollySdk.Storage.Sqlite |
SQLite relational provider | Storage Relational |
PollySdk.Storage.PostgreSql |
PostgreSQL relational provider | Storage Relational |
Applications implement against PollySdk.Storage.Runtime and install only the selected provider.
The standalone packages contain no Agent, Extension, Server, Session, or Artifact dependency.
Add Agent Framework implementations
Core implementations depend directly on PollySdk.AgentFramework.Runtime.
Native Knowledge adapters depend on Knowledge and the matching Storage provider.
| Package | Adds |
|---|---|
PollySdk.AgentFramework.Agent.Standard |
ReactAgent, ChatAgent, prompts, history, and budgets |
PollySdk.AgentFramework.Extensions.Knowledge |
Ingestion, retrieval, and Knowledge-backed Memory |
PollySdk.AgentFramework.Extensions.Knowledge.Sqlite |
Optional native FTS5; depends on Knowledge and Storage.Sqlite |
PollySdk.AgentFramework.Extensions.Knowledge.PostgreSql |
Optional tsvector/pgvector/HNSW; depends on Knowledge and Storage.PostgreSql |
PollySdk.AgentFramework.Extensions.Automations |
Durable Scheduler and Agent Prompt Jobs |
PollySdk.AgentFramework.Extensions.Tools.Mcp |
MCP Tool provider |
PollySdk.AgentFramework.Extensions.Tools.OpenApi |
OpenAPI Tool provider |
Dependency model
A --> B means package A directly depends on package B.
flowchart TD
Server["AgentFramework.Server"]
OpenAI["AI.OpenAI"]
Anthropic["AI.Anthropic"]
Gemini["AI.Gemini"]
GitHubCopilot["AI.GitHubCopilot"]
Substrate["AI.Substrate"]
SecureStore["AI.Auth.SecureStore"]
AzureIdentity["AI.Auth.AzureIdentity"]
AgentStandard["AgentFramework.Agent.Standard"]
Knowledge["AgentFramework.Extensions.Knowledge"]
Automations["AgentFramework.Extensions.Automations"]
MCP["AgentFramework.Extensions.Tools.Mcp"]
OpenAPI["AgentFramework.Extensions.Tools.OpenApi"]
StorageRelational["Storage.Relational"]
StorageSqlite["Storage.Sqlite"]
StoragePostgreSQL["Storage.PostgreSql"]
FrameworkRuntime["AgentFramework.Runtime"]
AIRuntime["AI.Runtime"]
StorageRuntime["Storage.Runtime"]
Server --> AIRuntime
Server --> AgentStandard
Server --> StorageSqlite
Server --> Knowledge
Server --> Automations
Server --> MCP
Server --> StoragePostgreSQL
GitHubCopilot --> OpenAI
Substrate --> OpenAI
Substrate --> Anthropic
OpenAI --> AIRuntime
Anthropic --> AIRuntime
Gemini --> AIRuntime
GitHubCopilot --> AIRuntime
Substrate --> AIRuntime
SecureStore --> AIRuntime
AzureIdentity --> AIRuntime
AgentStandard --> FrameworkRuntime
Knowledge --> FrameworkRuntime
Automations --> FrameworkRuntime
MCP --> FrameworkRuntime
OpenAPI --> FrameworkRuntime
FrameworkRuntime --> AIRuntime
FrameworkRuntime --> StorageRuntime
StorageRelational --> StorageRuntime
StorageSqlite --> StorageRelational
StoragePostgreSQL --> StorageRelational
All 24 packages target .NET 10 and share version 0.2.8. Central publishing is owned by
BunnySoft/PollySdk, not by a second workflow here. Pack the committed release source with
RepositoryCommit and SourceRevisionId set to its exact SHA, then validate the cohort with
Validate-PackageCohort.ps1 -ArtifactDirectory <output> -Version 0.2.8 -SourceCommit <sha>.
| Product | Versions 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. |
-
net10.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on PollySdk.Storage.Runtime:
| Package | Downloads |
|---|---|
|
PollySdk.AgentFramework.Runtime
Common Agent, Storage, Extensions, configuration, and Memory runtime for Agent Framework implementations. |
|
|
PollySdk.Storage.Relational
Shared relational resource catalog, table-set engine, mapped queries, and transactions for PollySdk Storage providers. |
|
|
PollySdk.Storage.InMemory
In-memory implementation of unified PollySdk Storage views and atomic operations. |
GitHub repositories
This package is not used by any popular GitHub repositories.