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

Function recordContextCollapseCommit

src/utils/sessionStorage.ts:1699–1714  ·  view source on GitHub ↗
(commit: {
  collapseId: string
  summaryUuid: string
  summaryContent: string
  summary: string
  firstArchivedUuid: string
  lastArchivedUuid: string
})

Source from the content-addressed store, hash-verified

1697 * array and handed to restoreFromEntries() which rebuilds the commit log.
1698 */
1699export async function recordContextCollapseCommit(commit: {
1700 collapseId: string
1701 summaryUuid: string
1702 summaryContent: string
1703 summary: string
1704 firstArchivedUuid: string
1705 lastArchivedUuid: string
1706}): Promise<void> {
1707 const sessionId = getSessionId() as UUID
1708 if (!sessionId) return
1709 await getProject().appendEntry({
1710 type: 'marble-origami-commit',
1711 sessionId,
1712 ...commit,
1713 })
1714}
1715
1716/**
1717 * Snapshot the staged queue + spawn state. Written after each ctx-agent

Callers

nothing calls this directly

Calls 3

getSessionIdFunction · 0.85
getProjectFunction · 0.85
appendEntryMethod · 0.80

Tested by

no test coverage detected