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§
Enums§
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.