/** * SlackShuttle — the Slack channel via Socket Mode (SH4), on the base. * * The agent is a bot MEMBER you @mention. Socket Mode dials out over a * WebSocket (no public webhook / app review). The reply goes back via the Web * API. `processEvent` is public so the mapping+dispatch is testable without a * live socket; `start()` runs the real Socket Mode loop. * * NOTE: the WS loop uses the global `WebSocket` (Node ≥ 22) and is exercised by * a live pass, not unit tests. Subscribe to `app_mention` (channels) + `message.im` * (DMs); wire `schedules[].deliver.channel` for the "every morning" post. */ import type { ThreadMap, GroupPolicy, ShuttleMessage } from '../types.js'; import type { DeliveryPolicy } from '../delivery.js'; import type { LinePolicy, LlmGate } from '../gate.js'; import type { PairingStore } from '../pairing.js'; import type { GatewayClient } from '../gateway-client.js'; import { type SlackEvent } from './message.js'; export interface SlackShuttleOptions { /** Bot token `xoxb-…`. */ readonly botToken: string; /** App-level token `xapp-…` (Socket Mode). */ readonly appToken: string; readonly profileId: string; readonly gateway: GatewayClient; readonly threads?: ThreadMap; /** Default `edit-stream` (Slack can update messages). */ readonly delivery?: DeliveryPolicy; readonly line?: LinePolicy; readonly groupPolicy?: GroupPolicy; readonly pairing?: PairingStore; readonly llmGate?: LlmGate; readonly isPaused?: (msg: ShuttleMessage) => boolean | Promise; readonly debounce?: { readonly ms: number; readonly maxWaitMs?: number; }; readonly fetch?: typeof fetch; readonly baseUrl?: string; /** Bot user id; resolved via auth.test on start if omitted (for @mention stripping). */ readonly botUserId?: string; } export declare class SlackShuttle { private readonly api; private readonly adapter; private readonly transport; private botUserId; private ws; private running; constructor(opts: SlackShuttleOptions); /** Outbound push (schedule delivery): post `text` to a channel/DM id. */ sendText(target: string, text: string): Promise; ensureIdentity(): Promise; /** Map + handle one Slack event. Public for testing without a live socket. */ processEvent(event: SlackEvent): Promise; /** Open the Socket Mode connection and stream events. */ start(): Promise; private connect; private reconnect; stop(): void; } //# sourceMappingURL=shuttle.d.ts.map