Documentation
¶
Index ¶
Constants ¶
const FingerprintFile = ".vaultmind/fingerprint.txt"
FingerprintFile is the relative path within a vault where the anonymous per-vault identifier lives.
Variables ¶
This section is empty.
Functions ¶
func EnsureFingerprint ¶
EnsureFingerprint returns the vault's anonymous fingerprint, creating it on first call. The fingerprint is a 128-bit random hex string stored at <vaultPath>/.vaultmind/fingerprint.txt. It is NOT derivable from vault content — it's a stable, opaque identifier the federated telemetry pipeline uses to group records by vault without learning anything about the vault's contents or the user's filesystem.
The fingerprint is per-vault, not per-machine. If a vault is shared across machines (committed to git), all machines contribute under the same fingerprint. If the user wants per-machine fingerprints, they should gitignore .vaultmind/fingerprint.txt — the default behavior is "vault carries its own identity."
The file is created with mode 0o600 to keep curious file-system scanners from picking it up casually; it's not a secret, but it's also not meant to be world-readable.
Types ¶
type Features ¶
type Features struct {
NoteCount int `json:"note_count"`
TypeDistribution map[string]int `json:"type_distribution"`
LinkCount int `json:"link_count"`
AliasCount int `json:"alias_count"`
EmbeddingCount int `json:"embedding_count"`
EmbeddingDims int `json:"embedding_dims"`
}
Features captures aggregate, content-free statistics about a vault. These are the per-vault descriptors a federated telemetry pipeline uses to predict where population-tuned constants will and won't generalize (cf. the federated-paper design note H2.3).
Nothing in here exposes content. Counts and a per-type distribution are aggregate enough to share even at the strictest privacy tier.
func ComputeFeatures ¶
ComputeFeatures opens the vault's index DB read-only and returns the aggregate features. Returns an error if the index doesn't exist or can't be queried — callers should run `vaultmind index --vault <path>` before computing features for a freshly-initialized vault.