Skip to main content

Module commit

Module commit 

Source
Expand description

Commit — an immutable record linking a state tree to its history and metadata.

This is where AgentStateGraph diverges most from git. Beyond the standard state-root and parents, a commit carries: agent identity, authority, structured intent, reasoning, confidence, and tool call provenance.

Structs§

Commit
An immutable record that links a state tree to its history and provenance metadata.
CommitBuilder
Builder for creating commits. The commit ID is computed on build.

Constants§

MAX_AGENT_ID_LEN
Maximum length (in chars) of Commit::agent_id. Truncated silently.
MAX_DESCRIPTION_LEN
Maximum length (in chars) of Intent::description stored on a commit. Overlong values are silently truncated on CommitBuilder::build — this is advisory provenance, not identity, so rejecting would force the blame/log path into a failure mode callers don’t expect.
MAX_REASONING_LEN
Maximum length (in chars) of Commit::reasoning. Truncated silently.
MAX_TOOL_CALLS
Maximum number of tool calls recorded on a single commit. Excess tail is silently dropped on CommitBuilder::build.