@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.
21 lines • 1.38 kB
TypeScript
export declare function isValidEmail(value: string): boolean;
/** Throw a BridgeError(INVALID_INPUT) unless `value` is a plausibly-valid email address. */
export declare function assertValidEmail(value: string, field: string): void;
/** The baked default Cogent mail domain — the allowlist fallback if config/env is unavailable (F4). */
export declare const DEFAULT_MAIL_DOMAIN = "mail.cogent.tools";
/** Parse the CSV allowlist into a normalized, non-empty lowercase domain list. */
export declare function parseAllowedMailDomains(csv: string | undefined): string[];
/**
* The currently-allowed Cogent mail domains (F4). Prefers the loaded config's
* COGENT_MAIL_ALLOWED_DOMAINS (a library default so Team agents get it too); falls back to the
* env var, then the baked default — so it resolves even in tool contexts where config isn't loaded.
*/
export declare function allowedMailDomains(): string[];
/**
* Throw unless `address`'s domain is in the Cogent mail allowlist (F4). Cogent mail is
* organisation-only — external / BYO-corporate mailboxes are blocked for now (a future release
* adds per-org corporate domains via COGENT_MAIL_ALLOWED_DOMAINS). Assumes a syntactically valid
* address (call {@link assertValidEmail} first).
*/
export declare function assertAllowedMailDomain(address: string, field: string): void;
//# sourceMappingURL=validate.d.ts.map