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:
@@ -196,11 +196,21 @@ export type HistoryRetention =
|
|||||||
| { kind: 'last_n'; value: number }
|
| { kind: 'last_n'; value: number }
|
||||||
| { kind: 'days'; 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 {
|
export interface VaultSettings {
|
||||||
trash_retention: TrashRetention;
|
trash_retention: TrashRetention;
|
||||||
field_history_retention: HistoryRetention;
|
field_history_retention: HistoryRetention;
|
||||||
generator_defaults: GeneratorRequest;
|
generator_defaults: GeneratorRequest;
|
||||||
attachment_caps: unknown; // opaque — γ tightens
|
attachment_caps: AttachmentCaps;
|
||||||
autofill_origin_acks: Record<string, number>;
|
autofill_origin_acks: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user