|
|
| Line 1: |
Line 1: |
| = MindAttic.Vault = | | = MindAttic.Vault — Overview = |
|
| |
|
| One IConfiguration-backed credentials and settings library for .NET 9 and 10: the same wiring reads API keys from a local file store on your laptop and from App Service settings or Azure Key Vault in production.
| | MindAttic.Vault is the one home for keys and settings across every MindAttic app. It has two parts: |
|
| |
|
| [https://github.com/mindattic/MindAttic.Vault/blob/main/MindAttic.Vault/MindAttic.Vault.csproj https://img.shields.io/badge/.NET-9.0%20and%2010.0-512BD4.svg] [https://github.com/mindattic/MindAttic.Vault/blob/main/MindAttic.Vault https://img.shields.io/badge/language-C%23-239120.svg] [https://github.com/mindattic/MindAttic.Vault/blob/main/MindAttic.Vault/MindAttic.Vault.csproj https://img.shields.io/badge/version-9.0.0-blue.svg] [https://github.com/mindattic/MindAttic.Vault/blob/main/MindAttic.Vault.Tests https://img.shields.io/badge/tests-NUnit%204-brightgreen.svg] [https://github.com/mindattic/MindAttic.Vault/blob/main/LICENSE https://img.shields.io/badge/license-MIT-green.svg]
| | * <strong>The <code>MindAttic.Vault</code> library</strong> (<code>net9.0;net10.0</code>, package version 9.0.0, packed to <code>C:\LocalNuGet</code>). It gives every app one <code>IConfiguration</code>-backed pipeline for API keys, broker credentials, tokens and per-app settings, with <code>%APPDATA%\MindAttic</code> as the single local source of truth. |
| | * <strong><code>MindAttic.Vault.Desktop.Wpf</code></strong> (version 1.0.0), the one native app where those keys and settings are edited. Every app's cog opens it at that app's own tab through <code>mindattic-vault://</code> (RFC 0003, "LAMP"). |
|
| |
|
| <pre class="md-code lang-text"> services.AddMindAtticVault(builder.Configuration)
| | It is for the MindAttic apps and their owner: apps read their keys and settings through the library, and the owner edits them in one place instead of a settings screen per app. |
| |
| |
| v
| |
| llm.GetKey("claude") --> LlmCredentialResolver (CompositeCredentialStore)
| |
| |
| |
| +--------------------------+---------------------------+
| |
| | first non-blank value wins |
| |
| v v
| |
| IConfiguration "MindAttic:Vault:LLM:claude:apiKey" LlmCredentialStore
| |
| a. AddAzureKeyVault(...) production %APPDATA%\MindAttic\LLM
| |
| b. AddEnvironmentVariables() App Service, CI providers.json
| |
| c. AddJsonFile("appsettings") public defaults (writable; settings UIs
| |
| d. AddMindAtticVaultFiles() local dev land here)</pre>
| |
| | |
| Get it: the package is <code>MindAttic.Vault</code> (current version 9.0.0, built and packed from this repo; see [[#Building|Building]]).
| |
|
| |
|
| == Why == | | == Why == |
| Line 59: |
Line 46: |
|
| |
|
| Every public type ships XML doc comments (<code>MindAttic.Vault.xml</code> is emitted at build time), so IntelliSense explains behaviour, edge cases and exceptions inline. | | Every public type ships XML doc comments (<code>MindAttic.Vault.xml</code> is emitted at build time), so IntelliSense explains behaviour, edge cases and exceptions inline. |
| | |
| | == Scope == |
| | |
| | * <strong>The complete product:</strong> [[MindAttic.Vault/SPEC|<code>SPEC.md</code>]] lists every epic, feature and story of the finished Vault, built or not, and what is never in it. Every item there is a ticket. |
| | * <strong>The current finish line:</strong> [[MindAttic.Vault/RELEASE|<code>RELEASE.md</code>]], milestone MS-26 "Vault Desktop 1.0, local only": the Azure profile and projects are removed (Azure was decommissioned 2026-11-26, MAT-T297), Vault's own suites pass, and these docs describe the local-only system. After it, MS-93 publishes the package on nuget.org; that is the finished product. |
| | * <strong>How to think about it:</strong> [[MindAttic.Vault/BIBLE|<code>BIBLE.md</code>]] holds the laws, the architecture and the glossary. |
| | |
| | Until the Azure removal lands, the repo still carries <code>MindAttic.Vault.Desktop.Azure</code>, its tests and an Azure profile in Vault.Desktop; none of it has anything to connect to. <code>MindAttic.Vault.Dashboard</code> (the old LLM health monitor) is not part of the product. |
| | |
| | == How the library resolves a key == |
| | |
| | <pre class="md-code lang-text">services.AddMindAtticVault(builder.Configuration) |
| | llm.GetKey("claude") --> LlmCredentialResolver |
| | 1. IConfiguration MindAttic:Vault:LLM:claude:apiKey (environment variables, appsettings, |
| | AddMindAtticVaultFiles()) |
| | 2. LlmCredentialStore %APPDATA%\MindAttic\LLM\providers.json (writable) |
| | 3. null</pre> |
| | |
| | The first non-blank value wins. Writes go to the file store only; a configuration-backed store throws on write. |
|
| |
|
| == Quick start == | | == Quick start == |
|
| |
|
| Prerequisites: the .NET 9 or .NET 10 SDK and a reference to the <code>MindAttic.Vault</code> package (see [[#Building|Building]] to pack it yourself). | | Prerequisites: the .NET 9 or .NET 10 SDK and a reference to the <code>MindAttic.Vault</code> package (see [[#Build, run and deploy|Build, run and deploy]] to pack it yourself). |
|
| |
|
| <pre class="md-code lang-csharp">// Program.cs | | <pre class="md-code lang-csharp">// Program.cs |
| Line 104: |
Line 110: |
| <code>FtpCredentialStore.Default.TryGetJson()</code> returns the exact flat JSON blob that MindAttic.Deploy's <code>MINDATTIC_FTP_JSON</code> environment variable expects, with no reshaping at the call site. | | <code>FtpCredentialStore.Default.TryGetJson()</code> returns the exact flat JSON blob that MindAttic.Deploy's <code>MINDATTIC_FTP_JSON</code> environment variable expects, with no reshaping at the call site. |
|
| |
|
| == Configuration schema == | | == Buckets on disk == |
| | |
| Every source (appsettings.json, the local APPDATA store, environment variables, App Service Application Settings, Azure Key Vault) surfaces the same shape under <code>MindAttic:Vault</code>:
| |
| | |
| <pre class="md-code lang-json">{
| |
| "MindAttic": {
| |
| "Vault": {
| |
| "LLM": {
| |
| "claude": { "type": "anthropic", "apiKey": "sk-ant-...", "model": "claude-sonnet-4-6", "maxTokens": 8192 },
| |
| "gemini": { "type": "google", "apiKey": "AIza..." },
| |
| "grok": { "type": "bearer", "apiKey": "xai-..." }
| |
| },
| |
| "Brokers": {
| |
| "alpaca-paper": { "type": "alpaca", "apiKey": "PK...", "secret": "...", "baseUrl": "https://paper-api.alpaca.markets" },
| |
| "alpaca-live": { "type": "alpaca", "apiKey": "AK...", "secret": "...", "baseUrl": "https://api.alpaca.markets" }
| |
| },
| |
| "Tokens": {
| |
| "github": "ghp_...",
| |
| "usps": "USPS-..."
| |
| }
| |
| }
| |
| }
| |
| }</pre>
| |
| | |
| How that schema appears in each source:
| |
| | |
| {| class="wikitable"
| |
| ! Source
| |
| ! What you set
| |
| ! Notes
| |
| |-
| |
| | appsettings.json
| |
| | The nested object above
| |
| | Use <code>appsettings.Development.json</code> for non-secret dev overrides; never check secrets into git.
| |
| |-
| |
| | Local dev (APPDATA)
| |
| | <code>%APPDATA%\MindAttic\LLM\providers.json</code> (folder equals section)
| |
| | The single local source of truth, surfaced through <code>IConfiguration</code> by <code>AddMindAtticVaultFiles()</code>.
| |
| |-
| |
| | Environment variables
| |
| | <code>MindAttic__Vault__LLM__claude__apiKey=sk-ant-...</code>
| |
| | Standard double-underscore to colon translation. App Service Application Settings arrive this way.
| |
| |-
| |
| | Azure Key Vault
| |
| | Secret named <code>MindAttic--Vault--LLM--claude--apiKey</code>
| |
| | The default <code>KeyVaultSecretManager</code> translates double-dash to colon.
| |
| |-
| |
| | App Service Key Vault references
| |
| | App Setting value <code>@Microsoft.KeyVault(SecretUri=...)</code>
| |
| | App Service resolves the reference into a plain environment variable before the app sees it.
| |
| |}
| |
| | |
| === Canonical buckets === | |
| | |
| MindAttic projects do not use User Secrets ([[MindAttic.Vault/BIBLE|M.VALT-LAW-3]]). It would duplicate the writable APPDATA store and, because <code>AddUserSecrets</code> ranks above <code>AddMindAtticVaultFiles</code>, a stale value could silently mask a freshly rotated key on disk. Do not add <code>AddUserSecrets(...)</code> or <code><UserSecretsId></code> to MindAttic projects. Production stays on environment variables and Key Vault.
| |
|
| |
|
| The on-disk layout follows one invariant: folder name equals config section equals <code>MindAttic:Vault:<Bucket></code>, and each file is a faithful image of its config subtree. | | The folder name under <code>%APPDATA%\MindAttic\</code> equals the config section <code>MindAttic:Vault:<Bucket></code>. |
|
| |
|
| {| class="wikitable" | | {| class="wikitable" |
| ! Bucket folder | | ! Bucket |
| ! File | | ! File |
| ! Shape | | ! Shape |
| Line 169: |
Line 121: |
| | <code>LLM</code> | | | <code>LLM</code> |
| | <code>providers.json</code> | | | <code>providers.json</code> |
| | <code>{ id: { type, apiKey, model, maxTokens } }</code> | | | <code>{ id: { type, apiKey, apiKeys?, model, maxTokens } }</code> |
| |- | | |- |
| | <code>Brokers</code> | | | <code>Brokers</code> |
| Line 177: |
Line 129: |
| | <code>Tokens</code> | | | <code>Tokens</code> |
| | <code>tokens.json</code> | | | <code>tokens.json</code> |
| | <code>{ github: "...", "nuget-org": "..." }</code> (flat) | | | <code>{ github: "<TOKEN>", ... }</code> (flat) |
| |- | | |- |
| | <code>Subtitles</code> | | | <code>Subtitles</code> |
| Line 185: |
Line 137: |
| | <code>Notifications</code> | | | <code>Notifications</code> |
| | <code>providers.json</code> | | | <code>providers.json</code> |
| | <code>{ email:{ smtpHost, smtpPort, username, password, from }, toEmail:"..." }</code> | | | <code>{ email: { smtpHost, smtpPort, username, password, from }, toEmail }</code> |
| |- | | |- |
| | <code>AudioStore</code> | | | <code>AudioStore</code> |
| Line 193: |
Line 145: |
| | <code>Ftp</code> | | | <code>Ftp</code> |
| | <code>ftp.json</code> | | | <code>ftp.json</code> |
| | <code>{ host, port, user, password, secure, servername }</code> (flat, single record) | | | <code>{ host, port, user, password, secure, servername }</code> (file-only, not projected) |
| |} | | |} |
|
| |
|
| <code>MindAtticConfigurationSource</code> scans every bucket except <code>Ftp</code> by default and flattens each file (nested objects, arrays and top-level scalars) into <code>IConfiguration</code>. <code>Ftp</code> is a deliberate exception: it is a deploy-time credential for MindAttic.Deploy, never something App Service or Key Vault needs to surface, so it stays a file-only store (<code>FtpCredentialStore</code>). Pass <code>Buckets</code> explicitly to include it.
| | Per-app settings live in <code>%APPDATA%\MindAttic\<app>\settings.json</code> (roaming) or <code>%LOCALAPPDATA%\MindAttic\<app>\</code> (per-machine apps). Shared values every app reaches live on the Global tab. |
| | |
| === Source precedence ===
| |
| | |
| With the recommended wiring, <code>GetKey("claude")</code> walks:
| |
| | |
| <pre class="md-code lang-text">1. Explicit DI registration (e.g. services.AddSingleton(myMockedStore))
| |
| 2. IConfiguration (highest-priority source among):
| |
| a. AddAzureKeyVault(...) <- prod, when you wire it directly
| |
| b. AddEnvironmentVariables() <- App Service, containers, CI
| |
| c. AddJsonFile("appsettings.json") <- non-secret defaults / public config
| |
| d. AddMindAtticVaultFiles() <- %APPDATA%\MindAttic (single local source of truth)
| |
| 3. LlmCredentialStore (file fallback) <- writable; settings UI lands here
| |
| 4. return null</pre>
| |
| | |
| Any non-null trimmed value short-circuits the chain. <code>KeyResolver</code> exposes the same primitives so non-DI code can compose the chain by hand.
| |
|
| |
|
| === Settings versus credentials === | | == Configuration == |
|
| |
|
| {| class="wikitable" | | {| class="wikitable" |
| ! What | | ! Variable |
| ! Where | | ! Default |
| ! Roaming | | ! Meaning |
| ! Why
| |
| |-
| |
| | API keys and secrets (local dev)
| |
| | <code>%APPDATA%\MindAttic\<Bucket>\</code>
| |
| | yes
| |
| | Single local source of truth, surfaced through <code>IConfiguration</code>.
| |
| |- | | |- |
| | API keys and secrets (prod)
| | | <code>MINDATTIC_VAULT_ROAMING_ROOT</code> |
| | <code>IConfiguration</code> (App Service settings, Key Vault) | | | <code>%APPDATA%\MindAttic</code> (platform equivalent elsewhere) |
| | n/a
| | | Overrides the roaming root |
| | Cloud-native standard; never written by app code in prod.
| |
| |-
| |
| | Per-app preferences (theme, layout, last opened file)
| |
| | <code>%APPDATA%\MindAttic\<app>\settings.json</code> | |
| | yes
| |
| | Follows the user across machines; not a secret.
| |
| |-
| |
| | Per-machine caches and data (SQL data, evidence files, large blobs)
| |
| | <code>%LOCALAPPDATA%\MindAttic\<app>\</code> | |
| | no
| |
| | Big, machine-specific, not worth roaming.
| |
| |}
| |
| | |
| == Deployment ==
| |
| | |
| === Azure App Service ===
| |
| | |
| In the Azure portal, open Configuration, then Application settings, and add:
| |
| | |
| {| class="wikitable"
| |
| ! Name
| |
| ! Value
| |
| |- | | |- |
| | <code>MindAttic__Vault__LLM__claude__apiKey</code> | | | <code>MINDATTIC_VAULT_LOCAL_ROOT</code> |
| | <code>sk-ant-...</code> | | | <code>%LOCALAPPDATA%\MindAttic</code> |
| | | Overrides the per-machine root |
| |- | | |- |
| | <code>MindAttic__Vault__LLM__claude__model</code> | | | <code>MINDATTIC_LLM_CREDENTIALS</code> |
| | <code>claude-sonnet-4-6</code> | | | <code><roaming>\LLM</code> |
| | | Overrides the LLM bucket folder (tests) |
| |- | | |- |
| | <code>MindAttic__Vault__Brokers__alpaca-paper__apiKey</code> | | | <code>MINDATTIC_BROKER_CREDENTIALS</code> |
| | <code>PK...</code> | | | <code><roaming>\Brokers</code> |
| | | Overrides the Brokers bucket folder (tests) |
| |- | | |- |
| | <code>MindAttic__Vault__Brokers__alpaca-paper__secret</code> | | | <code>MINDATTIC_FTP_CREDENTIALS</code> |
| | <code>S...</code> | | | <code><roaming>\Ftp</code> |
| | | Overrides the FTP bucket folder (tests) |
| |} | | |} |
|
| |
|
| App Service injects them as environment variables; <code>AddEnvironmentVariables()</code> converts the separators and the values flow into Vault unchanged. No code change from the local-dev wiring.
| | Environment variables in the standard form (<code>MindAttic__Vault__LLM__claude__apiKey=<YOUR_API_KEY></code>) are read through <code>IConfiguration</code> like any other source. |
| | |
| To use an App Service Key Vault reference, set the Application Setting value to:
| |
| | |
| <pre class="md-code lang-text">@Microsoft.KeyVault(SecretUri=https://my-vault.vault.azure.net/secrets/MindAttic--Vault--LLM--claude--apiKey)</pre>
| |
| | |
| App Service resolves the reference and surfaces the secret as a plain environment variable. Vault never knows Key Vault is involved.
| |
| | |
| === Azure Container Apps, AKS, or anywhere with Key Vault ===
| |
| | |
| To talk to Key Vault directly (not on App Service, or you want secrets to refresh without a restart):
| |
| | |
| <pre class="md-code lang-csharp">// Add the Azure SDK packages your host needs:
| |
| // Azure.Extensions.AspNetCore.Configuration.Secrets
| |
| // Azure.Identity
| |
| | |
| builder.Configuration
| |
| .AddJsonFile("appsettings.json", optional: true)
| |
| .AddMindAtticVaultFiles()
| |
| .AddEnvironmentVariables()
| |
| .AddAzureKeyVault(
| |
| new Uri("https://my-vault.vault.azure.net"),
| |
| new DefaultAzureCredential());
| |
| | |
| builder.Services.AddMindAtticVault(builder.Configuration);</pre>
| |
| | |
| Name secrets with <code>--</code> as the section separator, for example <code>MindAttic--Vault--LLM--claude--apiKey</code>. There is no custom code in Vault for this; the [[#LLM health dashboard|LLM health dashboard]] in this repo is a working example of the pattern.
| |
| | |
| === Rotating a secret ===
| |
| | |
| * Dev: edit <code>%APPDATA%\MindAttic\LLM\providers.json</code> or call <code>LlmCredentialStore.Default.SetKey("claude", "new-key")</code>. Nothing ranks above it locally, so the new value takes effect immediately.
| |
| * Prod (App Service): edit the Application Setting in the portal and restart the app slot.
| |
| * Prod (Key Vault): create a new secret version. App Service Key Vault references re-resolve on restart; direct <code>AddAzureKeyVault(...)</code> calls reload on the cadence you configured.
| |
| | |
| == API ==
| |
| | |
| === Package contents ===
| |
| | |
| <pre class="md-code lang-text">MindAttic.Vault
| |
| ├── Configuration/
| |
| │ ├── VaultConfigurationKeys # Schema constants ("MindAttic:Vault:LLM" etc.)
| |
| │ ├── MindAtticConfigurationSource # IConfigurationSource over %APPDATA%\MindAttic\*
| |
| │ ├── MindAtticConfigurationProvider # The provider impl (internal)
| |
| │ └── ConfigurationBuilderExtensions # builder.AddMindAtticVaultFiles()
| |
| ├── Credentials/
| |
| │ ├── ICredentialStore # The contract (read + write)
| |
| │ ├── IRotatingKeyStore # Optional key-pool capability (CredentialPoolEntry)
| |
| │ ├── CredentialStore # Generic 3-tier file store
| |
| │ ├── LlmCredentialStore # File store at %APPDATA%\MindAttic\LLM
| |
| │ ├── BrokerCredentialStore # File store at %APPDATA%\MindAttic\Brokers
| |
| │ ├── FtpCredentialStore # File store at %APPDATA%\MindAttic\Ftp (flat, single record)
| |
| │ ├── TokenStore # Single-secret bucket (GitHub, USPS, ...)
| |
| │ ├── ConfigurationCredentialStore # IConfiguration-backed read view (cloud-native)
| |
| │ ├── CompositeCredentialStore # Chains stores; first non-null wins
| |
| │ ├── AppScopedCredentialStore # Namespaces provider ids under "{appId}-"
| |
| │ ├── LlmCredentialResolver # Composite(Config -> File) for LLM
| |
| │ └── BrokerCredentialResolver # Composite(Config -> File) for Brokers
| |
| ├── DependencyInjection/
| |
| │ └── ServiceCollectionExtensions # AddMindAtticVault() / AddMindAtticVault(IConfiguration)
| |
| ├── Paths/
| |
| │ ├── VaultPaths # %APPDATA%\MindAttic + %LOCALAPPDATA%\MindAttic helpers
| |
| │ └── EnvironmentOverlay # Apply/ApplyAll for env-var overlays
| |
| ├── Resolution/
| |
| │ └── KeyResolver # Chained resolver builder
| |
| └── Settings/
| |
| └── JsonSettingsStore<T> # Generic Load/Save/Update for per-app JSON config</pre>
| |
| | |
| This section covers the shape of the surface; the XML docs are the line-level reference.
| |
| | |
| === VaultConfigurationKeys ===
| |
| | |
| Namespace <code>MindAttic.Vault.Configuration</code>. Schema constants; use these instead of hard-coded strings.
| |
| | |
| <pre class="md-code lang-csharp">VaultConfigurationKeys.RootSection; // "MindAttic"
| |
| VaultConfigurationKeys.VaultSection; // "MindAttic:Vault"
| |
| VaultConfigurationKeys.LlmSection; // "MindAttic:Vault:LLM"
| |
| VaultConfigurationKeys.BrokersSection; // "MindAttic:Vault:Brokers"
| |
| VaultConfigurationKeys.TokensSection; // "MindAttic:Vault:Tokens"
| |
| VaultConfigurationKeys.SubtitlesSection; // "MindAttic:Vault:Subtitles"
| |
| VaultConfigurationKeys.NotificationsSection; // "MindAttic:Vault:Notifications"
| |
| VaultConfigurationKeys.AudioStoreSection; // "MindAttic:Vault:AudioStore"</pre>
| |
| | |
| <code>ProviderSection(bucketSection, providerId)</code> and <code>ProviderApiKeyPath(bucketSection, providerId)</code> build the colon-delimited path to a provider's section or its <code>apiKey</code> leaf (for example <code>MindAttic:Vault:LLM:claude:apiKey</code>). Both throw <code>ArgumentException</code> on null or whitespace.
| |
| | |
| === MindAtticConfigurationSource ===
| |
| | |
| Namespace <code>MindAttic.Vault.Configuration</code>. An <code>IConfigurationSource</code> that adapts the APPDATA bucket files into the standard schema:
| |
| | |
| <pre class="md-code lang-csharp">builder.Configuration.AddMindAtticVaultFiles(opt =>
| |
| {
| |
| opt.Buckets = new[] { "LLM", "Brokers", "Tokens" }; // optional narrow/override
| |
| opt.RoamingRoot = "/some/test/path"; // optional override (tests)
| |
| opt.ReloadOnChange = true; // file watching
| |
| });</pre>
| |
| | |
| === LlmCredentialResolver and BrokerCredentialResolver ===
| |
| | |
| Namespace <code>MindAttic.Vault.Credentials</code>. Cloud-native composites; inject these from new code.
| |
| | |
| <pre class="md-code lang-csharp">public class MyService(LlmCredentialResolver llm)
| |
| {
| |
| public string? Claude => llm.GetKey("claude");
| |
| }</pre>
| |
| | |
| Reads walk <code>IConfiguration</code>, then the file fallback, then null. Writes go to the file fallback only.
| |
| | |
| === LlmCredentialStore, BrokerCredentialStore and FtpCredentialStore ===
| |
| | |
| Namespace <code>MindAttic.Vault.Credentials</code>. File-only stores under <code>%APPDATA%\MindAttic\<bucket>\</code>. <code>LlmCredentialStore</code> and <code>BrokerCredentialStore</code> replace the legacy <code>MindAttic.Legion.MindAtticCredentialStore</code> and <code>IdiotProof.Engine.Settings.BrokerCredentialStore</code>. <code>FtpCredentialStore</code> is a single flat record at <code>Ftp\ftp.json</code>, deliberately excluded from <code>IConfiguration</code> projection.
| |
| | |
| All three implement <code>ICredentialStore</code>: <code>GetKey</code> and <code>SetKey</code>, <code>LoadAll</code> and <code>LoadAllRaw</code>, <code>ListProviders</code>, <code>SaveAllRaw</code> and <code>SaveRaw</code>, plus a <code>Default</code> singleton whose directory can be overridden for tests with <code>MINDATTIC_LLM_CREDENTIALS</code>, <code>MINDATTIC_BROKER_CREDENTIALS</code> or <code>MINDATTIC_FTP_CREDENTIALS</code>.
| |
| | |
| === ConfigurationCredentialStore ===
| |
| | |
| Namespace <code>MindAttic.Vault.Credentials</code>. A read-only <code>ICredentialStore</code> over a fixed configuration section:
| |
| | |
| <pre class="md-code lang-csharp">ConfigurationCredentialStore.ForLlm(builder.Configuration); // MindAttic:Vault:LLM
| |
| ConfigurationCredentialStore.ForBrokers(builder.Configuration); // MindAttic:Vault:Brokers
| |
| new ConfigurationCredentialStore(cfg, "MyApp:Custom:Bucket"); // arbitrary path</pre>
| |
| | |
| Every write method (<code>SetKey</code>, <code>SaveAllRaw</code>, <code>SaveRaw</code>) throws <code>NotSupportedException</code>. This is the type that enforces read-only production.
| |
| | |
| === CompositeCredentialStore ===
| |
| | |
| Namespace <code>MindAttic.Vault.Credentials</code>. Chains any number of stores. Reads walk in order; writes target the first writable store. Both resolvers are subclasses with two preset stores. It also implements <code>IRotatingKeyStore</code>, reading pools from the first store that has one and writing pools to the writable store.
| |
| | |
| === AppScopedCredentialStore ===
| |
| | |
| Namespace <code>MindAttic.Vault.Credentials</code>. The bring-your-own-key pattern every LLM-consuming MindAttic app shares: each app keeps its own key for a provider, so testing a key in one app never changes what another app resolves, and falls back to the shared id when it has none. Compose it in front of the shared store:
| |
| | |
| <pre class="md-code lang-csharp">var keys = new CompositeCredentialStore(
| |
| new AppScopedCredentialStore("automata", LlmCredentialStore.Default),
| |
| LlmCredentialStore.Default); // or LlmCredentialResolver for cloud-native reads
| |
| | |
| keys.GetKey("claude"); // "automata-claude" if set, else the shared "claude"
| |
| keys.SetKey("claude", "sk-..."); // always writes "automata-claude", never the shared entry</pre>
| |
| | |
| <code>LoadAll</code>, <code>ListProviders</code> and <code>LoadAllRaw</code> on the scoped instance surface only that app's own prefixed entries (prefix stripped). <code>SaveAllRaw</code> is a read-modify-write that replaces only those entries, leaving every other app's entries in the same file untouched. It replaces the one-off provider-id helpers each consumer used to hand-roll.
| |
| | |
| === IRotatingKeyStore ===
| |
| | |
| Namespace <code>MindAttic.Vault.Credentials</code>. An optional capability for stores that hold more than one key per provider. <code>GetKeys(providerId)</code> returns <code>CredentialPoolEntry(Key, Label)</code> records in priority order; <code>SetKeys(providerId, keys)</code> replaces the pool while preserving the provider's other fields. The first entry is always mirrored to the plain <code>apiKey</code> field, and a provider with exactly one key never gains an <code>apiKeys</code> array on disk. Implemented by <code>CredentialStore</code>, <code>CompositeCredentialStore</code> and <code>AppScopedCredentialStore</code>; read-only stores do not implement it.
| |
| | |
| === TokenStore ===
| |
| | |
| Namespace <code>MindAttic.Vault.Credentials</code>. A single-secret bucket for tokens that need no provider, key and secret triplet:
| |
| | |
| <pre class="md-code lang-csharp">var github = TokenStore.ForBucket("Tokens").Get("github");
| |
| TokenStore.ForBucket("Tokens").Set("github", "ghp_...");
| |
| TokenStore.ForBucket("Tokens").Remove("github");</pre>
| |
| | |
| === JsonSettingsStore ===
| |
| | |
| Namespace <code>MindAttic.Vault.Settings</code>. Per-app JSON settings, roaming under <code>%APPDATA%\MindAttic\<app>\settings.json</code> by default:
| |
| | |
| <pre class="md-code lang-csharp">var store = JsonSettingsStore<MySettings>.ForApp("MyApp");
| |
| var s = store.Load();
| |
| store.Save(s);
| |
| store.Update(s => s.Theme = "dark");
| |
| | |
| // For non-roaming local data (caches, evidence files, sql data):
| |
| JsonSettingsStore<MyData>.ForLocalApp("MyApp");</pre>
| |
| | |
| Writes are atomic (<code>.tmp</code> plus <code>File.Replace</code> with a <code>.bak</code> retained) and serialized under a per-instance <code>SemaphoreSlim</code>, so concurrent <code>Save</code> and <code>Update</code> calls in one process never tear the file. <code>LoadAsync</code>, <code>SaveAsync</code> and <code>UpdateAsync</code> mirror the sync API with <code>CancellationToken</code> support. Reads degrade to <code>new T()</code> on a missing or malformed file; a settings load never throws.
| |
| | |
| <code>Load()</code> keeps that never-throws contract, so a caller that loads, changes and then saves the whole object can overwrite saved settings with defaults when the file was briefly locked or unreadable. Such callers should use the strict API instead (or <code>Update</code>, which already refuses an unreadable file):
| |
| | |
| <pre class="md-code lang-csharp">var s = store.LoadStrict(); // throws IOException / UnauthorizedAccessException / InvalidDataException
| |
| if (store.TryLoad(out var t)) store.Save(t); // false: saved settings exist but can't be read, so don't save</pre>
| |
| | |
| Both return <code>new T()</code> only when nothing is saved yet (missing or blank file).
| |
| | |
| === VaultPaths ===
| |
| | |
| Namespace <code>MindAttic.Vault.Paths</code>.
| |
| | |
| <pre class="md-code lang-csharp">VaultPaths.RoamingRoot; // %APPDATA%\MindAttic
| |
| VaultPaths.LocalRoot; // %LOCALAPPDATA%\MindAttic
| |
| VaultPaths.RoamingBucket("LLM"); // %APPDATA%\MindAttic\LLM
| |
| VaultPaths.LocalApp("Prose"); // %LOCALAPPDATA%\MindAttic\Prose
| |
| VaultPaths.Ensure(path); // mkdir -p</pre>
| |
| | |
| Override either root for tests with <code>MINDATTIC_VAULT_ROAMING_ROOT</code> or <code>MINDATTIC_VAULT_LOCAL_ROOT</code>. On non-Windows hosts the same properties resolve through the standard <code>Environment.SpecialFolder</code> lookup (for example <code>~/.config/MindAttic</code>), and root resolution never throws ([[MindAttic.Vault/BIBLE|M.VALT-LAW-7]]).
| |
| | |
| === EnvironmentOverlay ===
| |
| | |
| Namespace <code>MindAttic.Vault.Paths</code>.
| |
| | |
| <pre class="md-code lang-csharp">EnvironmentOverlay.Apply("MY_KEY", v => settings.Key = v);
| |
| EnvironmentOverlay.ApplyAll(new (string, Action<string>)[]
| |
| {
| |
| ("CLAUDE_API_KEY", v => s.ClaudeApiKey = v),
| |
| ("ALPACA_KEY_ID", v => s.AlpacaKeyId = v),
| |
| });</pre>
| |
| | |
| === KeyResolver ===
| |
| | |
| Namespace <code>MindAttic.Vault.Resolution</code>.
| |
| | |
| <pre class="md-code lang-csharp">var resolver = KeyResolver
| |
| .From(KeyResolver.Explicit("claude", explicitKey)) // DI override
| |
| .Then(KeyResolver.FromConfiguration(cfg, VaultConfigurationKeys.LlmSection))
| |
| .Then(KeyResolver.EnvByConvention()) // CLAUDE_API_KEY
| |
| .Then(KeyResolver.FromStore(LlmCredentialStore.Default)); // file fallback
| |
| | |
| var key = resolver.Resolve("claude");</pre>
| |
| | |
| === ServiceCollectionExtensions ===
| |
| | |
| Namespace <code>MindAttic.Vault.DependencyInjection</code>.
| |
| | |
| <pre class="md-code lang-csharp">services.AddMindAtticVault(); // file-only stores (console/desktop, no IConfiguration)
| |
| services.AddMindAtticVault(builder.Configuration); // cloud-native: Composite(Config -> File)
| |
| services.AddVaultAppSettings<MySettings>("MyApp"); // roaming JsonSettingsStore<T></pre>
| |
| | |
| <code>AddMindAtticVault()</code> registers the file-backed <code>LlmCredentialStore</code> and <code>BrokerCredentialStore</code> singletons and an <code>ICredentialStore</code> defaulting to LLM. <code>AddMindAtticVault(IConfiguration)</code> also registers the two resolvers. Inject the resolvers from new code, and the concrete stores only when legacy code needs the literal file path.
| |
| | |
| == How sibling repos consume Vault ==
| |
| | |
| Fifteen MindAttic repos reference the package: Automata, IdiotProof, JobHunt, MediaButler, MindAttic.Authentication, MindAttic.Deploy, MindAttic.Ideas, MindAttic.Launcher, MindAttic.Legion, MindAttic.Psst, OpenCredentials, Prose, TaxRateCollector, ThinkTank and Tutor. Two patterns cover most of them.
| |
| | |
| File-only credential lookup, for a console host with no DI. MindAttic.Launcher pushes an agent CLI's API key into a child process's environment just before launch, treating a missing entry as a no-op:
| |
| | |
| <pre class="md-code lang-csharp">using MindAttic.Vault.Credentials;
| |
| | |
| public static class ProviderCredentials
| |
| {
| |
| public static void Apply(ProcessStartInfo psi, string providerKey, ICredentialStore? store = null)
| |
| {
| |
| var key = (store ?? LlmCredentialStore.Default).GetKey(providerKey);
| |
| if (string.IsNullOrWhiteSpace(key)) return;
| |
| psi.Environment["GEMINI_API_KEY"] = key; // (per-provider mapping in the real file)
| |
| }
| |
| }</pre>
| |
| | |
| Per-app settings through <code>JsonSettingsStore<T></code>. The launcher's settings land at <code>%APPDATA%\MindAttic\MindAttic.Launcher\settings.json</code>, seeded once from a legacy file if the Vault-managed file does not exist yet:
| |
|
| |
|
| <pre class="md-code lang-csharp">public sealed class SettingsStore
| | == Build, run and deploy == |
| {
| |
| public const string AppBucket = "MindAttic.Launcher";
| |
| private readonly JsonSettingsStore<AppSettings> store;
| |
|
| |
|
| public SettingsStore() : this(JsonSettingsStore<AppSettings>.ForApp(AppBucket), DefaultLegacySettingsPath) { }
| | <pre class="md-code lang-powershell">cd D:\Projects\MindAttic\MindAttic.Vault |
| | |
| public AppSettings Load()
| |
| {
| |
| if (!store.Exists()) SeedFromLegacyIfPresent();
| |
| return store.Load();
| |
| }
| |
| | |
| public void Save(AppSettings settings) => store.Save(settings);
| |
| public AppSettings Update(Action<AppSettings> mutate) => store.Update(mutate);
| |
| }</pre>
| |
| | |
| Reach for the resolvers instead when the host is a web or worker app with a real <code>IConfiguration</code>.
| |
| | |
| === Consumers ===
| |
| | |
| Workspace projects that reference the package today (pinned version in brackets): Automata (5.0.0), Tutor (5.0.0), JobHunt (5.0.0), MindAttic.Legion (5.0.0), IdiotProof (4.0.0), MediaButler (4.0.0), Prose (4.0.0), TaxRateCollector (4.0.0), ThinkTank (4.0.0), MindAttic.Ideas (3.0.0), MindAttic.Deploy (2.0.0), MindAttic.Authentication (1.0.0), MindAttic.Launcher (1.0.0), MindAttic.Psst (1.0.0) and OpenCredentials (1.0.0). MindAttic.Mobile references the project source directly.
| |
| | |
| == LLM health dashboard ==
| |
| | |
| <code>MindAttic.Vault.Dashboard</code> is a standalone Blazor Server app (<code>net10.0</code>) that answers a question Vault itself cannot: are the LLM keys still good? A key can be revoked, run out of quota, or point at a deprecated model. The dashboard probes every keyed provider on a schedule and renders a traffic-light health view.
| |
| | |
| It is in progress (see [[MindAttic.Vault/rfc/0001-llm-health-dashboard|RFC 0001]] and Epic D in the [https://github.com/mindattic/MindAttic.Vault/blob/main/docs/USER_STORIES.md user stories]). It is not in <code>MindAttic.Vault.slnx</code>, has no dedicated test project, is not built by the normal <code>dotnet build</code> and <code>dotnet test</code> commands, and is never part of the published package.
| |
| | |
| * Dependencies: the <code>MindAttic.Vault</code> library in this repo (a project reference, so the dashboard always builds against the current source), <code>MindAttic.Legion 26.0.0</code> (probing, diagnosis, live model discovery), <code>Azure.Identity</code> and <code>Azure.Extensions.AspNetCore.Configuration.Secrets</code>. It is the only place in this repo the Azure packages appear.
| |
| * Credentials: reads <code>AddMindAtticVaultFiles()</code> and environment variables, and adds Key Vault through managed identity when <code>MindAttic:Vault:KeyVaultUri</code> is set.
| |
| * Statuses: <code>Unknown</code>, <code>Healthy</code> (green), <code>Degraded</code> (amber: authenticated but drifted, or self-healed this sweep), <code>Down</code> (red: unreachable, key rejected, quota, or deprecated model).
| |
| * Options (<code>Monitor</code> config section): sweep <code>Interval</code> (default hourly), <code>ProbeTimeout</code> (default 30 seconds), <code>TrustedProviders</code> (<code>claude</code>, <code>openai</code>, <code>gemini</code>, <code>deepseek</code>), <code>MonitorAllKeyed</code>, <code>SelfHealModels</code>, and webhook or email alert targets.
| |
| * Services: <code>LlmHealthMonitor</code> probes, <code>HealthMonitorStore</code> holds the latest snapshot per provider, <code>MonitorBackgroundService</code> drives the sweep, <code>SelfHealer</code> repoints deprecated model ids, <code>AlertDispatcher</code> sends notifications on state change.
| |
| * UI: a verdict banner ("Trusted panel is ONLINE and queryable" or "DEGRADED") with a manual re-check button, then card grids for the trusted panel and all other keyed providers.
| |
| | |
| <pre class="md-code lang-csharp">builder.Configuration
| |
| .AddMindAtticVaultFiles() // %APPDATA%\MindAttic canonical files (dev)
| |
| .AddEnvironmentVariables(); // App Service Application Settings
| |
| | |
| var keyVaultUri = builder.Configuration["MindAttic:Vault:KeyVaultUri"];
| |
| if (!string.IsNullOrWhiteSpace(keyVaultUri))
| |
| builder.Configuration.AddAzureKeyVault(new Uri(keyVaultUri), new DefaultAzureCredential());
| |
| | |
| MindAtticCredentialStore.UseConfiguration(builder.Configuration); // hands config to Legion's probes</pre>
| |
| | |
| Run it locally:
| |
| | |
| <pre class="md-code lang-powershell">cd MindAttic.Vault.Dashboard | |
| dotnet run
| |
| # https://localhost:7242 or http://localhost:5242 (see Properties/launchSettings.json)</pre>
| |
| | |
| Leave <code>MindAttic:Vault:KeyVaultUri</code> empty in <code>appsettings.json</code> to use the local LLM bucket file; set it to a Key Vault URI to probe through managed identity.
| |
| | |
| == Project layout ==
| |
| | |
| <pre class="md-code lang-text">MindAttic.Vault/ (repo root)
| |
| ├── MindAttic.Vault/ The published library (net9.0;net10.0, PackageId MindAttic.Vault)
| |
| ├── MindAttic.Vault.Tests/ NUnit 4 suite (net10.0), one fixture per public type
| |
| │ └── TempDirectory.cs Self-cleaning temp dir for file-store tests
| |
| ├── MindAttic.Vault.Dashboard/ Blazor Server LLM health monitor (not in the solution, not packed)
| |
| │ ├── Components/ Razor pages and layout (Home.razor is the dashboard)
| |
| │ └── Services/ Monitor, store, background service, self-healer, alerts, models
| |
| ├── MindAttic.Vault.slnx Solution: MindAttic.Vault + MindAttic.Vault.Tests only
| |
| ├── docs/ Codex documentation (BIBLE, AMENDMENTS, USER_STORIES, rfc, digest)
| |
| ├── tools/
| |
| │ ├── codex.ps1 Codex CLI: doctor (validate docs) and digest (regenerate)
| |
| │ └── build-readme.ps1 Regenerates README.htm from this file
| |
| ├── nuget.config Package sources: local family feed + nuget.org
| |
| └── LICENSE MIT</pre>
| |
| | |
| == Testing ==
| |
| | |
| The NUnit suite covers every public type, including argument validation, malformed-input handling, atomic writes and the full cloud-native flow:
| |
| | |
| * <code>VaultPaths</code>: environment override, bucket and app combine, <code>Ensure</code>, defaults, constants.
| |
| * <code>EnvironmentOverlay</code>: apply, skip-empty, bulk apply, null tolerance.
| |
| * <code>CredentialStore</code>: three-tier precedence, malformed JSON, atomic write with <code>.bak</code>, sibling field preservation, constructor guards.
| |
| * <code>LlmCredentialStore</code>: type inference (anthropic, google, bearer), model and maxTokens preservation, malformed-file recovery.
| |
| * <code>BrokerCredentialStore</code>: full record I/O, partial-rotate preservation, alpaca type inference, wrong-type-field defence.
| |
| * <code>FtpCredentialStore</code>: flat-record I/O, legacy field-name compatibility, <code>TryGetJson()</code> shape, environment override.
| |
| * <code>TokenStore</code>: read, write, remove, case insensitivity, atomic swap, malformed and empty files.
| |
| * <code>JsonSettingsStore<T></code>: round-trip, defaults on malformed input, <code>Update</code> semantics, factories, custom JSON options.
| |
| * <code>KeyResolver</code>: chaining, surviving a throwing step, every step builder, normalisation, custom suffixes.
| |
| * <code>MindAtticConfigurationSource</code> and provider: file to <code>IConfiguration</code> projection, custom buckets, scalar coercion, arrays, <code>ReloadOnChange</code>, malformed input, root fallback.
| |
| * <code>ConfigurationCredentialStore</code>: read-only contract, schema mapping, raw payload reconstruction.
| |
| * <code>CompositeCredentialStore</code>, <code>AppScopedCredentialStore</code> and key rotation: priority, write targeting, list union, prefix scoping, key pools.
| |
| * <code>ServiceCollectionExtensions</code>, <code>ConfigurationBuilderExtensions</code> and <code>VaultConfigurationKeys</code>: registration, fluent returns, every constant locked down.
| |
| * <code>CloudNativeIntegrationTests</code>: in-memory configuration plus temp file source plus environment overlay, through DI.
| |
| | |
| <pre class="md-code lang-powershell">dotnet test MindAttic.Vault.slnx</pre>
| |
| | |
| No real <code>%APPDATA%</code> is touched: every test redirects through environment variables (<code>MINDATTIC_VAULT_ROAMING_ROOT</code>, <code>MINDATTIC_LLM_CREDENTIALS</code>, <code>MINDATTIC_BROKER_CREDENTIALS</code>, <code>MINDATTIC_FTP_CREDENTIALS</code>) or temp directories.
| |
| | |
| <code>LiveKeyValidationTests</code> (including <code>TrustedPanel_EveryKeyAuthenticatesLive</code>) hits real provider APIs with live keys, so it is marked <code>[Explicit]</code> and skipped by a normal <code>dotnet test</code>. It proves nothing offline.
| |
| | |
| Vault is a class library with no UI, so there is no browser end-to-end suite; consumer projects exercise the credential surface through their own UI tests.
| |
| | |
| == Building ==
| |
| | |
| <pre class="md-code lang-powershell"># Build both target frameworks
| |
| dotnet build MindAttic.Vault.slnx | | dotnet build MindAttic.Vault.slnx |
|
| |
| # Run the full NUnit suite (must be green before packing)
| |
| dotnet test MindAttic.Vault.slnx
| |
|
| |
| # Pack to the local NuGet feed configured in nuget.config
| |
| dotnet pack MindAttic.Vault\MindAttic.Vault.csproj -c Release -o C:\LocalNuGet | | dotnet pack MindAttic.Vault\MindAttic.Vault.csproj -c Release -o C:\LocalNuGet |
| | .\run.ps1</pre> |
|
| |
|
| # Validate the docs/ Codex canon
| | <code>run.ps1</code> is the shared deploy-lib menu: Redeploy builds Vault.Desktop.Wpf Debug and Release to <code>R:\MindAttic\Apps\MindAttic.Vault</code>, and the Release build installs to <code>%LOCALAPPDATA%\MindAttic\Vault.Desktop</code> and registers the <code>mindattic-vault://</code> handler. Vault is not deployed to Azure or Hetzner. |
| powershell -File tools\codex.ps1 doctor
| |
| | |
| # Regenerate docs/BIBLE.digest.md after editing the bible
| |
| powershell -File tools\codex.ps1 digest</pre>
| |
| | |
| * Target frameworks: <code>net9.0</code> and <code>net10.0</code>, multi-targeted so consumers on either get a matching build.
| |
| * Dependencies: <code>Microsoft.Extensions.Configuration</code>, <code>Configuration.Abstractions</code>, <code>Configuration.Binder</code>, <code>DependencyInjection.Abstractions</code>, <code>Logging.Abstractions</code> and <code>Options</code>, all pinned at 9.0.0 for cross-framework compatibility.
| |
| * Versioning: whole-number, major-only (<code>4.0.0</code> to <code>5.0.0</code>, never <code>5.1.0</code>). The csproj <code><Version></code> is authoritative over any prose ([[MindAttic.Vault/BIBLE|M.VALT-§4]]).
| |
| * Release: bump the version whenever the public surface changes, keep <code>dotnet test</code> green, pack, then update each consumer's package reference when that consumer next needs it.
| |
| * nuget.org currently lists only early 0.x versions of the package; current versions are packed to the local family feed.
| |
| | |
| == Limitations ==
| |
| | |
| * The current package is not yet published to nuget.org; consumers outside the MindAttic workspace must pack it from source.
| |
| * Production writes are intentionally unsupported; the composite resolvers send writes to the file fallback, which should be locked down or absent in containers.
| |
| * There is no separate Azure package. Direct Key Vault access is one line of upstream wiring with <code>Azure.Extensions.AspNetCore.Configuration.Secrets</code>.
| |
| * Non-Azure clouds work through any <code>IConfiguration</code> provider (AWS Secrets Manager, GCP Secret Manager community providers), but only the Azure paths are exercised in this repo.
| |
| * The LLM health dashboard is in progress and not a supported package.
| |
| | |
| == Glossary ==
| |
| | |
| * Bucket: a credential category whose folder under <code>%APPDATA%\MindAttic\</code> matches the last segment of its config section (<code>LLM</code>, <code>Brokers</code>, <code>Tokens</code>, <code>Subtitles</code>, <code>Notifications</code>, <code>AudioStore</code>, <code>Ftp</code>).
| |
| * Provider: one keyed entry inside a bucket, such as <code>claude</code> in <code>LLM</code> or <code>alpaca-paper</code> in <code>Brokers</code>.
| |
| * Credential: the resolved secret value for a provider.
| |
| * Source: anything the chain reads from, an <code>IConfigurationSource</code> or a store passed through DI.
| |
| * Store: a concrete <code>ICredentialStore</code>, file-backed, configuration-backed (read-only) or chained.
| |
| * Resolver: a composite preset that chains configuration in front of a file store; what new DI-based code should inject.
| |
| * Setting: a non-secret per-app preference persisted by <code>JsonSettingsStore<T></code>.
| |
| * Roaming versus local: <code>%APPDATA%</code> follows the Windows user across machines; <code>%LOCALAPPDATA%</code> stays on the current machine.
| |
| * Trusted panel: the dashboard's gating provider set whose combined health decides its overall verdict.
| |
| | |
| The authoritative glossary and domain model are in [[MindAttic.Vault/BIBLE|docs/BIBLE.md]].
| |
| | |
| == Documentation ==
| |
| | |
| This repo follows the MindAttic Codex documentation standard: a fact lives in exactly one layer, and other layers link to it by stable ID.
| |
| | |
| * [[MindAttic.Vault/BIBLE|docs/BIBLE.md]]: what Vault is and is not, architecture, the Laws (M.VALT-LAW ids), verified state, glossary.
| |
| * [https://github.com/mindattic/MindAttic.Vault/blob/main/docs/AMENDMENTS.md docs/AMENDMENTS.md]: pending decisions not yet folded into the bible (normally empty).
| |
| * [https://github.com/mindattic/MindAttic.Vault/blob/main/docs/USER_STORIES.md User stories]: each completed one citing the NUnit test that proves it.
| |
| * [https://github.com/mindattic/MindAttic.Vault/tree/main/docs/rfc docs/rfc]: design notes for in-flight work, currently the dashboard RFC.
| |
| * [https://github.com/mindattic/MindAttic.Vault/blob/main/docs/BIBLE.digest.md docs/BIBLE.digest.md]: generated by <code>tools/codex.ps1 digest</code>; never hand-edit.
| |
| * [https://github.com/mindattic/MindAttic.Vault/blob/main/AGENTS.md AGENTS.md]: instructions for coding agents working in this repo.
| |
| | |
| After touching anything in docs, run <code>powershell -File tools\codex.ps1 doctor</code> and keep it exiting 0.
| |
| | |
| == License ==
| |
|
| |
|
| MIT. See [https://github.com/mindattic/MindAttic.Vault/blob/main/LICENSE LICENSE].
| | The pre-commit hook (<code>.githooks/pre-commit</code>) checks the trusted LLM keys live and blocks a code commit while one is dead. A commit that only touches <code>docs/</code>, Markdown or <code>.githooks/</code> skips the check (M.VALT-T218); <code>SKIP_LLM_KEY_CHECK=1</code> remains the offline bypass. |
|
| |
|
| Part of [https://mindattic.com MindAttic] — see more projects at [https://github.com/mindattic github.com/mindattic]. Related: [[MindAttic.Legion|MindAttic.Legion]], [[MindAttic.Launcher|MindAttic.Launcher]], [[MindAttic.Psst|MindAttic.Psst]].
| | The full API reference for the library is in the XML doc comments (<code>MindAttic.Vault.xml</code>) and in the README history before it became a pointer (MAT-T355). |
|
| |
|
| == Pages in this repository == | | == Pages in this repository == |
| * [[MindAttic.Vault/BIBLE|MindAttic.Vault — Project Bible]] — MindAttic.Vault is a cloud-native credentials-and-settings library for .NET that gives every MindAttic host one IConfiguration-backed… | | * [[MindAttic.Vault/BIBLE|MindAttic.Vault — Project Bible]] — MindAttic.Vault is a credentials-and-settings library for .NET that gives every MindAttic host one IConfiguration-backed pipeline for API… |
| * [[MindAttic.Vault/lamp-migration|LAMP app migration playbook]] — How one MindAttic app moves its app-level settings and keys into MindAttic.Vault 7 so that MindAttic.Vault.Desktop.Wpf is the only place… | | * [[MindAttic.Vault/lamp-migration|LAMP app migration playbook]] — How one MindAttic app moves its app-level settings and keys into MindAttic.Vault 7 so that MindAttic.Vault.Desktop.Wpf is the only place… |
| * [[MindAttic.Vault/overview|MindAttic.Vault — Overview]] — MindAttic.Vault is the one home for keys and settings across every MindAttic app. It has two parts:
| |
| * [[MindAttic.Vault/RELEASE|MindAttic.Vault — Release charter]] — The MindAttic.Vault library gives every MindAttic app one IConfiguration-backed home for keys and settings under %APPDATA%\MindAttic.… | | * [[MindAttic.Vault/RELEASE|MindAttic.Vault — Release charter]] — The MindAttic.Vault library gives every MindAttic app one IConfiguration-backed home for keys and settings under %APPDATA%\MindAttic.… |
| * [[MindAttic.Vault/research/llm-provider-catalog|research/llm-provider-catalog]] — Research for Vault's key-and-credit dashboard, 2026-11-30. Ranking source: Artificial Analysis Intelligence Index (fetched 2026-11-30;… | | * [[MindAttic.Vault/research/llm-provider-catalog|research/llm-provider-catalog]] — Research for Vault's key-and-credit dashboard, 2026-11-30. Ranking source: Artificial Analysis Intelligence Index (fetched 2026-11-30;… |