import { type ObservedConversationEntry, type ObservedConversationStore } from '../storage/schema/observed-conversation.store.js'; export type SendHoldTool = 'anima.message.send' | 'anima.ask' | 'anima.file.send'; export type EvaluateSendHoldResult = { kind: 'disabled'; } | { kind: 'allow'; } | { kind: 'held'; /** Sole stdout outcome (Iris EN copy). */ stdout: string; surfaceId: string; deltaCount: number; advancedToOrdinal: number; }; export declare class SendHoldError extends Error { readonly reason: 'store_error' | 'continuity_degraded' | 'cas_failure'; constructor(reason: SendHoldError['reason'], message: string); } /** True when the journal row is this agent's own bot identity. */ export declare function isOwnObservedEntry(entry: ObservedConversationEntry, self: { botUserId?: string; botId?: string; }): boolean; export declare function surfaceIdForOutbound(input: { teamId: string; channelId: string; threadTs?: string; }): string; /** * After-cursor index population that the retained window must fully cover * before we can claim "no foreign movement" / exact non-own counts. */ export declare function afterCursorIndexPopulation(afterOrdinal: number, tailOrdinal: number): number; /** * Compare cursor vs local observed ledger for one outbound Slack post surface. * Does not perform the irreversible Slack op. * * On held: writes stdout first, then records activity, then advances cursor — * a failed write/outcome never consumes the undelivered delta. */ export declare function evaluateSendHold(input: { agentId: string; teamId: string; channelId: string; threadTs?: string; tool: SendHoldTool; botUserId?: string; botId?: string; store?: ObservedConversationStore; writeOutput?: (line: string) => void; }): Promise; /** Row whose ordinal equals the captured tail, independent of messageTs order. */ export declare function entryAtOrdinal(candidates: ObservedConversationEntry[], ordinal: number): ObservedConversationEntry | undefined; /** * Append the agent's own successful post into the observed journal so a later * hold does not treat it as foreign room movement (ingress uses ignoreSelf). * Call immediately after the irreversible Slack response returns a ts. */ export declare function observeOwnOutboundPost(input: { agentId: string; teamId: string; channelId: string; messageTs: string; threadTs?: string; text: string; botUserId?: string; botId?: string; store?: ObservedConversationStore; }): Promise; /** * Best-effort message ts from Slack files.info `shares` (channel share stamp). * completeUploadExternal does not return a conversation message_ts. */ export declare function messageTsFromSlackFileInfo(info: { shares?: { public?: Record>; private?: Record>; }; } | undefined, channelId: string): string | undefined; //# sourceMappingURL=send-hold.d.ts.map