ChainRepository

interface ChainRepository

Persistent store for TaskChain progress.

Stores which step each active chain is currently on. Used by TaskChainExecutor to resume chains from the correct step after app termination.

Functions

Link copied to clipboard
abstract suspend fun delete(chainId: String)

Deletes the progress record for chainId.

Link copied to clipboard
abstract suspend fun get(chainId: String): ChainProgress?

Returns the progress record for chainId, or null if not found.

Link copied to clipboard
abstract suspend fun getAllRunning(): List<ChainProgress>

Returns all chains that are currently RUNNING (for cold-launch restoration).

Link copied to clipboard
abstract suspend fun save(chainId: String, stepsJson: String, totalSteps: Int)

Saves the initial progress for a newly started chain.

Link copied to clipboard
abstract suspend fun updateStep(chainId: String, currentStep: Int, status: String)

Updates the current step and status of an existing chain.