import type { CommsAddress, CommsChannel, CommsChannelKind, CommsMessage, InboundRaw, OutboundMessage } from "./comms-types.js"; /** Extract actionable http(s) links from a message body (href="…" and bare URLs), de-duped, in order. * The verification magic-link the persona would tap. Pure; body is runtime-only. */ export declare function extractLinks(body: string): string[]; /** Extract OTP-shaped tokens from a message body. Labeled codes ("your code is 481920", * "verification code 8A3F2K") are high-precision and preferred; if none are labeled, fall back to an * isolated 4–8 digit run (a bare OTP). Pure; tokens are runtime-only literal-scrub targets. */ export declare function extractOtpCodes(body: string): string[]; export interface FakeInboxOptions { /** "email" (default) or "sms" — the address shape + surface differ; machinery is identical. */ channel?: CommsChannelKind; /** Email domain for minted addresses. Default example.test (an RFC 6761 reserved, unroutable test * domain — public-safe; override to a branded reserved domain once it's added to the email allowlist). */ domain?: string; /** Injected clock (ms) for deterministic tests. Default Date.now. */ now?: () => number; } /** The in-process fake adapter. Implements the same CommsChannel port a real provider adapter would. */ export declare class FakeInbox implements CommsChannel { readonly channel: CommsChannelKind; readonly kind: "fake"; private readonly domain; private readonly clock; private readonly byActor; private readonly byValue; private readonly queues; private counter; constructor(options?: FakeInboxOptions); provision(actorId: string): Promise; /** * Provision an inbox for `actorId` at an EXPLICIT address (a lab-declared recipient), so the * app-under-test's send to that literal address resolves in `deliverRaw` (which drops recipients * with no provisioned inbox). Declaring the same address intentionally shares its inbox; if `actorId` already held * a different auto-generated address, the declared address supersedes it (the lab's declaration * wins). Idempotent: re-declaring the same address returns the existing inbox without clearing it. */ provisionAddress(actorId: string, value: string): Promise; private route; send(message: OutboundMessage): Promise; deliverRaw(inbound: InboundRaw): Promise; poll(address: CommsAddress, since?: number): Promise; teardown(): Promise; /** Inspection helper (tests / a surface): every inbox currently provisioned. */ addresses(): CommsAddress[]; }