package com.correx.core.tasks

import kotlinx.serialization.Serializable

/**
 * Port for resolving a SESSION link target (a `SessionId`) to an inline summary, so the context
 * bundle can carry the run's status/intent instead of a bare id. Implemented in a higher layer
 * (apps/server projects the session's events); `core:tasks` stays decoupled from the session
 * aggregate. Returns null when the session can't be resolved — the link then stays a raw related
 * link.
 */
interface TaskSessionResolver {
    suspend fun resolve(targetId: String): ResolvedSession?
}

@Serializable
data class ResolvedSession(
    val status: String,
    val intent: String?,
    val workflowId: String?,
)
