/** * FactoryActorRef — the one author contract for everything a person, agent, or * integration writes into a factory (comment rows today; thread-message * attribution and agent-authored entries reuse it later). * * Conventions: * - Agent actor ids are `agent:` (the transition-service convention): * a binding id routes back to the live session via run bindings. Audit's * `agent:` form diverges; both satisfy `isAgentActor`. * - `id` is a namespaced string: only bare WorkOS ids (no `:`) are resolvable * or mentionable. External senders get `:` plus a * display snapshot captured at write time. */ import type { ChannelAccountLink } from '../channel-identity/base.js'; export type FactoryActorKind = 'user' | 'agent' | 'integration'; /** * Superset of core's channel author metadata — deliberately NOT that exact * shape: `teamId` lives on the raw platform event (never on the author), and * `channel_account_links` keys on `(platform, teamId, userId)`, so ingest must * capture it here or the identity is unlinkable. */ export interface FactoryActorExternalIdentity { platform: string; teamId?: string; messageId?: string; userId: string; userName?: string; fullName?: string; mention?: string; isBot?: boolean | 'unknown'; } export interface FactoryActorRef { kind: FactoryActorKind; id: string; displayName?: string; avatarUrl?: string; external?: FactoryActorExternalIdentity; } export declare function isMentionableActorId(id: string): boolean; export declare function actorFromAuthUser(userId: string, user?: { name?: string; email?: string; avatarUrl?: string; }): FactoryActorRef; export declare function actorFromAgentBinding(bindingId: string, displayName?: string): FactoryActorRef; /** * A linked platform sender becomes the linked tenant user; an unlinked one * stays a namespaced external identity with its display snapshot. */ export declare function actorFromChannelAuthor(external: FactoryActorExternalIdentity, link?: Pick | null): FactoryActorRef; //# sourceMappingURL=actor.d.ts.map