From f963ae33af93fd2d6ca325d888238eb8a7a2cf46 Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Sat, 25 Apr 2026 01:54:40 -0400 Subject: [PATCH] feat(ext/shared): tighten VaultSettings.attachment_caps to AttachmentCaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All four cap fields optional; undefined means uncapped. γ₁ enforces; γ₂ adds the configuration UI. Co-Authored-By: Claude Opus 4.7 (1M context) --- extension/src/shared/types.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/extension/src/shared/types.ts b/extension/src/shared/types.ts index 7893e38..a845d52 100644 --- a/extension/src/shared/types.ts +++ b/extension/src/shared/types.ts @@ -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; }