import type { Comment, Mention, Thread } from "../model/types"; /** Someone who can be mentioned: `ref` says who (a writer's key, or `host:` / `gh:` for a supplied person). */ export interface Person { ref: string; name: string; /** An AI agent. */ agent?: boolean; } /** People the page or an add-on supplies (a company's directory, a repository's members), shown in the `@` list. */ export declare function setPeople(list: readonly Person[]): void; export declare const heardPeople: (fn: () => void) => (() => void); /** The agents the author lists on the page: ``. */ export declare const listedAgents: () => string[]; /** * Everyone who can be mentioned here: the people who have commented or reacted in this document, the agents the page * lists, and the people the page or an add-on supplied; not this reviewer. A person comes once. */ export declare function peopleFor(threads: readonly Thread[], me: string): Person[]; /** The `@name` being typed at the end of `before`: where it starts and what has been typed after the `@`. */ export declare function mentionToken(before: string): { start: number; query: string; } | null; /** The people matching what was typed: names that start with it first, then names that contain it. */ export declare function filterPeople(list: readonly Person[], query: string): Person[]; /** * Where each chosen person is still named in the final words. A person whose `@Name` was edited away is no longer * mentioned; the same name twice takes its places in the order chosen. */ export declare function locate(text: string, chosen: readonly { label: string; ref: string; }[]): Mention[]; /** Whether a comment names any of `refs`. */ export declare const names: (c: Comment, refs: readonly string[]) => boolean; /** Who the page says this reviewer is (`host:`), so comments naming them there count as naming this reviewer. */ export declare function setIdentity(who: { id: string; } | null): void; /** Every way a comment can name this reviewer: their key, and the page's own name for them. */ export declare const myRefs: (me: string) => string[]; /** Comments by others that name this reviewer and that they haven't marked seen, with their threads. */ export declare function unseenMentions(threads: readonly Thread[], me: string): { thread: Thread; comment: Comment; }[]; /** Whether a thread has a comment by someone else naming this reviewer. */ export declare const mentionsMe: (t: Thread, me: string) => boolean;