import { type CandidateRequest, type ReviewPayloadFs } from "./review-payload"; export type PostInput = { artifactPath: string; expectedSha256: string; repo: { owner: string; name: string; }; prNumber: number; headSha: string; event: CandidateRequest["event"]; }; export type PostExecResult = { code: number; stdout: string; stderr: string; }; export type PostExec = (argv: string[]) => Promise; export type PostOptions = { reviewStateRoot: string; directory?: string; fs?: ReviewPayloadFs; exec?: PostExec; timeoutMs?: number; }; export type TransportResult = { outcome: "posted" | "rejected" | "unknown"; http_status?: number; review_url?: string; reason?: string; tool_api_calls: number; }; /** * The validated descriptor, verified file bytes and live GET code head are the posting * oracles, read before POST. Preflight failures reject; HTTP 4xx reject, while * timeout, network, 5xx and malformed success responses remain unknown for the * writer/R5. Only the first POST's definitive 429 permits one retry after 2s; * the retry re-verifies the same descriptor and file without changing the event. * No body-only path or option disables these checks. Exec attempts are counted * before dispatch, including failures. Verification and gh's file read are not * atomic, and the GET head is not a lock against later head movement. * The paginated commit messages select the newest non-state commit before POST; * state-only tips therefore preserve identity. Slurped pages are parsed in TypeScript; * missing or malformed identity fails closed as unknown/transport-error without POST. */ export declare function post(input: PostInput, opts: PostOptions): Promise; /** * Capture the host-supplied absolute review-state root and optional session * directory, never tool arguments. Relative paths use that directory when supplied; * otherwise they retain verify's path semantics. Absolute paths are unchanged. * Both hosts receive JSON transport results; invalid context rejects before I/O. * No input overrides the root or directory. * * The caller oracle is host ctx.agent, forwarded separately on each invocation * before artifact I/O or transport. Only pr-comment-writer passes; missing or * other identities reject with zero tool_api_calls for both hosts. No tool * argument or option disables this check. */ export declare function createPostExecutor(reviewStateRoot: string, directory?: string): (input: unknown, caller?: unknown) => Promise; //# sourceMappingURL=review-post.d.ts.map