/** * Message delivery helpers for `send` โ€” the fallback line, the task's record and * the `--note` kept in mem โ€” split out of `send.ts` (Issue #4128). */ import { ApiClient } from '../utils/api-client'; import type { FailedSendOutcome } from './message-dispatch'; import type { CommandTarget } from './command-target'; import type { SessionIdentity } from './whoami'; /** * What to print when a PROMPT_WAITING response carried no message body โ€” an * older daemon, or a truncated body. The code is the contract; the sentence is * a courtesy, and the CLI must still say what to do without it. */ export declare function promptWaitingFallback(worktreeId: string, target: CommandTarget): string; /** * Whether a failed send is known to have typed nothing: the server's word, or a 4xx * refused before an attempt. Not known otherwise (no answer, a 5xx saying nothing). */ export declare function knownNotSent(error: unknown, outcome: FailedSendOutcome | null): boolean; /** * Report a task transition to the server, best effort. * * A failure here is worth a warning but not the command's exit code: the * message either reached the agent or it did not, and that outcome is what the * caller is waiting on. */ export declare function reportTaskStatus(client: ApiClient, taskId: string, status: 'running' | 'failed'): Promise; /** * Issue #4226: `--note` is kept in mem as a `waiting` item of the sender, closed by the * relay it opened (design `docs/design/mem-prompt-4226.md` ยง6). Only the note and the * relay's id go in: not the other session, not the time, not the message (D2). * Refused (mode not `on`, a check, the open limit, no answer): the caller undoes what * this send took and sends nothing. Never repeats the note in an error. * * @returns The item's id */ export declare function writeSendNote(client: ApiClient, author: SessionIdentity, relayId: string, note: string, undo: () => Promise): Promise; /** Issue #4226: a message known not to have gone in leaves its note closed, best effort. */ export declare function closeSendNote(client: ApiClient, author: SessionIdentity, itemId: string): Promise; //# sourceMappingURL=send-messages.d.ts.map