/** Learned-teammate entries older than this (by lastSeenAt) are ignored by * isTeamBot / listTeamBots — the bot hasn't shown up in a team context for a * month, so we stop vouching for it until it's seen again. */ export declare const DEFAULT_EXPIRY_MS: number; export interface TeamBot { unionId: string; name: string; firstSeenAt: number; lastSeenAt: number; } /** * Upsert a learned teammate bot by union_id. Existing entry keeps firstSeenAt * and bumps lastSeenAt (+ refreshes name); new entry stamps both. * * No-op when unionId is empty — many inbound bot events DO carry * `sender.sender_id.union_id`, but the ones that don't simply can't be learned * (and fall back to the existing /grant path), never polluting the store with a * keyless entry. name may be empty (we still record the trusted union_id). * * Returns true iff the store changed (new entry or refreshed timestamp/name), * so callers can skip a redundant log. */ export declare function recordTeamBot(dataDir: string, bot: { unionId: string | undefined; name?: string; }, now?: number): boolean; /** Is `unionId` a known (non-expired) teammate bot? The auth gate's predicate. * Empty/unknown/expired → false (caller falls back to /grant). */ export declare function isTeamBot(dataDir: string, unionId: string | undefined, maxAgeMs?: number, now?: number): boolean; /** All non-expired learned teammate bots (for discovery / debugging). Unordered. */ export declare function listTeamBots(dataDir: string, maxAgeMs?: number, now?: number): TeamBot[]; /** Forget a learned teammate (explicit revoke). Returns true if removed. */ export declare function removeTeamBot(dataDir: string, unionId: string | undefined): boolean; //# sourceMappingURL=team-bots-store.d.ts.map