feat(core): add event revisions and saved-device local labels

Platform contract harnesses need monotonic event revisions for at-least-once
dedup and a typed rename API that survives listing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-11 04:47:28 +02:00
parent 89c2206f0f
commit 8e8cab9b24
13 changed files with 162 additions and 19 deletions

View File

@@ -13,6 +13,7 @@ data class CoreStatus(
data class CoreEventModel(
val id: String,
val revision: ULong,
val timestamp: Long,
val scope: String,
val transferId: ULong?,

View File

@@ -370,6 +370,7 @@ private fun RelaySettings.toNative(): CoreNetworkConfig = when (mode) {
private fun CoreEvent.toModel(): CoreEventModel = CoreEventModel(
id = id,
revision = revision,
timestamp = timestamp,
scope = scope,
transferId = transferId,

View File

@@ -180,6 +180,7 @@ class AppUiModelsTest {
),
CoreEventModel(
id = "conn",
revision = 1UL,
timestamp = 1L,
scope = "endpoint",
transferId = null,
@@ -330,6 +331,7 @@ class AppUiModelsTest {
direction: String = "receive",
) = CoreEventModel(
id = id,
revision = 1UL,
timestamp = 1L,
scope = "transfer",
transferId = transferId,