(snapshot: {
staged: Array<{
startUuid: string
endUuid: string
summary: string
risk: number
stagedAt: number
}>
armed: boolean
lastSpawnTokens: number
})
| 1719 | * restore — the loader keeps only the most recent snapshot entry. |
| 1720 | */ |
| 1721 | export async function recordContextCollapseSnapshot(snapshot: { |
| 1722 | staged: Array<{ |
| 1723 | startUuid: string |
| 1724 | endUuid: string |
| 1725 | summary: string |
| 1726 | risk: number |
| 1727 | stagedAt: number |
| 1728 | }> |
| 1729 | armed: boolean |
| 1730 | lastSpawnTokens: number |
| 1731 | }): Promise<void> { |
| 1732 | const sessionId = getSessionId() as UUID |
| 1733 | if (!sessionId) return |
| 1734 | await getProject().appendEntry({ |
| 1735 | type: 'marble-origami-snapshot', |
| 1736 | sessionId, |
| 1737 | ...snapshot, |
| 1738 | }) |
| 1739 | } |
| 1740 | |
| 1741 | export async function flushSessionStorage(): Promise<void> { |
| 1742 | await getProject().flush() |
nothing calls this directly
no test coverage detected