Vault
Signal-aware data surface. Not a database. A living store that emits, ages, and responds to queries. Temporally aware. Multi-modal. Replayable.
Storage
// store a signal
vault.store(collection, data)
// store with expiry
vault.store(collection, data, ttl: 30d)
// append-only (logs, ledger)
vault.append(collection, data)
// tamper-proof append
vault.append(collection, data, immutable: true)Retrieval
Multiple retrieval modes. Key-value, filter, pattern match, full-text search, vector similarity, prefix match, and replay.
// single record
vault.read(collection, id)
// filtered query
vault.query(collection, filter)
// pattern match
vault.scan(collection, pattern)
// full-text search
vault.search(collection, text)
// vector similarity (k-nearest)
vault.nearest(collection, vector, k)
// prefix match (autocomplete)
vault.prefix(collection, text)
// replay history as signal stream
vault.replay(collection, from)Signals from Vault
The vault is not passive storage. It emits signals when data changes, when storage pressure rises, and for entry counts and sizes.
// emits when data changes
vault.entries -> on_change -> ...
// storage pressure signal
vault.memory_usage -> ...
// entry count
vault.count(collection) -> ...
// storage size
vault.size(collection) -> ...Ledger (Atomic Transactions)
Atomic multi-entry operations. All succeed or none do. Financial-grade integrity built into the data surface.
// atomic transaction — money never vanishes
vault.ledger.atomic {
debit(from: account_a, amount),
credit(to: account_b, amount)
}
// all succeed or none doProperties
TTL, retention, decay are native. Data ages and expires naturally.
on_change, memory pressure, counts. The vault is a live participant in the signal graph.
KV, text search, vector search, append-only, ledger — all in one surface.
Stored signals can be re-emitted as a stream. Time travel through your data.
Example: Event Store with Anomaly Detection
// append events immutably
events -> vault.append("audit_log", immutable: true)
// replay for analysis
vault.replay("audit_log", from: "1h ago") -> analyze
// detect unusual write patterns
vault.count("audit_log") ~> rate(per: 1m)
-> baseline(window: 7d) -> normal_rate
vault.count("audit_log") ~> rate(per: 1m)
-> deviation(from: normal_rate)
-> gate(> 3σ) -> anomaly