import type { newTurnId } from '@moxxy/core'; import type { ClientSession as Session } from '@moxxy/sdk'; import type { SlackClient } from './slack-client.js'; export interface TurnRunnerLogger { warn?(msg: string, meta?: Record): void; } export interface RunSlackTurnDeps { readonly session: Session; readonly client: SlackClient; readonly editFrameMs: number; readonly logger?: TurnRunnerLogger; } export interface RunSlackTurnOptions { /** Channel the triggering event arrived in. */ readonly channel: string; /** Thread root for the reply: `event.thread_ts ?? event.ts`. */ readonly threadTs: string; readonly text: string; readonly model?: string; readonly controller: AbortController; /** Pre-minted turn id; the channel records it as an own-turn id. */ readonly turnId: ReturnType; } /** * Drive a single Slack turn end-to-end: subscribe the frame pump to THIS turn's * events (filtered by turnId — `session.log` fans out to every listener, so a * concurrent turn on the same Session would otherwise stream into this thread, * AGENTS.md invariant #8), run the turn through `runTurn`, flush the final * frame, and unwind in `finally`. * * The streaming loop is `@moxxy/channel-kit`'s {@link FramePump} ("post once * via `chat.postMessage`, then edit THAT message via `chat.update`, throttled * to `editFrameMs`") over a {@link PlainTurnRenderer} snapshot; only the Slack * Web-API calls live here. The turnId is minted by the caller so the channel * can also record it as an own-turn id (it filters foreign-turn mirroring on * those). */ export declare function runSlackTurn(deps: RunSlackTurnDeps, opts: RunSlackTurnOptions): Promise; //# sourceMappingURL=turn-runner.d.ts.map