Skip to main content

Module agent_notes

Module agent_notes 

Source
Expand description

Agent-notes wire types — pure data shapes for the commit-trailer + workspace-__MEMSTEAD-ref payload that the git-branch backend produces from its gitdir.

These types live in memstead-base so the unified Engine can carry them as Optional fields on crate::ops::changes::ChangesReport (populated when callers pass include_notes: true, empty otherwise). The gix-bound producers (read_memstead_ref, agent_notes_since) stay in the git-branch backend crate — they read from a gitdir and have no meaningful equivalent on the folder or archive backends.

CommitNote carries the parsed subject + trailer block from crate::vcs::format_commit_message. The workspace-level pointer is the SHA of refs/heads/__MEMSTEAD (unified schemas + per-mem configs branch), exposed as memstead_ref: Option<String> on the report — None when the workspace has not been migrated to the unified layout yet.

Structs§

AgentNotesReport
Walked output of agent_notes_since. head echoes the resolved branch tip so callers record it as the next polling cursor without a follow-up memstead_health round-trip. memstead_ref carries the workspace-level __MEMSTEAD ref tip (unified schemas + per-mem configs) so commit-mirroring consumers — e.g. an outer-repo cursor block — anchor it alongside the per-mem head without a second round-trip. None when the workspace has not been migrated to the unified layout yet.
CommitNote
One commit’s worth of structured agent-note state. Fields are populated best-effort: a body that doesn’t match the memstead: <verb> <id> subject shape leaves tool_verb / entity_id None; absent trailers leave the corresponding fields None. Callers branch on actor for agent-vs-external classification.