Cohesive.Adapters.Cosmos 0.1.0-alpha.80

This is a prerelease version of Cohesive.Adapters.Cosmos.
dotnet add package Cohesive.Adapters.Cosmos --version 0.1.0-alpha.80
                    
NuGet\Install-Package Cohesive.Adapters.Cosmos -Version 0.1.0-alpha.80
                    
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="Cohesive.Adapters.Cosmos" Version="0.1.0-alpha.80" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cohesive.Adapters.Cosmos" Version="0.1.0-alpha.80" />
                    
Directory.Packages.props
<PackageReference Include="Cohesive.Adapters.Cosmos" />
                    
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 Cohesive.Adapters.Cosmos --version 0.1.0-alpha.80
                    
#r "nuget: Cohesive.Adapters.Cosmos, 0.1.0-alpha.80"
                    
#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 Cohesive.Adapters.Cosmos@0.1.0-alpha.80
                    
#: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=Cohesive.Adapters.Cosmos&version=0.1.0-alpha.80&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Cohesive.Adapters.Cosmos&version=0.1.0-alpha.80&prerelease
                    
Install as a Cake Tool

Cohesive.Adapters.Cosmos

Cohesive.Adapters.Cosmos provides Azure Cosmos DB interpretations for Cohesive entity storage, Relations, materialization sources, Process Transition receipts, domain-event inboxes, outbox records, and vector storage.

Install

dotnet add package Cohesive.Adapters.Cosmos

Build a safe Cosmos query

The standalone builder validates property paths and operators, creates deterministic parameters, and never accepts raw SQL fragments:

var id = CosmosSqlExpression.Property("c", FieldPath.FromField("Id"));
var status = CosmosSqlExpression.Property("c", FieldPath.FromField("Status"));

var template = new CosmosSqlBuilder("c")
    .Select(id, "id")
    .Select(status, "status")
    .Where(CosmosSqlExpression.Binary(
        CosmosSqlBinaryOperator.Equal,
        status,
        CosmosSqlExpression.RuntimeParameter("status")))
    .OrderBy(id)
    .OffsetLimit(offset: 0, limit: 100)
    .BuildTemplate();

var statement = template.Bind(new Dictionary<string, object?>
{
    ["status"] = "open"
});

Use the canonical compiler when the query must retain Relation semantics, plan affinity, capability evidence, and provenance. Placement and the Cosmos storage binding remain explicit persisted interpretations of that plan.

Implemented interpretations

  • Parameterized Cosmos SQL compilation for the supported canonical Relation/query slice.
  • Bounded Cosmos SDK source acquisition and materialization change sources.
  • Entity repository and embedded aggregate storage realization.
  • Atomic Process Transition execution with exact partition-local replay receipts.
  • A durable, target-deduplicating canonical domain-event inbox.
  • Safe standalone Cosmos SQL construction.
  • Outbox persistence and vector storage integrations.

Important boundaries

Cosmos JOIN expands arrays within one document; it is not a cross-document join. Cross-container relationships use bounded reads and local correlation when the physical plan can preserve the requested semantics.

Process Transition receipt lookup requires exact point-read partition placement. The adapter fails with structured capability evidence when that placement cannot be resolved and never substitutes a cross-partition scan for atomic subject authority.

Missing values, null, ordering, paging, aggregation, partition scope, and continuation behavior are represented explicitly. Unsupported combinations fail with structured diagnostics rather than inheriting SDK coercions.

Continue

Experimental atomic storage commits

Create CosmosStorageCommitExecutor with CreateAsync(client, databaseId, containerId, target). It verifies a single observed writable region, /partitionKey container partitioning and disabled TTL, then realizes conditional writes plus a receipt in one transactional batch. Other targets or partitions are rejected; native limits include the receipt. The conservative serialized document budget is 1 MiB. It owns a dedicated document namespace and uses a lossless stream codec independent of the client's serializer. Recreate the executor after topology or consistency changes.

Query-dependent commits require the explicit all-writers guard protocol and a Strong account/read profile. The local vNext emulator's Eventual profile cannot qualify these reads; it still exercises native batch, ETag and exact receipt behavior. Run those integration checks by setting COSMOS_STORAGE_COMMIT_CONNECTION_STRING and filtering CosmosStorageCommitTests. See the commit decision and deferred adoption work.

For commit profiles below Strong, an item conflict or token mismatch followed by an invisible receipt returns Unknown, including Session profiles after restart. Reconcile the exact intent when visibility catches up; do not treat this as a definitive precondition failure. executor.Validate(intent) measures native documents and the receipt before any I/O, using the same encoding and byte budget as execution.

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
0.1.0-alpha.80 39 9/8/2026
0.1.0-alpha.79 52 9/7/2026
0.1.0-alpha.78 49 9/7/2026
0.1.0-alpha.77 54 9/7/2026
0.1.0-alpha.76 49 9/6/2026
0.1.0-alpha.75 52 9/6/2026
0.1.0-alpha.74 65 9/6/2026
0.1.0-alpha.73 81 9/5/2026
0.1.0-alpha.72 47 9/5/2026
0.1.0-alpha.71 50 9/4/2026
0.1.0-alpha.70 47 9/4/2026
0.1.0-alpha.69 54 9/2/2026
0.1.0-alpha.68 53 8/30/2026
0.1.0-alpha.67 78 8/26/2026
0.1.0-alpha.66.5 99 9/6/2026
0.1.0-alpha.66.4 139 8/30/2026
0.1.0-alpha.66.3 75 8/29/2026
0.1.0-alpha.66.2 63 8/27/2026
0.1.0-alpha.66.1 67 8/26/2026
0.1.0-alpha.66 87 8/25/2026
Loading failed