feat(ext/shared): tighten VaultSettings types for retention + generator_defaults

This commit is contained in:
adlee-was-taken
2026-04-24 18:54:21 -04:00
parent 6ba9ccfa4c
commit b52e49a51e

View File

@@ -183,15 +183,24 @@ export interface ManifestEntry {
attachment_summaries: AttachmentSummary[];
}
// --- Vault settings (only the fields α touches) ---
// --- Vault settings ---
// Full shape lives on the Rust side and in docs/superpowers/specs/2026-04-18-relicario-typed-items-design.md
// We leave retention/generator/caps opaque to α so we don't accidentally mutate them.
// β₂ tightens retention + generator_defaults; γ owns attachment_caps.
export type TrashRetention =
| { kind: 'forever' }
| { kind: 'days'; value: number };
export type HistoryRetention =
| { kind: 'forever' }
| { kind: 'last_n'; value: number }
| { kind: 'days'; value: number };
export interface VaultSettings {
trash_retention: unknown;
field_history_retention: unknown;
generator_defaults: unknown;
attachment_caps: unknown;
trash_retention: TrashRetention;
field_history_retention: HistoryRetention;
generator_defaults: GeneratorRequest;
attachment_caps: unknown; // opaque — γ tightens
autofill_origin_acks: Record<string, number>;
}