Skip to main content

Crate codex_commit

Crate codex_commit 

Source
Expand description

Restricted, generation-only commit messages from caller-supplied public diffs. No repository discovery or Git operations are performed. Unix only.

Paths and model are explicit. Only the current access credentials are copied; source OAuth refresh credentials, user configuration and instructions are never passed to the generation process. Expired credentials require source CLI reauthentication. Generation never writes back to the source authentication home.

use codex_commit::{generate_message, GenerationOptions, GenerationRequest};
let options = GenerationOptions::new(
    "/absolute/path/to/codex".into(),
    "/absolute/path/to/auth-home".into(),
    "gpt-6.1-sol".into(),
);
let message = generate_message(GenerationRequest { diff: "public diff" }, &options)?;
let rendered = message.render()?;

Structs§

CommitMessage
GenerationOptions
GenerationRequest

Enums§

Error
ReasoningEffort

Constants§

MAX_DIFF_BYTES
Maximum supplied UTF-8 diff size; oversized diffs are rejected, never truncated.
MAX_MESSAGE_BYTES
Maximum serialized message size.

Functions§

generate_message
Generate from a supplied public diff. Checks CLI tool isolation before sending the diff. The timeout covers capability discovery, isolation audit and inference together.