feat(ext/shared): tighten VaultSettings.attachment_caps to AttachmentCaps

All four cap fields optional; undefined means uncapped. γ₁ enforces;
γ₂ adds the configuration UI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-25 01:54:40 -04:00
parent 0589fe3123
commit f963ae33af

View File

@@ -196,11 +196,21 @@ export type HistoryRetention =
| { kind: 'last_n'; value: number }
| { kind: 'days'; value: number };
/// Optional per-level caps on attachment plaintext sizes.
/// All fields optional; if undefined that level is uncapped.
/// γ₁ enforces; γ₂ ships the configuration UI.
export interface AttachmentCaps {
per_attachment_max_bytes?: number;
per_item_max_bytes?: number;
per_vault_soft_max_bytes?: number;
per_vault_hard_max_bytes?: number;
}
export interface VaultSettings {
trash_retention: TrashRetention;
field_history_retention: HistoryRetention;
generator_defaults: GeneratorRequest;
attachment_caps: unknown; // opaque — γ tightens
attachment_caps: AttachmentCaps;
autofill_origin_acks: Record<string, number>;
}