/** * Centralized constants for the mailbox system. * * Previously these magic numbers were scattered across global-mailbox.ts, * mailbox-attach.ts, mailbox-hooks.ts, and mailbox-health.ts. Keeping them * in one place ensures every surface agrees on timeouts, intervals, and * thresholds — and makes tuning a single-file change. * * @module mailbox-constants */ /** * Agents without a heartbeat for this long are no longer live and are removed * from the registry. Presence registries are not history stores: retaining an * offline row makes dead agents and shadow workers look actionable in HQ. */ export declare const AGENT_STALE_MS = 60000; /** Clients without a heartbeat for this long are considered offline. */ export declare const CLIENT_STALE_MS = 60000; /** Heartbeat updates are throttled to at most this interval (per agent/client). */ export declare const HEARTBEAT_THROTTLE_MS = 5000; /** * How long a read may be served from the in-process registry cache before * re-reading the shared file. Kept well below HEARTBEAT_THROTTLE_MS so * cross-process registrations become visible promptly. */ export declare const REGISTRY_CACHE_TTL_MS = 2000; /** JSONL line separator. */ export declare const LINE_SEPARATOR = "\n"; /** * Soft cap on the in-memory message cache. The cache mirrors the JSONL * message file; under normal load it stays well under this. If a pathological * mailbox exceeds the cap we fall back to reading from disk rather than * holding an unbounded buffer in memory. */ export declare const MESSAGE_CACHE_MAX_ENTRIES = 10000; /** Background mailbox awareness polling interval (cross-process fallback). */ export declare const MAILBOX_AWARENESS_INTERVAL_MS = 30000; /** Agent heartbeat interval in the attach layer. */ export declare const MAILBOX_HEARTBEAT_INTERVAL_MS = 30000; /** Min interval between registry reads for the fleet pulse digest. */ export declare const PULSE_MIN_READ_INTERVAL_MS = 30000; /** * Interval at which the background auto-compaction sweep runs. * Default: every 5 minutes. */ export declare const AUTO_COMPACT_INTERVAL_MS = 300000; /** * Messages that have been read by ALL currently-online agents are eligible * for auto-removal after this many milliseconds since the last read. * Default: 10 minutes. */ export declare const AUTO_COMPACT_READ_MAX_AGE_MS = 600000; /** * Messages whose TTL (time-to-live) has expired are eligible for auto-removal. * When a message has `expiresAt` set and that timestamp is in the past, the * next compaction sweep drops it. Default TTL for messages without an explicit * `expiresAt`: 24 hours. */ export declare const AUTO_COMPACT_DEFAULT_TTL_MS = 86400000; /** Maximum requests per minute from a single external agent (bearer token). */ export declare const HTTP_RATE_LIMIT_PER_MINUTE = 120; /** Window size for the sliding-window rate limiter. */ export declare const HTTP_RATE_LIMIT_WINDOW_MS = 60000; //# sourceMappingURL=mailbox-constants.d.ts.map