/**
 * Typed reference parsing for wikilink-style fields.
 *
 * A reference value (e.g. `task.assignee`) can name one of two things:
 *
 *   - an ENTITY in the graph:  `[[jane-doe]]`, `[[repo/jane-doe|Jane]]`
 *   - a user ACCOUNT:          `[[user:42|@chris]]`
 *
 * The account form keys on the IMMUTABLE account id (`42`); the trailing
 * `@chris` is a human/grep display cache only and is NEVER identity — a renamed
 * handle leaves the stored label stale but the id keeps resolving. This keeps
 * "who is assigned" stable across handle renames / recycling, which a
 * handle-keyed ref could not.
 *
 * This module is dependency-free so it can be shared by the server, the core
 * graph layer, and the web client (`@core/refs`). It is the single source of
 * truth for ref parsing — ad-hoc `[[...]]` regexes elsewhere should defer here.
 */
export type ParsedRef = {
    kind: 'entity';
    id: string;
    repo?: string;
    label?: string;
} | {
    kind: 'user';
    userId: string;
    handle?: string;
    label?: string;
};
/**
 * Parse a raw reference value into a {@link ParsedRef}. Accepts the bracketed
 * wikilink forms and a bare inner token. Returns null when there's nothing to
 * resolve (empty / non-string / malformed).
 */
export declare function parseRef(raw: unknown): ParsedRef | null;
/** True when the raw value is an account/user reference (`[[user:…]]`). */
export declare function isUserRef(raw: unknown): boolean;
/** Format a canonical account reference. The handle is a display cache only. */
export declare function formatUserRef(userId: string | number, handle?: string): string;
/** Format a canonical entity reference. */
export declare function formatEntityRef(id: string, label?: string): string;
