fix(ext/shared): correct AttachmentCaps field names to match Rust core
The previous commit (f963ae3) used per_item_max_bytes and per_vault_*_max_bytes
which don't match the Rust core's struct (per_item_max_count and
per_vault_*_cap_bytes). Also fixes the per-item semantics: it's a COUNT of
attachments per item, not a byte sum.
Spec and plan docs updated in-place so future Task 7 cap-enforcement
implementation uses the correct names + semantics.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -198,12 +198,13 @@ export type HistoryRetention =
|
||||
|
||||
/// Optional per-level caps on attachment plaintext sizes.
|
||||
/// All fields optional; if undefined that level is uncapped.
|
||||
/// Field names mirror the Rust core's `AttachmentCaps` struct.
|
||||
/// γ₁ 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;
|
||||
per_item_max_count?: number; // count of attachments per item, NOT bytes
|
||||
per_vault_soft_cap_bytes?: number; // soft cap — warn user but allow
|
||||
per_vault_hard_cap_bytes?: number; // hard cap — reject
|
||||
}
|
||||
|
||||
export interface VaultSettings {
|
||||
|
||||
Reference in New Issue
Block a user