MCPcopy Create free account
hub / github.com/Noumena-Network/code / computeRestoredAttributionState

Function computeRestoredAttributionState

src/utils/sessionRestore.ts:157–168  ·  view source on GitHub ↗
(
  result: ResumeResult,
)

Source from the content-addressed store, hash-verified

155 * Returns undefined if attribution feature is disabled or no snapshots exist.
156 */
157export function computeRestoredAttributionState(
158 result: ResumeResult,
159): AttributionState | undefined {
160 if (
161 feature('COMMIT_ATTRIBUTION') &&
162 result.attributionSnapshots &&
163 result.attributionSnapshots.length > 0
164 ) {
165 return restoreAttributionStateFromSnapshots(result.attributionSnapshots)
166 }
167 return undefined
168}
169
170/**
171 * Compute standalone agent context (name/color) for session resume.

Callers 1

Tested by

no test coverage detected