MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / manifest

Function manifest

atomic-agent/src/record/scope.rs:140–161  ·  view source on GitHub ↗
(options: &TurnRecordOptions<'_>)

Source from the content-addressed store, hash-verified

138}
139
140pub(super) fn manifest(options: &TurnRecordOptions<'_>) -> AgentResult<Option<FileManifest>> {
141 let raw = options
142 .event
143 .raw_json
144 .as_ref()
145 .and_then(|v| v.get("record_files"));
146 let fail = |reason| AgentError::RecordFailed {
147 session_id: options.session.session_id.clone(),
148 turn_number: options.turn_number,
149 reason,
150 };
151 match raw {
152 Some(value) => serde_json::from_value(value.clone())
153 .map(Some)
154 .map_err(|e| fail(format!("invalid record_files manifest: {e}"))),
155 None if options.session.explicit_record_files => Err(fail(
156 "explicit record_files manifest required; refusing to record shared working tree"
157 .into(),
158 )),
159 None => Ok(None),
160 }
161}
162
163pub(super) fn validate(
164 root: &Path,

Callers 2

record_turnFunction · 0.70
has_pending_changesFunction · 0.70

Calls 4

failFunction · 0.85
as_refMethod · 0.80
getMethod · 0.65
cloneMethod · 0.45

Tested by

no test coverage detected