/**
 * Shared umbrella-inbox drain (T-CHAT-AS-TERMINAL CAT.2).
 *
 * One drain, two callers:
 *   - UserPromptSubmit hook — emits the envelope as `additionalContext`
 *     (delivery ON the user's keystroke); and
 *   - Stop hook — emits the envelope as a `{decision:'block', reason}` so the
 *     inbound message DRIVES a turn at the turn boundary (no keystroke).
 *
 * Both call this one function, so the ACK ledger is shared: a message drained
 * by either path is acked-before-return and never delivered twice (UPS won't
 * re-inject what Stop drove, and vice versa). This is the durable loop-guard
 * for the Stop-drive — only genuinely-new inbound produces a fresh envelope.
 *
 * Umbrella resolution + the read/compute/build/ack/purge flow live here (lifted
 * verbatim from the former UPS `drainInboxEnvelope`). Fail-open: any error, or a
 * cwd that resolves to no umbrella, returns '' (the caller proceeds).
 *
 * Imports from: ./inbox, ./inbox_inject, ./inbox_writer, ../../channels/routing.
 * Imported by: src/runtime/hooks/{user-prompt-submit,stop}.ts + tests.
 */
/**
 * Drain the unacked inbox rows for the session's umbrella into one envelope
 * string, ACK-BEFORE-RETURN. Returns '' when there is nothing to deliver, when
 * cwd resolves to no umbrella, or on any error (fail-open).
 *
 * `cwd` defaults to `process.cwd()`; the Stop hook passes the cwd from its
 * payload so the umbrella resolves against the session's launch dir.
 */
export declare function drainUmbrellaInbox(sessionId: string, cwd?: string): Promise<string>;
/**
 * READ-ONLY twin of {@link drainUmbrellaInbox} (T-CHAT-INBOUND-SURFACE-MIDRUN SF.1).
 * Returns the same unacked-inbound envelope, but does NOT ack and does NOT purge — so the
 * message is SURFACED without being consumed and still DRIVES a proper response turn at the
 * next clean stop (via `maybeDriveInbound`). Used by the Stop hook's drift branch to make a
 * mid-run user message visible without breaking the no-pause discipline (the run continues).
 *
 * Deliberately a SEPARATE function rather than an `{ack:false}` flag on the drain: the
 * drain's "ACK-BEFORE-RETURN exactly-once" contract is its durability invariant and stays
 * pristine. Fail-open '' on any error / unresolved umbrella (mirrors the drain).
 */
export declare function peekUmbrellaInbox(sessionId: string, cwd?: string): Promise<string>;
//# sourceMappingURL=inbox_drain.d.ts.map