/** * Mentions — types for @-mention support in session messages. * * A Mention records who was addressed in a message, whether a specific user * or a well-known group. Group mentions carry a resolved array of user IDs * so consumers can perform membership checks without the resolver. */ /** * Well-known group mention targets as a `const` array. * * Use this for validation or exhaustive checks against `MentionGroup`. * * @docLink packages/types/messages#mention */ export declare const MENTION_GROUPS: readonly ["agent", "humans", "humans_here", "here", "all"]; /** * A well-known group that can be `@`-mentioned: `'agent' | 'humans' | 'humans_here' | 'here' | 'all'`. * * @docLink packages/types/messages#mention */ export type MentionGroup = (typeof MENTION_GROUPS)[number]; /** * A parsed `@`-mention in a session message. Records who was addressed — either a * specific user or a well-known group — along with the source text position. * * Group mentions carry a resolved array of user IDs so consumers can perform * membership checks without needing the resolver. * * @docLink packages/types/messages#mention */ export type Mention = { type: "user"; userId: string; name: string; /** Position of the `@` character in the source text. */ offset: number; /** Length of the full `@token` string including the `@`. */ length: number; } | { type: "group"; group: MentionGroup; /** User IDs resolved at parse time (e.g. all online users for `@here`). */ resolved: string[]; /** Position of the `@` character in the source text. */ offset: number; /** Length of the full `@token` string including the `@`. */ length: number; } | { type: "custom"; /** Consumer-defined mention kind, e.g. "assistant". */ kind: string; /** User IDs this mention resolves to (so isMentioned works); may be empty. */ resolved: string[]; /** Optional consumer payload, e.g. { sessionId, ownerId }. */ data?: Record; /** Position of the `@` character in the source text. */ offset: number; /** Length of the full `@token` string including the `@`. */ length: number; }; //# sourceMappingURL=mentions.d.ts.map