feat(ext/shared): tighten VaultSettings types for retention + generator_defaults
This commit is contained in:
@@ -183,15 +183,24 @@ export interface ManifestEntry {
|
|||||||
attachment_summaries: AttachmentSummary[];
|
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
|
// 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 {
|
export interface VaultSettings {
|
||||||
trash_retention: unknown;
|
trash_retention: TrashRetention;
|
||||||
field_history_retention: unknown;
|
field_history_retention: HistoryRetention;
|
||||||
generator_defaults: unknown;
|
generator_defaults: GeneratorRequest;
|
||||||
attachment_caps: unknown;
|
attachment_caps: unknown; // opaque — γ tightens
|
||||||
autofill_origin_acks: Record<string, number>;
|
autofill_origin_acks: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user