NextGenSoftware.OASIS.API.Providers.AzureCosmosDBOASIS 2.0.5

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

NextGen Software WEB4 OASIS API AzureCosmosDB OASIS Provider

WEB4 OASIS API AzureCosmosDB OASIS Provider is one of the many WEB2/WEB3 providers that plug in and integtate into the OASIS.

Username/email exports resolve the current avatar identity; version selects exported holon roots, not independent avatar history. Use the current username/email when exporting older holons. Linked children keep independent versions. Explicit versioned avatar lookups retain historical identity fields. Export version=-1 enumerates validated stored versions with ownership/deletion filtering per version and stored archived child payloads, not a cross-version graph snapshot. Export values below -1 fail before identity repository reads; ordinary reads reject negative versions. Owned exports report returned-root LoadedCount, including zero for an empty result; this count is not Cosmos request-unit usage or cost.

Successful point/identity reads count one record. Collection, parent, metadata, type-filtered and nearby reads count returned roots, not scanned records or nested children; empty collections stay loaded with count zero. Search counts returned avatar/holon roots (NumberOfResults). Failed graph projection clears any earlier point-read count, and deletion does not publish its internal lookup as a successful read. These response annotations do not change query, persistence, history, native request charges or retry policy.

Initial Release targeting OASIS API v2.3.1 (Current LIVE REST version):
https://api.oasisweb4.one

Full documentation and source code can be found here:
https://github.com/NextGenSoftwareUK/Our-World-OASIS-API-HoloNET-HoloUnity-And-.NET-HDK

Make sure you check out the Overview and Benefits Of Building On The WEB 4 OASIS API sections above! 😃 Thank you!

Current verification and limitations

Cosmos stores JSON numbers within binary64 precision. This adapter explicitly uses shared Binary64JsonNumberCodec for numbers that cannot survive that representation. Its reserved root _oasis_exact_numbers envelope (schema: binary64-v1) binds exact numeric literals to structural paths; those native values alone become strings. Point/query/ack decoding restores canonical numeric types before identity/history/metadata matching and strict acknowledgement comparison. Ordinary strings remain strings, representable values/routing keys remain native, and malformed/unknown/tampered envelopes fail validation. This is storage encoding, not encryption or a second write.

Do not write the reserved envelope as application data or assume direct native SQL numeric ordering/range/index semantics over escaped values. Public provider metadata matching sees restored values; arbitrary native numeric query capabilities are not certified. Envelope overhead can increase payload/index size and RUs; hosted cost acceptance remains open. Already-rounded legacy data cannot be reconstructed. Current local proof and remaining gates: Docs/WIP/HyperDrive-Providers/COSMOSDB_RECORD_HISTORY.md.

Trusted caller objects are projected into canonical Avatar/AvatarDetail/Holon DTOs before repository create, upsert, replacement and conditional replacement. Application subclasses need not be allowed by the stored JSON binder; persisted records still use restricted decoding. Repository subclasses implement the typed ProjectInput hook with the shared OasisJson.Project helper. Native subclass tests cover direct and recursive saves, not arbitrary proxy/explicit-interface implementations or extra application-specific fields.

Uses Microsoft.Azure.Cosmos SDK, canonical OASIS serialization and shared holon graph planning/projection. Native evidence uses the retained local Cosmos DB emulator, not a hosted Azure account; scoped tests do not certify full-provider or hosted-release completion.

Retained record history is supported when IsVersionControlEnabled is enabled; existing archives remain readable when creation is disabled. Version zero selects current and positive versions select retained history. Historical credentials are not authentication authority. Profile/detail mutations span separate containers and are not a single atomic transaction; partial/uncertain mutations require inspection before replay. History, concurrency/ETag, recovery, full interface-option and hosted/release verification remain open. Current evidence and gates: Docs/WIP/HyperDrive-Providers/HYPERDRIVE_V2_CURRENT_RELEASE_GATES.md.

From the existing repository checkout: pwsh -NoProfile -File Scripts/TestHosts/Run-ReusableCosmosDBTests.ps1. Reuses the exact retained container/image and cached dependencies, leases the environment exclusively and stops its owned service afterward. No installation/download/reset/runtime replacement. Fixtures reuse empty native/SQLite schemas; nonempty or unexpected fixtures stop testing for inspection rather than being deleted or overwritten.

Add -InspectRetainedFixture for read-only fixture counts and the SQLite file hash. This diagnostic does not certify provider operations or emit keys/record payloads. Ordinary and diagnostic results use separate fixed reports under TestResults/CosmosDBCurrent.

Soft deletion now compares each observed record and uses native ETag IfMatch when replacing it. A changed record is rejected rather than overwritten. This is per-record optimistic concurrency, not an atomic transaction across profile/detail containers; earlier acknowledged changes remain explicit partial-operation evidence. Ordinary unconditional saves and hard deletes do not gain an all-purpose concurrency guarantee from this path.

The optional -ReconcileRetainedRoutingFixture mode is only for the reviewed routing fixture shape. It requires OASIS_COSMOS_ROUTING_FIXTURE_SHA256 to match an independently inspected file, validates every nonempty table count, checks original native IDs are absent while their containers remain readable, then removes only that closed disposable SQLite file. It is not a general cleanup/reset tool and does not replay native mutations. Keep the inspection/reconciliation reports; an arbitrary hash alone is not ownership authorization.

Bind pre-provisioned resources without infrastructure creation

var provider = new AzureCosmosDBOASIS(
    endpoint,
    authKey,
    databaseName,
    new List<string> { "holonItems", "avatarItems", "avatarDetailItems" },
    CosmosResourceInitializationMode.ExistingResourcesOnly);

var activated = await provider.ActivateProviderAsync();
// Check activated.IsError before submitting queries or mutations.

This explicit mode reads the database and each declared container's schema. Every container must have its expected identity and the single /id partition key. Missing or incompatible resources fail activation; activation never switches to provisioning. It does not create databases/containers, adjust throughput, or alter schema. Existing four-argument provider callers retain their original setup behavior through ProvisionMissingResources; their constructor signature is preserved.

This controls infrastructure initialization only. It does not make data APIs read-only, authorize arbitrary fixture records, or prove a subscription is free. Hosted acceptance must independently verify account/spending conditions, credentials, TLS, source scope and fixture ownership before issuing requests. Non-loopback clients retain normal TLS certificate validation; hosted testing must not use emulator keys or a certificate-validation bypass.

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

Showing the top 1 NuGet packages that depend on NextGenSoftware.OASIS.API.Providers.AzureCosmosDBOASIS:

Package Downloads
NextGenSoftware.OASIS.OASISBootLoader

The OASIS BootLoader provides a single entry point to initialise the entire OASIS ecosystem in any .NET application. Reads OASISDNA configuration, registers and activates all configured providers, sets up Auto-FailOver/LoadBalancing, and returns a ready-to-use OASIS instance. Integrate 55+ decentralised networks into your app with just a few lines of code. Part of the OASIS Omniverse at https://oasisomniverse.one

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.6 126 11/14/2026
2.0.5 121 11/14/2026
2.0.4 352 10/13/2026
2.0.3 220 9/28/2026
2.0.2 166 9/28/2026
2.0.0 358 7/12/2026
1.0.0 457 9/1/2022

NextGenSoftware.OASIS.API.Providers.AzureCosmosDBOASIS v2.0.5

Connects the OASIS to Azure Cosmos DB -- Microsoft's globally distributed, multi-model database (document, key-value, graph, column) with 99.999% availability SLAs, single-digit millisecond latency, and automatic global replication. Stores OASIS holons and avatars with enterprise SLAs. Part of the OASIS HOT-Swappable Provider Architecture. Ecosystem: https://oasisomniverse.one/

What's new since v2.0.4
- Add bounded Cosmos native query transport with failure tests (4404a5b)
- Add Cosmos native scalar projections with source and domain validation (ab7968d)
- Add explicit Cosmos activation for existing resources without provisioning (f355668)
- Add native Cosmos nested metadata queries with exact-number type isolation (de77804)
- Add parameterized Cosmos canonical CQL predicate compiler (37f7b92)
- Apply Cosmos DB holon graph read options (ce6681e)
- Compile bounded Cosmos CQL row commands with physical re-admission (6db14dd)
- Correct Cosmos DB canonical Version field queries and validate version input (736a23a)
- Define and native-verify Cosmos CQL compound index profile (33aed6f)
- Dispose Cosmos DB SDK response and request streams on every path (a9932b7)
- Distinguish Cosmos item absence from parent resource failure (c196f10)
- Enroll Cosmos canonical CQL row provider with native boundary acceptance (7ab243c)
- feat(cosmosdb): export all validated stored record versions (154248a)
- Fix Cosmos DB avatar delete acknowledgment and visibility (643908d)
- Fix Cosmos DB current avatar collection read semantics (fb0163d)
- Fix Cosmos DB metadata query matching and graph options (33d689c)
- Fix Cosmos DB parent query graph and result semantics (9a8956a)
- Fix Cosmos DB selector pagination and preserve identity errors (80c1003)
- fix: expose cloud capabilities for Cosmos Firestore and BigQuery (82d92cc)
- fix: preserve Cosmos avatar deletion selector intent (f53a549)
- fix: preserve Cosmos detail lifecycle selector observations (038662f)
- fix(cosmos): reject repeated canonical collection identities (86438af)
- fix(cosmosdb): await native collection pages and own search scope (51cc91a)
- fix(cosmosdb): carry captured role intent to conditional writer; native gate open (9a8572a)
- fix(cosmosdb): count parent selection toward child depth (d46a8ab)
- fix(cosmosdb): guard soft deletion with native snapshot and etag checks (b3bf2a4)
- fix(cosmosdb): import through canonical graph save (7ef29d8)
- fix(cosmosdb): preserve exact conditional and acknowledged metadata comparisons (42e1bf4)
- fix(cosmosdb): preserve exact numbers through native binary64 storage (d76cf5b)
- fix(cosmosdb): preserve query scalars and record native precision gate (4917817)
- fix(cosmosdb): project trusted caller records before writes (dacc210)
- fix(cosmosdb): publish acknowledged scalar and partial batch save counts (1040db1)
- fix(cosmosdb): report accurate returned-root read counts (df722a7)
- fix(cosmosdb): select export identity independently and count roots (3e1da3b)
- fix(cosmosdb): validate holon types and reuse retained test schemas (964a40d)
- fix(cosmosdb): validate replacement payloads and retain body failure outcomes (80e6a9c)
- fix(cosmosdb): verify canonical create and upsert acknowledgements (2a31f35)
- Guard direct Cosmos repository callers without bypassing projection hooks (7b64dc6)
- Implement Cosmos DB retained record history with conditional SDK writes and historical reads (7b579a0)
- Implement Cosmos native Count LongCount and Any with exact window cardinality (761b43b)
- Initialize Cosmos DB repositories before first record save (f50fbdc)
- Isolate Azure Cosmos public save proposals from newer caller state (6e8c066)
- Keep Cosmos credentials current and preserve reordered native record type metadata (0c36670)
- Native import: Azure Cosmos, SOLID, ActivityPub, IPFS and Solana readers; STAR CLI nativeimport and cql commands; docs (fc85a95)
- Native import: bring your own connection (provider, API and test changes) (8717f37)
- Native import: the other five readers take a caller connection; stateless readers for connections; guarded HTTP handler; pin Core and STAR ODK (29dcbf9)
- Organize HyperDrive provider working reports under dedicated WIP folder (b699b48)
- Plan Cosmos DB graph writes and retain partial acknowledgements (3ab39be)
- Preserve actual Cosmos DB service substatus details (0d34b70)
- Preserve Cosmos DB holon delete acknowledgment and uncertainty (cdf5163)

Full changelog
https://github.com/NextGenSoftwareUK/OASIS/commits/master/Providers/Cloud/NextGenSoftware.OASIS.API.Providers.AzureCosmosDBOASIS