DivineTree.ICPVault.Storage
1.0.0
dotnet add package DivineTree.ICPVault.Storage --version 1.0.0
NuGet\Install-Package DivineTree.ICPVault.Storage -Version 1.0.0
<PackageReference Include="DivineTree.ICPVault.Storage" Version="1.0.0" />
<PackageVersion Include="DivineTree.ICPVault.Storage" Version="1.0.0" />
<PackageReference Include="DivineTree.ICPVault.Storage" />
paket add DivineTree.ICPVault.Storage --version 1.0.0
#r "nuget: DivineTree.ICPVault.Storage, 1.0.0"
#:package DivineTree.ICPVault.Storage@1.0.0
#addin nuget:?package=DivineTree.ICPVault.Storage&version=1.0.0
#tool nuget:?package=DivineTree.ICPVault.Storage&version=1.0.0
DivineTree.ICPVault.Storage
Connection Framework for ICPVault Storage Implementations
What Is This?
DivineTree.ICPVault.Storage is the connection framework for DivineTree.ICPVault storage implementations. It provides connection lifecycle, retry with exponential backoff, exception translation, and disposal so your implementation focuses on pure storage queries only.
Zero storage SDK. No Neo4j, Cosmos, or any other storage dependency ships in this NuGet.
Installation
dotnet add package DivineTree.ICPVault.Storage
Requires:
dotnet add package DivineTree.ICPVault
What Ships in This Package
| Component | Purpose |
|---|---|
IVaultConnectionManager |
Connection lifecycle — OpenAsync · CloseAsync · IsHealthyAsync · IsOpen |
IVaultRetryPolicy |
Retry contract — ExecuteAsync · ExecuteAsync<T> |
DefaultVaultRetryPolicy |
3 attempts · exponential backoff 200ms · transient only · configurable |
DefaultVaultConnectionManager |
Abstract state machine · thread-safe · implement 3 methods |
BaseVaultStorageAdapter<TAgenticContext> |
Wires connection + retry + error handling — implement 3 pure query methods |
VaultStorageException |
Typed exception — StorageOperation · IsTransient · InnerException always preserved |
Quick Start
Extend BaseVaultStorageAdapter<TAgenticContext> and implement three methods:
public sealed class Neo4jAIEnvelopeVault<TAgenticContext>
: BaseVaultStorageAdapter<TAgenticContext>
where TAgenticContext : class
{
protected override async Task ExecutePersistAsync(
AIVaultRecord<TAgenticContext> record, CancellationToken ct)
{
// Pure storage query only
// Framework owns: guard clauses · connection · retry · exception translation
}
protected override async Task<IReadOnlyList<AIVaultRecord<TAgenticContext>>> ExecuteQueryAsync(
AIVaultQuery query, CancellationToken ct) { ... }
protected override async Task<int> ExecuteCountAsync(CancellationToken ct) { ... }
}
What the Framework Owns
Caller
|
Guard clauses — null record · empty lineage chain → ArgumentException
|
EnsureConnectionAsync — opens if closed · health check before every operation
|
Retry — 3 attempts · exponential backoff · transient only
|
ExecutePersistAsync — YOUR CODE — pure storage query
|
Exception translation — raw exceptions → VaultStorageException
|
Dispose — connection manager lifecycle
Implementing a Connection Manager
Extend DefaultVaultConnectionManager and implement three methods:
public sealed class Neo4jConnectionManager : DefaultVaultConnectionManager
{
public IDriver? Driver { get; private set; }
protected override Task OpenConnectionAsync(CancellationToken ct)
{
Driver = GraphDatabase.Driver(_uri, AuthTokens.Basic(_username, _password));
return Task.CompletedTask;
}
protected override async Task CloseConnectionAsync(CancellationToken ct)
{
if (Driver is not null) { await Driver.DisposeAsync(); Driver = null; }
}
protected override async Task<bool> CheckHealthAsync(CancellationToken ct)
{
if (Driver is null) return false;
try { await Driver.VerifyConnectivityAsync(); return true; }
catch { return false; }
}
}
AuraDB URI Scheme Note
When using neo4j+s:// URI — do not call WithEncryptionLevel. The +s scheme implies TLS.
Design Principles
- The framework owns plumbing. Your implementation owns queries.
- Connection is opened lazily — on first operation, not on construction.
- Health is checked before every operation.
- Only transient failures are retried.
- All exceptions are translated to
VaultStorageException. - Disposal is deterministic — always
await using.
License
MIT — see LICENSE.
DivineTreeDesigns — Sovereign Confidential
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- DivineTree.ICPVault (>= 1.0.0)
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 |
|---|---|---|
| 1.0.0 | 133 | 5/17/2026 |