mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-12 05:29:57 +02:00
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:
@@ -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?,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user