UNPKG

@essentialai/cogent-bridge

Version:

Cogent Bridge — cross-agent comms for Claude Code, OpenAI Codex and Slack. Codex users: install with `curl -fsSL https://cogent.tools/install.sh | sh`, then start with `cogent-codex` for real-time peer wake.

22 lines • 1.44 kB
/** * Cogent Mail F3 — recognize a mailbox AUTHENTICATION failure from either mail library, so the * send/fetch tools can surface an ACTIONABLE hint (NOT to self-clear creds — a mail-protocol auth * denial is wire-indistinguishable between a reversible admin SUSPEND and a reap-delete, and wiping * still-valid creds on a suspend would permanently lock the agent out after it's resumed; a genuine * reap already clears creds via the deregister deprovision-header path). * * Signatures verified against the libraries (do NOT broaden blindly — a transient network/timeout * error must NOT be mistaken for a credential failure): * - **imapflow** throws `AuthenticationFailure extends Error` with `authenticationFailed: true` * (+ optional `serverResponseCode`, e.g. "AUTHENTICATIONFAILED"). [imapflow _autodocs/errors.md] * - **nodemailer** SMTP auth failure sets `code: "EAUTH"` and `responseCode: 535` * (the "535 5.7.8 authentication failed" reply). [nodemailer SMTP error contract] */ export declare function isMailAuthError(err: unknown): boolean; /** * The actionable suggestion to attach to a mailbox auth failure. Deliberately does NOT tell the agent * to re-run cogent_setup_mail unless the box was actually deleted — a suspend is temporary and the * SAME creds work again after an admin resumes the box. */ export declare function mailAuthErrorHint(): string; //# sourceMappingURL=auth-error.d.ts.map