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

Function manifest

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

Source from the content-addressed store, hash-verified

110}
111
112pub(super) fn manifest(options: &TurnRecordOptions<'_>) -> AgentResult<Option<FileManifest>> {
113 let raw = options
114 .event
115 .raw_json
116 .as_ref()
117 .and_then(|v| v.get("record_files"));
118 let fail = |reason| AgentError::RecordFailed {
119 session_id: options.session.session_id.clone(),
120 turn_number: options.turn_number,
121 reason,
122 };
123 match raw {
124 Some(value) => serde_json::from_value(value.clone())
125 .map(Some)
126 .map_err(|e| fail(format!("invalid record_files manifest: {e}"))),
127 None if options.session.explicit_record_files => Err(fail(
128 "explicit record_files manifest required; refusing to record shared working tree"
129 .into(),
130 )),
131 None => Ok(None),
132 }
133}
134
135pub(super) fn validate(
136 root: &Path,

Callers 2

record_turnFunction · 0.70
has_pending_changesFunction · 0.70

Calls 3

as_refMethod · 0.80
getMethod · 0.65
cloneMethod · 0.45

Tested by

no test coverage detected