/** * Durable Slack ↔ actor account links (Open SWE–style mapping). * * Stored in the LangGraph Store under `["mda_identity_links"]`, with an * in-memory backend for unit tests. Slack Events look up `slack:T:U` before * invoke and remap to the linked actor when a record exists. */ import { Client } from "@langchain/langgraph-sdk"; export declare const IDENTITY_LINKS_NAMESPACE: readonly ["mda_identity_links"]; export interface IdentityLinkRecord { userId: string; slackUserId: string; slackTeamId?: string; /** Fully-qualified Slack user key, e.g. `slack:T123:U456`. */ slackKey: string; email?: string; linkedAt: string; source: "slack_oauth"; } export interface IdentityLinkStore { getBySlackKey(slackKey: string): Promise; getByUserId(userId: string): Promise; upsert(record: IdentityLinkRecord): Promise; removeByUserId(userId: string): Promise; } /** In-memory store for tests (and as a process-local cache layer). */ export declare class InMemoryIdentityLinkStore implements IdentityLinkStore { private readonly bySlack; private readonly byUser; getBySlackKey(slackKey: string): Promise; getByUserId(userId: string): Promise; upsert(record: IdentityLinkRecord): Promise; removeByUserId(userId: string): Promise; } /** LangGraph Store–backed identity links. */ export declare class LangGraphIdentityLinkStore implements IdentityLinkStore { private readonly client; constructor(client: Client); getBySlackKey(slackKey: string): Promise; getByUserId(userId: string): Promise; upsert(record: IdentityLinkRecord): Promise; removeByUserId(userId: string): Promise; private getItem; } /** Override the process-default link store (tests). */ export declare function setIdentityLinkStore(store: IdentityLinkStore | null): void; /** Resolve the process-default link store (in-memory until a Client is wired). */ export declare function getIdentityLinkStore(): IdentityLinkStore; /** Build a Store-backed client when a trusted loopback credential is available. */ export declare function createLangGraphIdentityLinkStore(options?: { apiUrl?: string; apiKey?: string; ingressSecret?: string; }): LangGraphIdentityLinkStore | null; export declare function slackKeyFromParts(teamId: string, userId: string): string; export declare function buildIdentityLinkRecord(input: { userId: string; slackUserId: string; slackTeamId?: string; email?: string; }): IdentityLinkRecord; //# sourceMappingURL=links.d.ts.map