DivineTree.ICPVault
1.0.0
dotnet add package DivineTree.ICPVault --version 1.0.0
NuGet\Install-Package DivineTree.ICPVault -Version 1.0.0
<PackageReference Include="DivineTree.ICPVault" Version="1.0.0" />
<PackageVersion Include="DivineTree.ICPVault" Version="1.0.0" />
<PackageReference Include="DivineTree.ICPVault" />
paket add DivineTree.ICPVault --version 1.0.0
#r "nuget: DivineTree.ICPVault, 1.0.0"
#:package DivineTree.ICPVault@1.0.0
#addin nuget:?package=DivineTree.ICPVault&version=1.0.0
#tool nuget:?package=DivineTree.ICPVault&version=1.0.0
DivineTree.ICPVault
Sovereign Intelligence Accumulation Layer — Reasoning Corpus Vault for ICP Envelopes
The Problem
\DivineTree.ICP\ carries agentic reasoning across orchestration boundaries — goal decomposition, routing decisions, confidence scores, replan cycles. When the agentic run completes, \ICPEnvelope<TIntent>\ goes out of scope and is garbage collected.
The complete reasoning trace. Gone.
\ToICPAuditSummary()\ survives. The intelligence does not — the full reasoning lineage, the routing decisions, the replan cycles, the confidence progression across every step.
The platform reasons through thousands of goals but learns nothing from them.
\DivineTree.ICPVault\ is the sovereign intelligence accumulation layer that fixes this. It persists sanitised, PII-free AI vault records to a storage backend — accumulating a reasoning corpus for training, analytics, and platform improvement.
What Is ICPVault?
\DivineTree.ICPVault\ ships the pattern — the contract, the record model, the sanitiser base class, and an in-memory implementation for dev/test. Your platform provides the storage implementation.
Zero storage SDK in the NuGet. Storage is always a platform decision.
| Component | What It Is |
|---|---|
| \IAIEnvelopeVault<TAgenticContext>\ | Storage contract — \PersistAsync\ · \QueryAsync\ · \CountAsync\ |
| \AIVaultRecord<TAgenticContext>\ | Sanitised record — pattern fields + typed \TAgenticContext AgenticContext\ |
| \BaseICPEnvelopeSanitiser<TIntent, TAgenticContext>\ | Template method — NuGet extracts pattern fields · platform implements \ExtractAgenticContext\ |
| \InMemoryAIEnvelopeVault<TAgenticContext>\ | Dev/test implementation — zero infra — ships with the NuGet |
| \AIVaultQuery\ | Structured query — GoalOutcome · IntentType · LineageDepth · DateRange · MaxResults |
Installation
dotnet add package DivineTree.ICPVault
For the connection framework (retry, pooling, base storage adapter):
dotnet add package DivineTree.ICPVault.Storage
Quick Start
Step 1 — Define your agentic context (PII-free):
public sealed class LoanAgenticContext
{
public string GoalCategory { get; init; } = string.Empty;
public string RoutingOutcome { get; init; } = string.Empty;
public double ConfidenceScore { get; init; }
public int ReplanCount { get; init; }
public bool HITLTriggered { get; init; }
}
Step 2 — Implement the sanitiser:
public sealed class LoanICPEnvelopeSanitiser
: BaseICPEnvelopeSanitiser<GoalRequest, LoanAgenticContext>
{
protected override LoanAgenticContext ExtractAgenticContext(
ICPEnvelope<GoalRequest> envelope)
{
// Extract PII-free agentic context only
// Never include: user names, goal text containing PII, raw task descriptions
return new LoanAgenticContext
{
GoalCategory = envelope.Intent.Category,
RoutingOutcome = envelope.Context.Properties.GetValueOrDefault("goal_outcome", "UNKNOWN"),
ConfidenceScore = envelope.Context.Properties.TryGetValue("confidence", out var c) ? double.Parse(c) : 0,
ReplanCount = int.TryParse(envelope.Context.Properties.GetValueOrDefault("replan_count", "0"), out var rc) ? rc : 0,
HITLTriggered = envelope.Context.Properties.ContainsKey("hitl_tier")
};
}
}
Step 3 — Persist at agentic run close:
// GoalRouter owns this — never the agents
var sanitiser = new LoanICPEnvelopeSanitiser();
var vaultRecord = sanitiser.Sanitise(envelope);
await _vault.PersistAsync(vaultRecord);
Step 4 — Query the reasoning corpus:
var results = await _vault.QueryAsync(new AIVaultQuery
{
GoalOutcome = "REPLANNED",
MinLineageDepth = 5,
From = DateTime.UtcNow.AddDays(-30),
MaxResults = 100
});
AIVaultRecord Structure
AIVaultRecord<TAgenticContext>
├── Pattern fields (NuGet owns — always present)
│ ├── VaultId — GUID
│ ├── CorrelationId — W3C trace-id
│ ├── GoalId — agentic goal identifier
│ ├── WorkflowId
│ ├── Channel
│ ├── FacadeId
│ ├── SchemaVersion — "1.0"
│ ├── IntentType — class name of TIntent
│ ├── GoalOutcome — COMPLETED · FAILED · REPLANNED · HALTED
│ ├── HaltCode — null unless GoalOutcome is HALTED
│ ├── LineageChain — IReadOnlyList<AIVaultLineageStep> — never empty
│ ├── LineageStepCount — denormalised
│ ├── ReplanCount — number of replanning cycles
│ ├── CreatedAtUtc
│ ├── ClosedAtUtc
│ ├── TotalDuration
│ ├── Observability — AIVaultObservability
│ ├── VaultedAtUtc
│ ├── PlatformVersion
│ └── LinkedDCPVaultId — optional link to DCPVault record
│
└── AgenticContext: TAgenticContext — Platform owns — PII-free by contract
InMemoryAIEnvelopeVault
Ships with the NuGet for dev/test. Zero infrastructure required.
var vault = new InMemoryAIEnvelopeVault<LoanAgenticContext>();
await vault.PersistAsync(record); // idempotent — duplicate GoalId is no-op
var results = await vault.QueryAsync(query);
var count = await vault.CountAsync();
vault.Clear(); // test utility
var all = vault.All; // test utility
PII Boundary — Enforced by Contract
\AIVaultRecord<TAgenticContext>\ carries zero PII. The Intent (TIntent) never enters the vault.
- \BaseICPEnvelopeSanitiser\ extracts only pattern fields from the envelope
- \ExtractAgenticContext\ is the only seam where Intent is accessed
- Your platform is contractually responsible for PII-free AgenticContext
- Goal text, user identifiers, and task descriptions must be redacted before returning AgenticContext
The reasoning trace lives. The PII dies with the envelope.
Cross-Corpus Link
\AIVaultRecord.LinkedDCPVaultId\ is an optional string reference to a \DivineTree.DCPVault\ \VaultRecord.VaultId. The graph edge is resolved at storage query time — not at compile time. Neither NuGet depends on the other.
The Two Vaults
| Vault | Corpus | Training Value |
|---|---|---|
| \DivineTree.DCPVault\ | Domain decisions | Decision patterns · HITL rates · halt frequency |
| \DivineTree.ICPVault\ | Agentic reasoning | Decomposition quality · routing accuracy · replan patterns |
Design Principles
- The vault accumulates reasoning. It never reconstructs it.
- The Intent never enters the vault. PII dies with the envelope.
- The NuGet owns the pattern. The platform owns the agentic context.
- Storage is always a platform decision. Zero storage SDK in the NuGet.
- Lineage is mandatory. An empty lineage chain is a contract violation.
- Vault write failure is non-blocking. Corpus loss is acceptable — goal failure is not.
- Idempotency is guaranteed. Duplicate GoalId is a silent no-op.
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.ICP (>= 1.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DivineTree.ICPVault:
| Package | Downloads |
|---|---|
|
DivineTree.ICPVault.Storage
Connection framework for DivineTree.ICPVault storage implementations. Provides connection lifecycle, retry with exponential backoff, exception translation, and base storage adapter. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 150 | 5/17/2026 |