import { type UserYaml } from "./user-registry.js"; /** * v0.8 §3.5 — Channel bootstrap. At bot startup, each adapter calls this * helper to resolve which user yaml matches its live `bot_user_id` and which * `(command-, works-)` channel pair it should listen on. * * The pure resolver here knows nothing about Discord/Slack APIs — it returns * structured intent that adapters then realize via their native channel-create * primitives. This keeps the matching policy unit-testable. */ export interface BotIdentity { orgSlug: string; user: UserYaml; channels: { command: string; works: string; }; } export interface ResolveBotIdentityInput { workspace: string; botUserId: string; /** Optional restriction to one org slug. */ orgSlug?: string; } /** * v0.8 §3.5 — Returns the user yaml whose `bot_user_id` matches across all * (or one) org. Returns `null` when no match — adapter logs and skips * listening (it must not silently fall back to another user's channels). */ export declare function resolveBotIdentity(input: ResolveBotIdentityInput): BotIdentity | null; /** * v0.8 §3.5 — List every (org, user, channel) tuple this workspace knows * about. Adapter uses this to confirm "channel exists for *some* user" when * deciding whether to ignore a message on a `command-bob` it doesn't own. */ export declare function listKnownChannels(workspace: string): Array<{ orgSlug: string; handle: string; command: string; works: string; }>; /** Channel names this bot expects to own — convenience for adapter setup. */ export declare function expectedChannelNamesFor(handle: string): { command: string; works: string; };